projects
/
model-checker.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LICENSE: add newline at end of file
[model-checker.git]
/
test
/
Makefile
diff --git
a/test/Makefile
b/test/Makefile
index 87893243ce83e32f9e27331ec8620de14c6bce2d..9d7acb0894b7db264e5b4bd4e90a61cff6be0a27 100644
(file)
--- a/
test/Makefile
+++ b/
test/Makefile
@@
-1,23
+1,26
@@
-include ../common.mk
+BASE := ..
-CPPFLAGS += -I.. -I../include
+OBJECTS := $(patsubst %.c, %.o, $(wildcard *.c))
+OBJECTS += $(patsubst %.cc, %.o, $(wildcard *.cc))
-# Mac OSX options
-ifeq ($(UNAME), Darwin)
-CPPFLAGS += -D_XOPEN_SOURCE -DMAC
-endif
+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)
+DEPS := $(join $(addsuffix ., $(dir $(OBJECTS))), $(addsuffix .d, $(notdir $(OBJECTS))))
+
+CPPFLAGS += -I$(BASE) -I$(BASE)/include
+
+all: $(OBJECTS)
+
+-include $(DEPS)
%.o: %.c
%.o: %.c
- $(CC) -
o $@ $< $(CPPFLAGS) -L..
-l$(LIB_NAME)
+ $(CC) -
MMD -MF $(@D)/.$(@F).d -o $@ $< $(CPPFLAGS) -L$(BASE)
-l$(LIB_NAME)
%.o: %.cc
%.o: %.cc
- $(CXX) -
o $@ $< $(CPPFLAGS) -L..
-l$(LIB_NAME)
+ $(CXX) -
MMD -MF $(@D)/.$(@F).d -o $@ $< $(CPPFLAGS) -L$(BASE)
-l$(LIB_NAME)
clean::
clean::
- rm -f
*.o
+ rm -f
$(OBJECTS) $(DEPS)