-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
80 lines (66 loc) · 1.6 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
72
73
74
75
76
77
78
79
80
#############################
# #
# Makefile for GNU compiler #
# #
#############################
DEFINES = -DDEBUG
# Dependency on Boost library
INCLUDES = -I/usr/include/boost
WARNINGS = -Wall
CODEOPT = # -ftemplate-depth-30 -fpermissive -O3
DEBUG = -g
CPPFLAGS = $(DEFINES)
CXXFLAGS = $(WARNINGS) $(INCLUDES) $(CODEOPT) $(DEBUG)
PROFILE = # -pg
LDFLAGS =
LIBS =
LD = $(CXX)
.cpp.o:
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(PROFILE) -c $< -o $@
SOURCES.cpp = \
DPAG.cpp \
DataSet.cpp \
Instance.cpp \
InstanceParser.cpp \
Model.cpp \
Node.cpp \
Options.cpp \
Performance.cpp \
StructuredDomain.cpp
SOURCES.h= \
ActivationFunction.h \
DPAG.h \
DataSet.h \
ErrorMinimizationProcedure.h \
General.h \
Instance.h \
InstanceParser.h \
Model.h \
Node.h \
Options.h \
Performance.h \
RecurisveNN.h \
StructuredDomain.h \
require.h
OBJECTS = $(SOURCES.cpp:%.cpp=%.o)
TARGETS = rnnTrain generateParityGraphs
# main targets
all: ${TARGETS}
rnnTrain: $(OBJECTS) rnnTrain.o
$(LD) $(OBJECTS) rnnTrain.o $(LIBS) -o $@ $(PROFILE) $(LDFLAGS)
rnnTrain.o: $(SOURCES.cpp) rnnTrain.cpp
$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(PROFILE) -c rnnTrain.cpp -o $@
generateParityGraphs: generateParityGraphs.o
$(LD) generateParityGraphs.o -o $@ $(PROFILE) $(LDFLAGS)
clean:
rm -rf *.o *.bak *~ $(TARGETS)
$(MAKE) clean -C test
# unit tests
## build unit tests into one single command
tests: ${OBJECTS}
$(MAKE) rnn_unit -C test
## run unit tests
check:
$(MAKE) check -C test
depend:
makedepend -- $(CXXFLAGS) $(CPPFLAGS) rnnTrain.cpp generateParityGraphs.cpp --