Commit 1d665b5f authored by Federico Vaga's avatar Federico Vaga

sw:*: use implicit Makefile variable properly

Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent 0212c7e3
......@@ -18,14 +18,13 @@ LOBJ += libmockturtle-rt-msg.o
CFLAGS += -Wall -Werror -ggdb -fPIC
CFLAGS += -I. -I$(TRTL_SW)/include $(EXTRACFLAGS)
LDFLAGS += -L. -lmockturtle
ARFLAGS = rcv
modules all: $(LIB) $(LIBS)
%: %.c $(LIB)
$(CC) $(CFLAGS) $*.c $(LDFLAGS) -o $@
$(CC) $(CFLAGS) $*.c $(LDFLAGS) $(LDLIBS) -o $@
$(LIB): $(LOBJ)
$(AR) $(ARFLAGS) $@ $^
......
......@@ -16,7 +16,8 @@ GIT_VERSION := $(shell git describe --dirty --long --tags)
CFLAGS += -Wall -Werror -ggdb -I$(TRTL_SW)/lib
CFLAGS += -I$(TRTL_SW)/include
CFLAGS += $(EXTRACFLAGS)
LDLIBS += -Wl,-Bstatic -L$(TRTL_SW)/lib -lmockturtle
LDFLAGS += -L$(TRTL_SW)/lib
LDLIBS += -Wl,-Bstatic -lmockturtle
LDLIBS += -Wl,-Bdynamic -lpthread
PROGS := mockturtle-count
PROGS += lsmockturtle
......@@ -40,7 +41,7 @@ uninstall:
rmdir --ignore-fail-on-non-empty $(DESTDIR)/bin
%: %.c $(TRTL_SW)/lib/libmockturtle.a
$(CC) $(CFLAGS) $^ -o $@ $(LDLIBS)
$(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ $(LDLIBS)
# make nothing for modules_install, but avoid errors
modules_install:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment