-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
31 lines (21 loc) · 816 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
# change the default compiler with the one
# that supports C++20 modules feature
CC='g++-11'
CFLAGS = -g -O2 --std=c++20 -c
# CFLAGS = -g -Wall --std=c++20 -c
LDFLAGS = -g
# optional library if we want to include
LDLIBS = -larmadillo -ljpeg -lpng
export CPATH=lib/include
export LIBRARY_PATH=lib/lib
main: main.o
$(CC) main.o -o main $(LDFLAGS) $(LDLIBS)
main.o: main.cpp imgmanip/imgio/pch.h.gch imgmanip/imgio/imgio.h imgmanip/homography.h imgmanip/mosaic.h imgmanip/convolution.h
$(CC) $(CFLAGS) main.cpp -include imgmanip/imgio/pch.h -I lib/boost_1_77_0
# use below for PCH
# $(CC) $(CFLAGS) main.cpp -include imgmanip/imgio/pch.h
imgmanip/imgio/pch.h.gch: imgmanip/imgio/pch.h
$(CC) $(CFLAGS) -x c++-header imgmanip/imgio/pch.h -I lib/boost_1_77_0
.PHONY: clean
clean:
rm -rf *.o main *.out *.pcm