From d8e5e19d215225df584752d5870e3fc0bbdcfbe3 Mon Sep 17 00:00:00 2001 From: Brian Norris Date: Tue, 15 Jan 2013 12:30:33 -0800 Subject: [PATCH] test: Makefile: add $(BASE) variable Makes this Makefile a little more flexible --- test/Makefile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/test/Makefile b/test/Makefile index a3de6fe..c918368 100644 --- a/test/Makefile +++ b/test/Makefile @@ -1,6 +1,8 @@ -include ../common.mk +BASE = .. -CPPFLAGS += -I.. -I../include +include $(BASE)/common.mk + +CPPFLAGS += -I$(BASE) -I$(BASE)/include SRCS = $(wildcard *.c) CPSRCS = $(wildcard *.cc) @@ -9,10 +11,10 @@ OBJS = $(patsubst %.c,%.o,$(SRCS)) $(patsubst %.cc,%.o,$(CPSRCS)) all: $(OBJS) %.o: %.c - $(CC) -o $@ $< $(CPPFLAGS) -L.. -l$(LIB_NAME) + $(CC) -o $@ $< $(CPPFLAGS) -L$(BASE) -l$(LIB_NAME) %.o: %.cc - $(CXX) -o $@ $< $(CPPFLAGS) -L.. -l$(LIB_NAME) + $(CXX) -o $@ $< $(CPPFLAGS) -L$(BASE) -l$(LIB_NAME) clean:: rm -f *.o -- 2.34.1