-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
49 lines (39 loc) · 1.24 KB
/
Makefile
File metadata and controls
49 lines (39 loc) · 1.24 KB
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
#===============================
# AUTHOR : Naif Tarafdar
# CREATE DATE : April 20, 2019
#===============================
include $(GALAPAGOS_PATH)/include.mk
DEBUG_FLAGS = -g -DLOG_LEVEL=2
PRODUCTION_FLAGS = -O3 -DLOG_LEVEL=0
BOOST_LDFLAGS=-lboost_thread -lboost_system -lpthread
FLAGS=-DCPU -std=c++17 -isystem $(GALAPAGOS_HLS_PATH)/include -I$(GALAPAGOS_PATH)/middleware/include -I$(GALAPAGOS_PATH)/middleware/libGalapagos -L/usr/local/lib $(INCLUDE_UTIL)
release: CXXFLAGS = $(FLAGS) ${PRODUCTION_FLAGS}
release: test.exe
debug: CXXFLAGS = $(FLAGS) ${DEBUG_FLAGS}
debug: test.exe
all: release
DEBUG ?= 0
ifeq ($(DEBUG), 0)
OPT = $(FLAGS) $(PRODUCTION_FLAGS)
else
OPT = $(FLAGS) $(DEBUG_FLAGS)
endif
lib:
rm *.o
$(CXX) $(OPT) -c common.cpp
ar -cr libGalapagos.a *.o
test.exe: test.cpp *.hpp unit_tests/* common.cpp
$(CXX) $(CXXFLAGS) -o test.exe test.cpp common.cpp $(BOOST_LDFLAGS)
mkdir -p send
mkdir -p recv
cp test.exe send/ && cp test.exe recv/
reply:
$(CXX) $(FLAGS) ${PRODUCTION_FLAGS} -o test_0.exe benchmark_0.cpp common.cpp $(BOOST_LDFLAGS)
$(CXX) $(FLAGS) ${PRODUCTION_FLAGS} -o test_1.exe benchmark_1.cpp common.cpp $(BOOST_LDFLAGS)
clean:
rm -rf *.o
rm -rf *.a
rm -rf *.exe
rm -rf *.txt
rm -rf send/*
rm -rf recv/*