-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
56 lines (39 loc) · 1.96 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
path_only = `dirname $(realpath $(lastword $(MAKEFILE_LIST)))`
all: heuristics
LIB_PATH = ${path_only}/lib
INC_PATH = ${path_only}/include
SRC_PATH = ${path_only}/src
OBJ_PATH = ${path_only}/
CPP = g++
PEDANTIC_PARANOID_FREAK = -O0 -Wshadow -Wcast-align \
-Waggregate-return -Wmissing-prototypes -Wmissing-declarations \
-Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations \
-Wmissing-noreturn -Wredundant-decls -Wnested-externs \
-Wpointer-arith -Wwrite-strings -finline-functions
REASONABLY_CAREFUL_DUDE = -Wall
NO_PRAYER_FOR_THE_WICKED = -w -O2
WARNINGS = $(REASONABLY_CAREFUL_DUDE)
CFLAGS = $(WARNINGS) -m64 -O3 -g -DNOASSERT -std=c++14 -fopenmp
INCLUDES = -I${INC_PATH}
DEFS =
LDADD =
LIBS = ${LIB_PATH}/heuristics.a
# all source files have associated object files
lib-io-tree-utils.o: src/lib-io-tree-utils.cpp include/lib-io-tree-utils.h
$(CPP) $(INCLUDES) $(DEFS) $(CFLAGS) -o ${OBJ_PATH}/$@ -c $< -fPIC
lib-io-tree-liu-optimal.o: src/lib-io-tree-liu-optimal.cpp include/lib-io-tree-liu-optimal.h lib-io-tree-utils.o
$(CPP) $(INCLUDES) $(DEFS) $(CFLAGS) -o ${OBJ_PATH}/$@ -c $< -fPIC
lib-io-tree-minmem.o: src/lib-io-tree-minmem.cpp include/lib-io-tree-minmem.h lib-io-tree-utils.o
$(CPP) $(INCLUDES) $(DEFS) $(CFLAGS) -o ${OBJ_PATH}/$@ -c $< -fPIC
lib-io-tree.o: src/lib-io-tree.cpp include/lib-io-tree.h lib-io-tree-minmem.o lib-io-tree-utils.o lib-io-tree-liu-optimal.o
$(CPP) $(INCLUDES) $(DEFS) $(CFLAGS) -o ${OBJ_PATH}/$@ -c $< -fPIC
heuristics.o: src/heuristics.cpp include/heuristics.h lib-io-tree-minmem.o lib-io-tree-liu-optimal.o lib-io-tree.o
$(CPP) $(INCLUDES) $(DEFS) $(CFLAGS) -o ${OBJ_PATH}/$@ -c $< -fPIC
heuristics:heuristics.o
rm -f ${LIB_PATH}/[email protected] ${LIB_PATH}/[email protected]
ar rcs ${LIB_PATH}/[email protected] $(OBJ_PATH)/heuristics.o $(OBJ_PATH)/lib-io-tree.o $(OBJ_PATH)/lib-io-tree-utils.o $(OBJ_PATH)/lib-io-tree-minmem.o $(OBJ_PATH)/lib-io-tree-liu-optimal.o
clean:
rm -f ${OBJ_PATH}/*.o *~
.PHONY: clean all
.SUFFIXES:
.SECONDARY: