From: Brian Norris Date: Tue, 15 Jan 2013 20:30:33 +0000 (-0800) Subject: test: Makefile: add $(BASE) variable X-Git-Tag: oopsla2013~360 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d8e5e19d215225df584752d5870e3fc0bbdcfbe3;p=model-checker.git test: Makefile: add $(BASE) variable Makes this Makefile a little more flexible --- 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