patch-Makefile 982 B

12345678910111213141516171819202122232425262728
  1. - allow for passing custom compiler FLAGS
  2. - use host CC and CFLAGS for tools/configurator build
  3. --- stats-82bd4977b607b8714f361467e37a9d801ff911b6.orig/Makefile 2015-02-23 22:34:48.000000000 +0100
  4. +++ stats-82bd4977b607b8714f361467e37a9d801ff911b6/Makefile 2015-02-23 22:38:45.478017862 +0100
  5. @@ -5,10 +5,10 @@ PREFIX = /usr/local
  6. OPTFLAGS=-O3 -flto
  7. #OPTFLAGS=-g
  8. WARNFLAGS=-Wall -Wstrict-prototypes -Wundef
  9. -CPPFLAGS=-I.
  10. -CFLAGS=$(OPTFLAGS) $(WARNFLAGS)
  11. -LDFLAGS=$(OPTFLAGS)
  12. -LDLIBS=-lm
  13. +CPPFLAGS+=-I.
  14. +CFLAGS+=$(OPTFLAGS) $(WARNFLAGS)
  15. +LDFLAGS+=$(OPTFLAGS)
  16. +LDLIBS+=-lm
  17. # Comment this out (or use "VALGRIND=" on cmdline) if you don't have valgrind.
  18. VALGRIND=valgrind --quiet --leak-check=full --error-exitcode=5
  19. @@ -41,6 +41,8 @@ $(OFILES): config.h
  20. config.h: tools/configurator
  21. if $< > $@.tmp; then mv $@.tmp $@; else rm -f $@.tmp; fi
  22. +tools/configurator: CC=${CC_FOR_BUILD}
  23. +tools/configurator: CFLAGS=${OPTFLAGS} ${WARNFLAGS}
  24. stats: $(OFILES)
  25. distclean: clean