litex/vpi/Makefile
Tim 'mithro' Ansell c3c5ffb303 Makefile now uses iverilog-vpi
From `man iverilog-vpi`;
> iverilog-vpi is a tool to simplify the compilation of VPI modules for use
> with Icarus Verilog. It takes on the command line a list of C or C++ source
> files, and generates as output a linked VPI module.

Fixes https://github.com/m-labs/migen/issues/11
2015-04-14 23:17:13 +08:00

23 lines
400 B
Makefile

INSTDIR = $(shell iverilog-vpi --install-dir)
CFLAGS = -Wall -O2 $(CFLAGS_$@)
VPI_CFLAGS := $(shell iverilog-vpi --cflags)
OBJ=ipc.o main.o
all: migensim.vpi
%.o: %.c
$(CC) $(CFLAGS) $(VPI_CFLAGS) -c $(INCDIRS) -o $@ $<
migensim.vpi: $(OBJ)
iverilog-vpi --name=migensim $^
install: migensim.vpi
install -m755 -t $(INSTDIR) $^
clean:
rm -f $(OBJ)
rm -f migensim.vpi
.PHONY: install clean