libunwind: update to 1.8.1
[openadk.git] / package / stats / patches / patch-Makefile
blob0650a3adf3508e8ac52d9c051c51d5fde8b88cc4
1         - allow for passing custom compiler FLAGS
2         - use host CC and CFLAGS for tools/configurator build
3 --- stats-82bd4977b607b8714f361467e37a9d801ff911b6.orig/Makefile        2015-02-27 18:30:06.000000000 +0100
4 +++ stats-82bd4977b607b8714f361467e37a9d801ff911b6/Makefile     2015-02-27 18:37:14.000000000 +0100
5 @@ -1,14 +1,15 @@
6  # Destination directory for installation (intended for packagers)
7  DESTDIR = 
8 -PREFIX = /usr/local
9 +PREFIX = /usr
11 +CC ?=
12  OPTFLAGS=-O3 -flto
13  #OPTFLAGS=-g
14  WARNFLAGS=-Wall -Wstrict-prototypes -Wundef
15 -CPPFLAGS=-I.
16 -CFLAGS=$(OPTFLAGS) $(WARNFLAGS)
17 -LDFLAGS=$(OPTFLAGS)
18 -LDLIBS=-lm
19 +CPPFLAGS+=-I.
20 +CFLAGS+=$(WARNFLAGS)
21 +LDFLAGS+=
22 +LDLIBS+=-lm
24  # Comment this out (or use "VALGRIND=" on cmdline) if you don't have valgrind.
25  VALGRIND=valgrind --quiet --leak-check=full --error-exitcode=5
26 @@ -41,6 +42,9 @@ $(OFILES): config.h
27  config.h: tools/configurator
28         if $< > $@.tmp; then mv $@.tmp $@; else rm -f $@.tmp; fi
30 +tools/configurator: CC=${CC_FOR_BUILD}
31 +tools/configurator: CFLAGS=${CFLAGS_FOR_BUILD}
32 +tools/configurator: LDFLAGS=${LDFLAGS_FOR_BUILD}
33  stats: $(OFILES)
35  distclean: clean