Commit 56d8add4 authored by Jeroen Vreeken's avatar Jeroen Vreeken
Browse files

Use VPATH for libs

parent 4086d007
......@@ -129,7 +129,7 @@ $(eval $(call SUBDIR,common))
CFLAGS := -Icommon -Icommon/include
LDFLAGS := -Lcommon/lib
VPATH += common/lib
subdirs: $(TARGETS)
......
......@@ -8,7 +8,7 @@ ARCHSRCS := $(DIR)/command.c $(DIR)/command_tcp.c
ARCHOBJS := $(ARCHSRCS:.c=.lo)
$(LIBDIR)/libcommand.la: $(LIBDIR)/libutils.la $(LIBDIR)/liblog.la
$(LIBDIR)/libcommand.la: libutils.la liblog.la
$(LIBDIR)/libcommand.la: CFLAGS += -Wall -O3 -fPIC
$(LIBDIR)/libcommand.la: LDFLAGS += -lutils -lm -llog -rpath $(ABSLIBDIR)
$(LIBDIR)/libcommand.la: $(ARCHOBJS)
......@@ -17,7 +17,7 @@ $(LIBDIR)/libcommand.la: $(ARCHOBJS)
COMMAND_LIST_SRCS := $(DIR)/command_list.c
COMMAND_LIST_OBJS := $(COMMAND_LIST_SRCS:.c=.o)
$(DIR)/command_list: $(LIBDIR)/libcommand.la
$(DIR)/command_list: libcommand.la
$(DIR)/command_list: LDFLAGS += -lcommand
$(DIR)/command_list: $(COMMAND_LIST_OBJS)
......
......@@ -6,7 +6,7 @@ SRCS+=$(ARCHSRCS)
TARGETS += $(LIBDIR)/liblog.la
$(LIBDIR)/liblog.la: $(LIBDIR)/libutils.la
$(LIBDIR)/liblog.la: libutils.la
$(LIBDIR)/liblog.la: LDFLAGS += -lutils -rpath $(ABSLIBDIR)
$(LIBDIR)/liblog.la: CFLAGS += -Wall -O3 -fPIC
$(LIBDIR)/liblog.la: $(ARCHOBJS)
......
......@@ -10,7 +10,7 @@ ARCHSRCS := $(DIR)/trace.c $(DIR)/trace_tcp.c
ARCHOBJS := $(ARCHSRCS:.c=.lo)
$(LIBDIR)/libtrace.la: $(LIBDIR)/libutils.la $(LIBDIR)/liblog.la
$(LIBDIR)/libtrace.la: libutils.la liblog.la
$(LIBDIR)/libtrace.la: CFLAGS += -Wall -O3 -fPIC
$(LIBDIR)/libtrace.la: LDFLAGS += -lutils -llog -lm -rpath $(ABSLIBDIR)
$(LIBDIR)/libtrace.la: $(ARCHOBJS)
......@@ -18,31 +18,31 @@ $(LIBDIR)/libtrace.la: $(ARCHOBJS)
TRACE_DUMP_SRCS := $(DIR)/trace_dump.c
TRACE_DUMP_OBJS := $(TRACE_DUMP_SRCS:.c=.o)
$(DIR)/trace_dump: $(LIBDIR)/libtrace.la
$(DIR)/trace_dump: libtrace.la
$(DIR)/trace_dump: LDFLAGS += -ltrace
$(DIR)/trace_dump: $(TRACE_DUMP_OBJS)
TRACE_DUMPDIFF_SRCS := $(DIR)/trace_dumpdiff.c
TRACE_DUMPDIFF_OBJS := $(TRACE_DUMPDIFF_SRCS:.c=.o)
$(DIR)/trace_dumpdiff: $(LIBDIR)/libtrace.la
$(DIR)/trace_dumpdiff: libtrace.la
$(DIR)/trace_dumpdiff: LDFLAGS += -ltrace
$(DIR)/trace_dumpdiff: $(TRACE_DUMPDIFF_OBJS)
TRACE_FFT_SRCS := $(DIR)/trace_fft.c
TRACE_FFT_OBJS := $(TRACE_FFT_SRCS:.c=.o)
$(DIR)/trace_fft: $(LIBDIR)/libtrace.la
$(DIR)/trace_fft: libtrace.la
$(DIR)/trace_fft: LDFLAGS += -ltrace -lm -lfftw3
$(DIR)/trace_fft: $(TRACE_FFT_OBJS)
TRACE_LIST_SRCS := $(DIR)/trace_list.c
TRACE_LIST_OBJS := $(TRACE_LIST_SRCS:.c=.o)
$(DIR)/trace_list: $(LIBDIR)/libtrace.la
$(DIR)/trace_list: libtrace.la
$(DIR)/trace_list: LDFLAGS += -ltrace
$(DIR)/trace_list: $(TRACE_LIST_OBJS)
TRACE_VIEW_SRCS := $(DIR)/trace_view.c
TRACE_VIEW_OBJS := $(TRACE_VIEW_SRCS:.c=.o)
$(DIR)/trace_view: $(LIBDIR)/libtrace.la
$(DIR)/trace_view: libtrace.la
$(DIR)/trace_view: LDFLAGS += -ltrace
$(DIR)/trace_view: $(TRACE_VIEW_OBJS)
......
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