blob: 20fb6018c4a9b8e1701c4a0774acaf2ed4e8d458 (
plain)
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
|
Description: Use variables in makefile
Allow Debian defaults to be used for CXX etc.
xbrz v18 needs C++17
Author: P Blackman <peter@pblackman.plus.com>
Last-Update: 2020-08-31
Index: b/Makefile
===================================================================
--- a/Makefile
+++ b/Makefile
@@ -1,21 +1,19 @@
all: xbrzscale
xbrz/xbrz.o: xbrz/xbrz.cpp xbrz/xbrz.h
- g++ -std=c++11 -c -o xbrz/xbrz.o xbrz/xbrz.cpp -DNDEBUG
+ $(CXX) $(CXXFLAGS) $(LDFLAGS) -std=c++17 -c -o xbrz/xbrz.o xbrz/xbrz.cpp -DNDEBUG
libxbrzscale.o: libxbrzscale.cpp xbrz/xbrz.h
- g++ -std=c++11 -c -o libxbrzscale.o libxbrzscale.cpp `sdl2-config --cflags`
+ $(CXX) $(CXXFLAGS) $(LDFLAGS) -std=c++17 -c -o libxbrzscale.o libxbrzscale.cpp `sdl2-config --cflags`
xbrzscale.o: xbrzscale.cpp libxbrzscale.h xbrz/xbrz.h
- g++ -std=c++11 -c -o xbrzscale.o xbrzscale.cpp `sdl2-config --cflags`
+ $(CXX) $(CXXFLAGS) $(LDFLAGS) -std=c++17 -c -o xbrzscale.o xbrzscale.cpp `sdl2-config --cflags`
libxbrzscale.a: libxbrzscale.o xbrz/xbrz.o
ar qc libxbrzscale.a libxbrzscale.o xbrz/xbrz.o
xbrzscale: xbrzscale.o libxbrzscale.a
- g++ -o xbrzscale xbrzscale.o libxbrzscale.a -lSDL2_image `sdl2-config --libs`
-#xbrzscale: xbrzscale.o libxbrzscale.o xbrz/xbrz.o
-# g++ -o xbrzscale xbrzscale.o libxbrzscale.o xbrz/xbrz.o -lSDL2_image `sdl2-config --libs`
+ $(CXX) $(CXXFLAGS) $(LDFLAGS) -o xbrzscale xbrzscale.o libxbrzscale.a -lSDL2_image `sdl2-config --libs`
clean:
rm -vf xbrzscale.o xbrz/xbrz.o libxbrzscale.o libxbrzscale.a xbrzscale
|