-
Notifications
You must be signed in to change notification settings - Fork 6
/
makefile.in
executable file
·79 lines (57 loc) · 2.07 KB
/
makefile.in
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
EXEC_DIR = ..
EXEC = $(EXEC_DIR)/simulator
SRC_DIR = cpp_sources
SRC_FILES = $(SRC_DIR)/*.cpp
HEADER_FILES = $(SRC_DIR)/*.h
OBJ = main.o NeuroPop.o NeuroNet.o ChemSyn.o SimuInterface.o MyIO.o
HDF5INCLUDE = @HDF5_CPPFLAGS@ #-I/usr/local/include
HDF5LIBS = @HDF5_LDFLAGS@ -lhdf5_cpp -lhdf5 -lhdf5_hl
###########################################################################
CXX = @CXX@ # must use version that MATLAB supp
CXXFLAGS = -std=c++11 @CXXFLAGS@
CXXINCLUDE = $(HDF5INCLUDE)
CXXLIBS = $(HDF5LIBS)
COMPILE_THIS_ONE = $(CXX) $(CXXFLAGS) $(CXXINCLUDE) -c $<
###########################################################################
#include includes.mk
all: $(EXEC)
# The main idea is that compile each .o separately and then link them
MyIO.o: $(SRC_DIR)/MyIO.cpp $(SRC_DIR)/MyIO.h
$(COMPILE_THIS_ONE)
@echo "MyIO.o updated"
NeuroPop.o: $(SRC_DIR)/NeuroPop.cpp $(SRC_DIR)/NeuroPop.h $(SRC_DIR)/MyIO.h
$(COMPILE_THIS_ONE)
@echo "NeuroPop.o updated"
SimuInterface.o: $(SRC_DIR)/SimuInterface.cpp $(SRC_DIR)/SimuInterface.h $(SRC_DIR)/NeuroNet.h
$(COMPILE_THIS_ONE)
@echo "SimuInterface.o updated"
NeuroNet.o: $(SRC_DIR)/NeuroNet.cpp $(SRC_DIR)/NeuroNet.h $(SRC_DIR)/ChemSyn.h
$(COMPILE_THIS_ONE)
@echo "NeuroNet.o updated"
ChemSyn.o: $(SRC_DIR)/ChemSyn.cpp $(SRC_DIR)/ChemSyn.h $(SRC_DIR)/NeuroPop.h
$(COMPILE_THIS_ONE)
@echo "ChemSyn.o updated"
main.o: $(SRC_DIR)/main.cpp $(SRC_DIR)/SimuInterface.h
$(COMPILE_THIS_ONE)
@echo "main.o updated"
$(EXEC): $(OBJ)
$(CXX) $(CXXFLAGS) $(CXXDEBUGFLAGS) $(CXXOPTIMFLAGS) -O $(OBJ) -o $@ $(CXXLIBS)
@echo "EXEC compiled"
#ElectricalSynapses.o: $(SRC_DIR)/ElectricalSynapses.cpp $(SRC_DIR)/ElectricalSynapses.h $(SRC_DIR)/NeuroPop.h
# $(COMPILE_THIS_ONE)
# @echo "ElectricalSynapses.o updated"
#documentation
docs: html/index.html
html/index.html: ${SRC_FILES} ${HEADER_FILES} Doxyfile
doxygen Doxyfile
#$(OBJ): $(SRC_FILES)
# $(CXX) $(CXXFLAGS) $(arguments) $(CXXOPTIMFLAGS) -c $?
# @echo "OBJ compiled"
clean:
rm *.o
rm -rf *cache
rm config.* configure
@echo "clean done"
clean_all:
rm *.o $(EXEC)
@echo "clean_all done"