-
Notifications
You must be signed in to change notification settings - Fork 6
/
makefile
66 lines (59 loc) · 2.01 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
#
# CGen makefile
# https://cgen.sophisticatedways.net
# Copyright © 2018-2020 Volodymyr Skladanivskyy. All rights reserved.
# Published under terms of MIT license.
#
BIN_NAME = cgen
BIN_NAME_OPTIMIZED = cgeno
CXX = g++
CXX_FLAGS = -I. -std=c++11
PATH_ACL = ./acl
CXX_FLAGS += -I$(PATH_ACL)
PATH_BAL_ANF = ./bal/anf
CXX_FLAGS += -I$(PATH_BAL_ANF)
PATH_BAL_BAL = ./bal/bal
CXX_FLAGS += -I$(PATH_BAL_BAL)
PATH_BAL_CNF_CNF = ./bal/cnf/cnf
CXX_FLAGS += -I$(PATH_BAL_CNF_CNF)
PATH_BAL_CNF_IO = ./bal/cnf/io
CXX_FLAGS += -I$(PATH_BAL_CNF_IO)
PATH_BAL_CNF_ENCODING = ./bal/cnf/encoding
CXX_FLAGS += -I$(PATH_BAL_CNF_ENCODING)
PATH_BAL_CNF_PROCESSOR = ./bal/cnf/processor
CXX_FLAGS += -I$(PATH_BAL_CNF_PROCESSOR)
PATH_BAL_CNF_TRACER = ./bal/cnf/tracer
CXX_FLAGS += -I$(PATH_BAL_CNF_TRACER)
PATH_BAL_ENCODING = ./bal/encoding
CXX_FLAGS += -I$(PATH_BAL_ENCODING)
PATH_BAL_FORMULA = ./bal/formula
CXX_FLAGS += -I$(PATH_BAL_FORMULA)
PATH_BAL_IO = ./bal/io
CXX_FLAGS += -I$(PATH_BAL_IO)
PATH_BAL_VARIABLES = ./bal/variables
CXX_FLAGS += -I$(PATH_BAL_VARIABLES)
PATH_BAL_UTILS = ./bal/utils
CXX_FLAGS += -I$(PATH_BAL_UTILS)
all: cgen cgen_optimized
cgen:
$(CXX) $(CXX_FLAGS) -DCNF_TRACE -c *.cpp
$(CXX) $(CXX_FLAGS) -DCNF_TRACE -c $(PATH_BAL_ANF)/*.cpp
$(CXX) $(CXX_FLAGS) -DCNF_TRACE -c $(PATH_BAL_CNF_CNF)/*.cpp
$(CXX) $(CXX_FLAGS) -DCNF_TRACE -c $(PATH_BAL_CNF_ENCODING)/*.cpp
$(CXX) $(CXX_FLAGS) -DCNF_TRACE -c $(PATH_BAL_CNF_PROCESSOR)/*.cpp
$(CXX) $(CXX_FLAGS) -DCNF_TRACE -c $(PATH_BAL_FORMULA)/*.cpp
$(CXX) $(CXX_FLAGS) -DCNF_TRACE -c $(PATH_BAL_VARIABLES)/*.cpp
$(CXX) *.o -o ${BIN_NAME}
cgen_optimized:
$(CXX) $(CXX_FLAGS) -c *.cpp
$(CXX) $(CXX_FLAGS) -c $(PATH_BAL_ANF)/*.cpp
$(CXX) $(CXX_FLAGS) -c $(PATH_BAL_CNF_CNF)/*.cpp
$(CXX) $(CXX_FLAGS) -c $(PATH_BAL_CNF_ENCODING)/*.cpp
$(CXX) $(CXX_FLAGS) -c $(PATH_BAL_CNF_PROCESSOR)/*.cpp
$(CXX) $(CXX_FLAGS) -c $(PATH_BAL_FORMULA)/*.cpp
$(CXX) $(CXX_FLAGS) -c $(PATH_BAL_VARIABLES)/*.cpp
$(CXX) *.o -o ${BIN_NAME_OPTIMIZED}
clean:
rm -rf *.o
rm -f ${BIN_NAME}
rm -f ${BIN_NAME_OPTIMIZED}