Adding the c wrapper for CSolver
[satune.git] / src / Test / Makefile
1 BASE := ..
2
3 OBJECTS := $(patsubst %.cc, ../bin/%, $(wildcard *.cc))
4 COBJECTS := $(patsubst %.c, ../bin/%, $(wildcard *.c))
5
6 include $(BASE)/common.mk
7
8 DEPS := $(join $(addsuffix ., $(dir $(OBJECTS))), $(addsuffix .d, $(notdir $(OBJECTS))))
9
10 CPPFLAGS += -I$(BASE) -I$(BASE)/AST -I$(BASE)/Collections -I$(BASE)/Backend -I$(BASE)/Tuner
11
12 all: $(OBJECTS) $(COBJECTS) ../bin/run.sh
13
14 -include $(DEPS)
15
16 ../bin/%: %.cc
17         $(CXX) -MMD -MF $(@D)/.$(@F).d -o ../bin/$@ $< $(CPPFLAGS) -L$(BASE)/bin/ -l_cons_comp
18
19 ../bin/%: %.c
20         $(CC) -MMD -MF $(@D)/.$(@F).d -o ../bin/$@ $< $(CPPFLAGS) -L$(BASE)/bin/ -l_cons_comp
21
22 ../bin/run.sh: run.sh
23         cp run.sh ../bin/run.sh
24
25 clean::
26         rm -f $(OBJECTS) $(COBJECTS) $(DEPS) ../bin/run.sh