tests: Makefile: eliminate (some) recursive make
[cdsspec-compiler.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 CPPFLAGS += -I$(BASE) -I$(BASE)/include
12
13 all: $(OBJECTS)
14
15 %.o: %.c
16         $(CC) -o $@ $< $(CPPFLAGS) -L$(BASE) -l$(LIB_NAME)
17
18 %.o: %.cc
19         $(CXX) -o $@ $< $(CPPFLAGS) -L$(BASE) -l$(LIB_NAME)
20
21 clean::
22         rm -f $(OBJECTS)