050_cflags.diff 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. diff -ur langdrill-0.3/src/Makefile langdrill-0.3/src/Makefile
  2. --- langdrill-0.3/src/Makefile 2018-03-19 10:15:09.855912688 -0700
  3. +++ langdrill-0.3/src/Makefile 2018-03-19 10:13:38.535093214 -0700
  4. @@ -16,7 +16,9 @@
  5. DEF_FLAGS = -DTARGET='"$(TARGET)"' \
  6. -DDRILL_DEF='"$(DRILL_DEF)"' \
  7. -DDRILL_DIR='"$(DRILL_DIR)"' \
  8. - `pkg-config --cflags gtk+-2.0`
  9. + `pkg-config --cflags gtk+-2.0` \
  10. + `vdk-config-2 --cflags` \
  11. + -Wall
  12. ###### Test for Debian GNU/Linux
  13. # If your system is not Debian GNU/Linux please modify the values after
  14. @@ -27,16 +29,15 @@
  15. DRILL_DIR=$(DESTDIR)/usr/share/langdrill
  16. BIN_DIR=$(DESTDIR)/usr/bin
  17. MAN_DIR=$(DESTDIR)/usr/share/man/man1
  18. - CFLAGS = -Wall `vdk-config-2 --cflags` $(DEF_FLAGS)
  19. else
  20. MY_MESSAGE_OF_THE_DAY=">>" $(TARGET) compilled for NON-Debian GNU/Linux system. "<<"
  21. DRILL_DIR=$(DESTDIR)/usr/local/share/langdrill
  22. BIN_DIR=$(DESTDIR)/usr/local/bin
  23. MAN_DIR=$(DESTDIR)/usr/local/man/man1
  24. - CFLAGS = -Wall -g `vdk-config-2 --cflags` $(DEF_FLAGS)
  25. endif
  26. CC = g++
  27. +CFLAGS = -g
  28. LFLAGS = -Wl,--as-needed `vdk-config-2 --libs` `pkg-config --libs gtk+-2.0`
  29. @@ -45,7 +46,7 @@
  30. .SUFFIXES: .cc
  31. .cc.o: $(SRC)
  32. - $(CC) $(CFLAGS) -c $*.cc -o $@
  33. + $(CC) $(CFLAGS) $(DEF_FLAGS) -c $*.cc -o $@
  34. ####### Build rules
  35. @@ -62,16 +63,16 @@
  36. $(TARGET): tarclean $(OBJ)
  37. @echo $(MY_MESSAGE_OF_THE_DAY)
  38. - $(CC) $(CFLAGS) -o $(TARGET) $(OBJ) $(LFLAGS)
  39. + $(CC) $(CFLAGS) $(DEF_FLAGS) -o $(TARGET) $(OBJ) $(LFLAGS)
  40. run: tarclean $(OBJ)
  41. @echo $(MY_MESSAGE_OF_THE_DAY)
  42. - $(CC) $(CFLAGS) -o $(TARGET) $(OBJ) $(LFLAGS)
  43. + $(CC) $(CFLAGS) $(DEF_FLAGS) -o $(TARGET) $(OBJ) $(LFLAGS)
  44. ./$(TARGET)
  45. build: clean tarclean $(OBJ)
  46. @echo $(MY_MESSAGE_OF_THE_DAY)
  47. - $(CC) $(CFLAGS) -o $(TARGET) $(OBJ) $(LFLAGS)
  48. + $(CC) $(CFLAGS) $(DEF_FLAGS) -o $(TARGET) $(OBJ) $(LFLAGS)
  49. install: all
  50. install -d $(BIN_DIR) $(DRILL_DIR) $(MAN_DIR)