Merge remote-tracking branch 'origin/master'
[model-checker.git] / test / Makefile
1 BASE := ..
2
3 OBJECTS := $(patsubst %.c, %.o, $(wildcard *.c))
4 OBJECTS += $(patsubst %.cc, %.o, $(wildcard *.cc))
5
6 include $(BASE)/common.mk
7
8 DIR := litmus
9 include $(DIR)/Makefile
10
11 DEPS := $(join $(addsuffix ., $(dir $(OBJECTS))), $(addsuffix .d, $(notdir $(OBJECTS))))
12
13 CPPFLAGS += -I$(BASE) -I$(BASE)/include
14
15 all: $(OBJECTS)
16
17 -include $(DEPS)
18
19 %.o: %.c
20         $(CC) -MMD -MF $(@D)/.$(@F).d -o $@ $< $(CPPFLAGS) -L$(BASE) -l$(LIB_NAME)
21
22 %.o: %.cc
23         $(CXX) -MMD -MF $(@D)/.$(@F).d -o $@ $< $(CPPFLAGS) -L$(BASE) -l$(LIB_NAME)
24
25 clean::
26         rm -f $(OBJECTS) $(DEPS)