blob: 0650a3adf3508e8ac52d9c051c51d5fde8b88cc4 (
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
|
- allow for passing custom compiler FLAGS
- use host CC and CFLAGS for tools/configurator build
--- stats-82bd4977b607b8714f361467e37a9d801ff911b6.orig/Makefile 2015-02-27 18:30:06.000000000 +0100
+++ stats-82bd4977b607b8714f361467e37a9d801ff911b6/Makefile 2015-02-27 18:37:14.000000000 +0100
@@ -1,14 +1,15 @@
# Destination directory for installation (intended for packagers)
DESTDIR =
-PREFIX = /usr/local
+PREFIX = /usr
+CC ?=
OPTFLAGS=-O3 -flto
#OPTFLAGS=-g
WARNFLAGS=-Wall -Wstrict-prototypes -Wundef
-CPPFLAGS=-I.
-CFLAGS=$(OPTFLAGS) $(WARNFLAGS)
-LDFLAGS=$(OPTFLAGS)
-LDLIBS=-lm
+CPPFLAGS+=-I.
+CFLAGS+=$(WARNFLAGS)
+LDFLAGS+=
+LDLIBS+=-lm
# Comment this out (or use "VALGRIND=" on cmdline) if you don't have valgrind.
VALGRIND=valgrind --quiet --leak-check=full --error-exitcode=5
@@ -41,6 +42,9 @@ $(OFILES): config.h
config.h: tools/configurator
if $< > $@.tmp; then mv $@.tmp $@; else rm -f $@.tmp; fi
+tools/configurator: CC=${CC_FOR_BUILD}
+tools/configurator: CFLAGS=${CFLAGS_FOR_BUILD}
+tools/configurator: LDFLAGS=${LDFLAGS_FOR_BUILD}
stats: $(OFILES)
distclean: clean
|