-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathMakefile
71 lines (54 loc) · 2.15 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# Project Name (executable)
PROJECT = libquasimodo.so
# Compiler
CC = g++
# Run Options
COMMANDLINE_OPTIONS = #/dev/ttyS0
# Compiler options during compilation
COMPILE_OPTIONS = -g -O3 -std=c++2a -w -shared -Wall -Wextra -DHAVE_CONFIG_H -Werror -Wunused-but-set-variable -fPIC
# -ansi -pedantic -Wall
#Header include directories
HEADERS = -I. -I$(BOOST_PATH) -I.cflobdd/CFLOBDD -I.cflobdd/CFLOBDD/Solver/uwr/bit_vector/ -I.cflobdd/CFLOBDD/Solver/uwr/assert/ -I.cflobdd/CFLOBDD/Solver/uwr/matrix/ -I.cflobdd/CFLOBDD/Solver/uwr/parsing/ -I.cflobdd/cudd-complex-big/ -I.cflobdd/cudd-complex-big/cudd -I.cflobdd/cudd-complex-big/mtr -I.cflobdd/cudd-complex-big/epd -I.cflobdd/cudd-complex-big/st -I.dd_package/include/dd/
#Libraries for linking
LIBS = #cflobdd/cudd-complex-big/cplusplus/.libs/libobj.a cflobdd/cudd-complex-big/cudd/.libs/libcudd.a -lgmp -lmpfr -lgmpxx
# Dependency options
DEPENDENCY_OPTIONS = -MM
# Subdirs to search for additional source files
SOURCE_FILES := $(shell ls *.cpp)
SOURCE_FILES += $(shell ls cflobdd/CFLOBDD/Solver/uwr/bit_vector/*.cpp)
SOURCE_FILES += $(shell ls cflobdd/CFLOBDD/Solver/uwr/parsing/*.cpp)
SOURCE_FILES += $(shell find cflobdd/CFLOBDD -maxdepth 1 -mindepth 1 -name \*.cpp -a -not -name main.cpp)
# [SOURCE_FILES] -= $(shell ls cflobdd/CFLOBDD/main.cpp)
# $(info $(SOURCE_FILES))
# Create an object file of every cpp file
OBJECTS = $(patsubst %.cpp, %.o, $(SOURCE_FILES))
# Dependencies
DEPENDENCIES = $(patsubst %.cpp, %.d, $(SOURCE_FILES))
dep:
cd cflobdd/cudd-complex-big && make all && cd ../../
# Make $(PROJECT) the default target
all: $(PROJECT)
#$(DEPENDENCIES) -shared
$(PROJECT): $(OBJECTS)
$(CC) -shared -o $(PROJECT) $(OBJECTS) $(LIBS)
# Include dependencies (if there are any)
# ifneq "$(strip $(DEPENDENCIES))" ""
# include $(DEPENDENCIES)
# endif
# Compile every cpp file to an object
# %.cpp
%.o: %.cpp
$(CC) -c $(COMPILE_OPTIONS) -o $@ $^ $(HEADERS)
# Build & Run Project
run: $(PROJECT)
./$(PROJECT) $(COMMANDLINE_OPTIONS)
# Clean & Debug
.PHONY: makefile-debug
makefile-debug:
.PHONY: clean
clean:
rm -f $(PROJECT) $(OBJECTS)
.PHONY: depclean
depclean:
rm -f $(DEPENDENCIES)
clean-all: clean depclean