Skip to content
This repository has been archived by the owner on Jan 3, 2020. It is now read-only.

Commit

Permalink
Makefile: fix install, add include path for debian
Browse files Browse the repository at this point in the history
  • Loading branch information
peteut committed Sep 2, 2012
1 parent 4164fb4 commit 8c56204
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions vpi/Makefile
@@ -1,19 +1,19 @@
CC=clang
INSTDIR=/usr/lib/ivl
INCDIRS=
CC := clang
INSTDIR := /usr/local/lib/ivl
INCDIRS := /usr/include/iverilog

This comment has been minimized.

Copy link
@sbourdeauducq

sbourdeauducq Sep 9, 2012

Ok to have this one in the default include paths.


OBJ=ipc.o main.o
OBJ := ipc.o main.o

all: migensim.vpi

%.o: %.c
$(CC) -fPIC -Wall -O2 -c $(INCDIRS) -o $@ $<
$(CC) -fPIC -Wall -O2 -c -I$(INCDIRS) -o $@ $<

This comment has been minimized.

Copy link
@sbourdeauducq

sbourdeauducq Sep 9, 2012

This will break if multiple include directories are specified. Make has a $(prefix...) function that should be used here.
Also, the documentation (doc/simulation.rst) needs updating.

This comment has been minimized.

Copy link
@peteut

peteut Sep 9, 2012

Author Owner

I've overseen that, your're completely right. I'll update that accordingly.


migensim.vpi: $(OBJ)
$(CC) -shared -o $@ $(OBJ) -lvpi

install: migensim.vpi
install -m755 -t $(INSTDIR) $^
install -D -m755 $^ $(INSTDIR)

This comment has been minimized.

Copy link
@sbourdeauducq

sbourdeauducq Sep 9, 2012

I think INSTDIR should be created by the Icarus Verilog package. If it does not exist, it probably means that the value of INSTDIR is wrong and it makes more sense to fail in this case rather than installing the module into some random location in the filesystem only to spend time later figuring out why Iverilog does not find the module.
Or am I missing something?

This comment has been minimized.

Copy link
@peteut

peteut Sep 9, 2012

Author Owner

Understand. I'll remove that in this case. In Debian it should be valid (locally stuff shall be located under /usr/local/).


clean:
rm -f $(OBJ)
Expand Down

0 comments on commit 8c56204

Please sign in to comment.