-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
37 lines (29 loc) · 1023 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
# ifndef CC
# CC = g++
# pybind11
CC=c++
# endif
# CCFLAGS= --shared -fPIC -O3 -std=c99 -I /Users/gerrie/anaconda3/envs/py36/include/python3.6m -std=c++11
CCFLAGS= -O3 -Wall -shared -std=c++11 -undefined dynamic_lookup -fPIC `python3 -m pybind11 --includes`
LIBS = -lOpenCL -lm
COMMON_DIR = ../../C_common
# Change this variable to specify the device type
# to the OpenCL device type of choice. You can also
# edit the variable in the source.
ifndef DEVICE
DEVICE = CL_DEVICE_TYPE_DEFAULT
endif
# Check our platform and make sure we define the APPLE variable
# and set up the right compiler flags and libraries
PLATFORM = $(shell uname -s)
ifeq ($(PLATFORM), Darwin)
CPPC = clang++
CCFLAGS += -stdlib=libc++
LIBS = -framework OpenCL -lm
endif
CCFLAGS += -D DEVICE=$(DEVICE)
nms: nms_opencl_vision.cpp
# $(CC) $^ $(CCFLAGS) $(LIBS) -I $(COMMON_DIR) -o $@`python3-config --extension-suffix`
$(CC) $^ $(CCFLAGS) $(LIBS) -I $(COMMON_DIR) -o nms_opencl`python3-config --extension-suffix`
clean:
rm -f nms *.o