sandy-0.4-gentoo.patch 1019 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. --- a/config.mk
  2. +++ b/config.mk
  3. @@ -9,19 +9,19 @@
  4. # includes and libs (ncurses)
  5. INCS = -I. -I/usr/include
  6. -LIBS = -L/usr/lib -lc -lncursesw
  7. +LIBS = $(shell ${PKG_CONFIG} --libs ncurses)
  8. # flags
  9. -CPPFLAGS = -DVERSION=\"${VERSION}\"
  10. +CPPFLAGS = -DVERSION=\"${VERSION}\" -D_DEFAULT_SOURCE
  11. #CFLAGS = -std=c99 -pedantic -Wall -Os ${INCS} ${CPPFLAGS}
  12. #LDFLAGS = -s ${LIBS}
  13. -CFLAGS = -g -std=c99 -pedantic -Wall -O0 ${INCS} ${CPPFLAGS}
  14. -LDFLAGS = ${LIBS}
  15. +CFLAGS += -std=c99 -pedantic -Wall ${INCS} ${CPPFLAGS}
  16. +LDFLAGS += ${LIBS}
  17. # Solaris
  18. #CFLAGS = -fast ${INCS} -DVERSION=\"${VERSION}\"
  19. #LDFLAGS = ${LIBS}
  20. # compiler and linker
  21. -CC = cc
  22. +CC ?= cc
  23. --- a/Makefile
  24. +++ b/Makefile
  25. @@ -15,8 +15,7 @@
  26. @echo "CC = ${CC}"
  27. .c.o:
  28. - @echo CC $<
  29. - @${CC} -c ${CFLAGS} $<
  30. + ${CC} -c ${CFLAGS} $<
  31. ${OBJ}: config.h config.mk
  32. @@ -25,8 +24,7 @@
  33. @cp config.def.h $@
  34. sandy: ${OBJ}
  35. - @echo CC -o $@
  36. - @${CC} -o $@ sandy.o ${LDFLAGS}
  37. + ${CC} ${CFLAGS} -o $@ sandy.o ${LDFLAGS}
  38. clean:
  39. @echo cleaning