forked from skaringa/emeocv
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
53 lines (38 loc) · 983 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
.PHONY: clean, mrproper
PROJECT = emeocv
OBJS = $(addprefix $(OUTDIR)/,\
Directory.o \
Config.o \
ImageProcessor.o \
ImageInput.o \
KNearestOcr.o \
Plausi.o \
RRDatabase.o \
main.o \
)
CC = g++
CFLAGS = -Wno-write-strings -I .
# DEBUG
ifneq ($(RELEASE),true)
CFLAGS += -g -D _DEBUG
OUTDIR = Debug
else
OUTDIR = Release
endif
BIN := $(OUTDIR)/$(PROJECT)
LDLIBS = -lopencv_shape -lopencv_stitching -lopencv_objdetect -lopencv_videostab -lopencv_calib3d -lopencv_features2d -lopencv_highgui -lopencv_videoio -lopencv_imgcodecs -lopencv_video -lopencv_photo -lopencv_ml -lopencv_imgproc -lopencv_flann -lopencv_core -lrrd -llog4cpp
SUFFIXES= .cpp .o
.SUFFIXES: $(SUFFIXES) .
all: $(BIN)
$(OUTDIR):
mkdir $(OUTDIR)
$(OBJS): $(OUTDIR)/%.o: %.cpp
$(CC) $(CFLAGS) -c $< -o $@
$(BIN) : $(OUTDIR) $(OBJS)
$(CC) $(CFLAGS) $(LDFALGS) $(OBJS) $(LDLIBS) -o $(BIN)
.cpp.o:
$(CC) $(CFLAGS) -c $*.cpp
clean:
rm -rf $(OUTDIR)/*.o
mrproper: clean
rm -rf $(BIN)