projects
/
model-checker.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tests: Makefile: eliminate (some) recursive make
[model-checker.git]
/
test
/
Makefile
diff --git
a/test/Makefile
b/test/Makefile
index f1ea5b295d110f81090bf2807b2aeb25c2b9f8bc..5e5e76c6c2b546e197ec3d32b220c6e20a32d857 100644
(file)
--- a/
test/Makefile
+++ b/
test/Makefile
@@
-1,17
+1,16
@@
-BASE = ..
+BASE
:
= ..
-include $(BASE)/common.mk
+OBJECTS := $(patsubst %.c, %.o, $(wildcard *.c))
+OBJECTS += $(patsubst %.cc, %.o, $(wildcard *.cc))
-CPPFLAGS += -I$(BASE) -I$(BASE)/include
+include $(BASE)/common.mk
-SRCS = $(wildcard *.c)
-CPSRCS = $(wildcard *.cc)
-OBJS = $(patsubst %.c,%.o,$(SRCS)) $(patsubst %.cc,%.o,$(CPSRCS))
+DIR := litmus
+include $(DIR)/Makefile
-all: $(OBJS) litmus-tests
+CPPFLAGS += -I$(BASE) -I$(BASE)/include
-litmus-tests::
- $(MAKE) -C litmus
+all: $(OBJECTS)
%.o: %.c
$(CC) -o $@ $< $(CPPFLAGS) -L$(BASE) -l$(LIB_NAME)
%.o: %.c
$(CC) -o $@ $< $(CPPFLAGS) -L$(BASE) -l$(LIB_NAME)
@@
-20,5
+19,4
@@
litmus-tests::
$(CXX) -o $@ $< $(CPPFLAGS) -L$(BASE) -l$(LIB_NAME)
clean::
$(CXX) -o $@ $< $(CPPFLAGS) -L$(BASE) -l$(LIB_NAME)
clean::
- rm -f *.o
- $(MAKE) -C litmus clean
+ rm -f $(OBJECTS)