Makes this Makefile a little more flexible
-include ../common.mk
+BASE = ..
-CPPFLAGS += -I.. -I../include
+include $(BASE)/common.mk
+
+CPPFLAGS += -I$(BASE) -I$(BASE)/include
SRCS = $(wildcard *.c)
CPSRCS = $(wildcard *.cc)
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