-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
30 lines (22 loc) · 1022 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
SOURCE_C_FILE += $(shell find . -name "*.c")
SOURCE_CPP_FILE += $(shell find . -name "*.cpp")
TARGET_PATH += .
COMPILE_OPTION := -fPIC -shared -fvisibility=hidden -Wno-deprecated -Wno-parentheses -Wno-unused-result -Wreturn-type
MACRO := -D_REENTRANT -DDECLSPEC_DLL_EXPORT -DCCT_NUM_DOUBLE
DEFAULT_LINK := -pthread -lm
ifeq ($(shell uname), Linux)
endif
COMPILER := gcc
ifeq ($(COMPILER), gcc)
SOURCE_CPP_FILE :=
endif
DEBUG_TARGET := $(TARGET_PATH)/libCollisionDectetionDebug.so
ASAN_TARGET := $(TARGET_PATH)/libCollisionDectetionAsan.so
RELEASE_TARGET := $(TARGET_PATH)/libCollisionDectetion.so
all:
debug:
$(COMPILER) $(MACRO) -D_DEBUG -g $(COMPILE_OPTION) $(SOURCE_C_FILE) $(SOURCE_CPP_FILE) -o $(DEBUG_TARGET) $(DEFAULT_LINK)
asan:
$(COMPILER) $(MACRO) -D_DEBUG -g -fsanitize=address $(COMPILE_OPTION) $(SOURCE_C_FILE) $(SOURCE_CPP_FILE) -o $(ASAN_TARGET) $(DEFAULT_LINK)
release:
$(COMPILER) $(MACRO) -DNDEBUG -O2 $(COMPILE_OPTION) $(SOURCE_C_FILE) $(SOURCE_CPP_FILE) -o $(RELEASE_TARGET) $(DEFAULT_LINK)