-
Notifications
You must be signed in to change notification settings - Fork 11
/
Makefile
53 lines (41 loc) · 953 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
47
48
49
50
51
52
53
# build parameters
DEBUG ?= 0
INSTALL_PREFIX ?= $(HOME)/software
# compiler suite
CXX = g++
# compiler flags, linker flags
CXXFLAGS = \
-std=c++11 \
-I$(CUDADIR)/include \
-I$(INSTALL_PREFIX)/include
LDFLAGS = \
-lm \
-L$(INSTALL_PREFIX)/lib -lmlearn \
-lopencv_core -lopencv_highgui -lopencv_imgproc -lopencv_objdetect
ifeq ($(DEBUG), 1)
CXXFLAGS += -g -pg -Wall
else
CXXFLAGS += -O3 -Wno-unused-result
endif
# binary targets
OBJDIR = obj
OBJS = \
$(OBJDIR)/bboxiterator.o \
$(OBJDIR)/main.o
BINS = face-rec
all: echo $(BINS)
echo:
$(info DEBUG = $(DEBUG))
$(info CXX = $(CXX))
$(info LDFLAGS = $(LDFLAGS))
$(info CXXFLAGS = $(CXXFLAGS))
$(OBJDIR):
mkdir -p $(OBJDIR)
$(OBJDIR)/%.o: src/%.cpp src/%.h | $(OBJDIR)
$(CXX) $(CXXFLAGS) -c -o $@ $<
$(OBJDIR)/%.o: src/%.cpp | $(OBJDIR)
$(CXX) $(CXXFLAGS) -c -o $@ $<
face-rec: $(OBJS)
$(CXX) $(CXXFLAGS) -o $@ $^ $(LDFLAGS)
clean:
rm -rf $(OBJDIR) $(BINS) gmon.out