projects
/
model-checker.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Makefile: rename variable to be more clear
[model-checker.git]
/
Makefile
diff --git
a/Makefile
b/Makefile
index ff5c7d9d26c4e28ff2a1ce8f2e1b9eed3c5790d0..9b20f4c8a65632c7d0f1c25e18417b38724c9ff2 100644
(file)
--- a/
Makefile
+++ b/
Makefile
@@
-5,8
+5,8
@@
OBJECTS = libthreads.o schedule.o model.o threads.o librace.o action.o \
datarace.o impatomic.o cmodelint.o \
snapshot.o malloc.o mymemory.o common.o mutex.o promise.o conditionvariable.o
datarace.o impatomic.o cmodelint.o \
snapshot.o malloc.o mymemory.o common.o mutex.o promise.o conditionvariable.o
-CPPFLAGS += -Iinclude -I.
-rdynamic
-LDFLAGS = -ldl -lrt
+CPPFLAGS += -Iinclude -I.
+LDFLAGS = -ldl -lrt
-rdynamic
SHARED = -shared
# Mac OSX options
SHARED = -shared
# Mac OSX options
@@
-21,12
+21,15
@@
program_H_SRCS := $(wildcard *.h) $(wildcard include/*.h)
program_C_SRCS := $(wildcard *.c) $(wildcard *.cc)
DEPS = make.deps
program_C_SRCS := $(wildcard *.c) $(wildcard *.cc)
DEPS = make.deps
-all: $(LIB_SO)
$(DEPS)
tests
+all: $(LIB_SO) tests
+$(DEPS): build_deps := 1
$(DEPS): $(program_C_SRCS) $(program_H_SRCS)
$(CXX) -MM $(program_C_SRCS) $(CPPFLAGS) > $(DEPS)
$(DEPS): $(program_C_SRCS) $(program_H_SRCS)
$(CXX) -MM $(program_C_SRCS) $(CPPFLAGS) > $(DEPS)
+ifeq ($(build_deps),1)
include $(DEPS)
include $(DEPS)
+endif
debug: CPPFLAGS += -DCONFIG_DEBUG
debug: all
debug: CPPFLAGS += -DCONFIG_DEBUG
debug: all
@@
-41,7
+44,7
@@
$(LIB_SO): $(OBJECTS)
malloc.o: malloc.c
$(CC) -fPIC -c malloc.c -DMSPACES -DONLY_MSPACES -DHAVE_MMAP=0 $(CPPFLAGS) -Wno-unused-variable
malloc.o: malloc.c
$(CC) -fPIC -c malloc.c -DMSPACES -DONLY_MSPACES -DHAVE_MMAP=0 $(CPPFLAGS) -Wno-unused-variable
-%.o: %.cc
+%.o: %.cc
$(DEPS)
$(CXX) -fPIC -c $< $(CPPFLAGS)
PHONY += clean
$(CXX) -fPIC -c $< $(CPPFLAGS)
PHONY += clean
@@
-61,16
+64,16
@@
PHONY += tests
tests: $(LIB_SO)
$(MAKE) -C $(TESTS_DIR)
tests: $(LIB_SO)
$(MAKE) -C $(TESTS_DIR)
-BENCH
MARKS
:= benchmarks
+BENCH
_DIR
:= benchmarks
PHONY += benchmarks
benchmarks: $(LIB_SO)
PHONY += benchmarks
benchmarks: $(LIB_SO)
- @if ! test -d $(BENCH
MARKS
); then \
- echo "Directory $(BENCH
MARKS
) does not exist" && \
+ @if ! test -d $(BENCH
_DIR
); then \
+ echo "Directory $(BENCH
_DIR
) does not exist" && \
echo "Please clone the benchmarks repository" && \
echo && \
exit 1; \
fi
echo "Please clone the benchmarks repository" && \
echo && \
exit 1; \
fi
- $(MAKE) -C $(BENCH
MARKS
)
+ $(MAKE) -C $(BENCH
_DIR
)
.PHONY: $(PHONY)
.PHONY: $(PHONY)