-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
40 lines (25 loc) · 1007 Bytes
/
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
OBJECTS_DIR = objects
GTEST_PATH ?= "/home/ondra/Documents/Projekty/googletest/googletest"
# Flags passed to the preprocessor.
# CPPFLAGS += -I$(GTEST_DIR)/include
# CPPFLAGS += -I$(SRC_DIR)
# Flags passed to the C++ compiler.
CXXFLAGS += -g -Wall -Wextra -pedantic -Wno-long-long -ggdb
OPT=-O2
build: libhollowheap.a
test: build_test
./test/unit_test
doc: doxygen.conf
doxygen doxygen.conf
build_test: test/unit_test.cpp libhollowheap.a
${CXX} ${CPPFLAGS} $(CXXFLAGS) ${OPT} -I${GTEST_PATH}/include test/unit_test.cpp -o test/unit_test -pthread -L${GTEST_PATH} -lgtest -D_ELPP_DEFAULT_LOG_FILE='"logs/el.gtest.log"'
libhollowheap.a: hollow_heap.o
ar rcs libhollowheap.a ${OBJECTS_DIR}/hollow_heap.o
# ar -cvq libhollowheap.a ${OBJECTS_DIR}/hollow_heap.o
hollow_heap.o: hollow_heap.hpp hollow_heap.cpp ${OBJECTS_DIR}
${CXX} ${CPPFLAGS} $(CXXFLAGS) ${OPT} -c hollow_heap.hpp -o ${OBJECTS_DIR}/hollow_heap.o
${OBJECTS_DIR}:
@mkdir -p $@/
clean:
rm libhollowheap.a
rm -r ${OBJECTS_DIR}