-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
48 lines (37 loc) · 1.13 KB
/
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
# Repo directories
INCDIR=include
SRCDIR=src
OBJDIR=obj
TARGETDIR=bin
# OpenCV directories
IOPENCV=T:/dev/opencv/include
LOPENCV=T:/dev/opencv/x64/mingw/bin
OPENCV_LIBS= -llibopencv_world452# -llibopencv_highgui452 -llibopencv_imgcodecs452 -llibopencv_imgproc452
OPENCV_CFLAGS = -I $(IOPENCV) -L $(LOPENCV) $(OPENCV_LIBS)
# Compiler options
# g++.exe (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 8.1.0
#CC=g++
CC=C:/mingw64/bin/g++
CFLAGS=-Wall -g
CFLAGS+= -I $(INCDIR)
CFLAGS+= $(OPENCV_CFLAGS)
#DEPS = $(wildcard $(INCDIR)/*.hpp)
SOURCES= $(wildcard $(SRCDIR)/*.cpp)
OBJECTS = $(patsubst $(SRCDIR)/%.cpp, %.o, $(SOURCES))
$(info OBJECTS: $(OBJECTS))
$(info SOURCES: $(SOURCES))
$(info DEPS: $(DEPS))
.PHONY: all clean
default: all
all: style_transfer
#TODO put objects in OBJDIR
$(OBJECTS): $(SOURCES)
${CC} -c $^ -I ${INCDIR} -I ${IOPENCV}
#TODO put executable in $(TARGETDIR)
style_transfer: $(OBJECTS)
$(CC) -o $@ $^ $(CFLAGS)
clean:
$(RM) $(OBJECTS) $(wildcard $(INCDIR)/*.gch)
destroy:
$(RM) $(OBJECTS) style_transfer style_transfer.exe $(wildcard $(INCDIR)/*.gch)
# https://www.cs.colby.edu/maxwell/courses/tutorials/maketutor/