-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
executable file
·47 lines (37 loc) · 1013 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
41
42
43
44
45
46
BOOST_MT=""
ifneq ($(OS),Windows_NT)
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Darwin)
BOOST_MT=-mt
endif
endif
CC = clang++
CL = ar
CLFLAGS = rvs
CFLAGS = -W -Wall -g -std=c++14 \
-I/usr/local/opt/opencv/include \
-I/usr/local/opt/boost/include \
-I/usr/local/opt/fftw/include \
LDFLAGS = -L/usr/local/opt/boost/lib \
-L/usr/local/opt/opencv/lib \
-L/usr/local/opt/fftw/lib \
-I/usr/local/opt/fftw/include \
-lopencv_core -lopencv_imgproc -lopencv_objdetect -lopencv_highgui -lopencv_imgcodecs \
-lboost_program_options -lboost_exception -lboost_thread${BOOST_MT} -lboost_system \
-lfftw3 \
SRC = $(wildcard src/*.cpp src/*.cc)
OBJS = $(SRC:.cpp=.o)
AOUT = bin/gbvs
TARGET_LIB = bin/libgbvs.a
all : $(AOUT) $(TARGET_LIB)
lib : $(TARGET_LIB)
$(TARGET_LIB): $(OBJS)
$(CL) ${CLFLAGS} $@ src/GBVS.o
bin/gbvs : $(OBJS)
$(CC) $^ $(LDFLAGS) -o $@
%.o : %.cpp
$(CC) $(CFLAGS) -o $@ -c $<
clean :
@rm src/*.o
cleaner : clean
@rm $(AOUT)