gperiodic-2.0.10-makefile.patch 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. Respect CC, CFLAGS, LDFLAGS
  2. Fix install paths
  3. Fix parallel build
  4. Drop DEPRECATED flags, bug #391099
  5. --- Makefile
  6. +++ Makefile
  7. @@ -1,6 +1,5 @@
  8. -CC := gcc
  9. -CFLAGS := `pkg-config --cflags gtk+-2.0` -I. -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED
  10. -LIBS :=`pkg-config --libs gtk+-2.0`
  11. +CFLAGS += `pkg-config --cflags gtk+-2.0` -I.
  12. +LIBS +=`pkg-config --libs gtk+-2.0`
  13. bindir ?= /usr/bin
  14. datadir ?= /usr/share
  15. enable_nls ?= 1
  16. @@ -8,12 +7,11 @@
  17. .c.o:
  18. $(CC) -c $(CFLAGS) $(CPPFLAGS) $<
  19. -all:
  20. - make gperiodic
  21. - make -C po/ all enable_nls=$(enable_nls)
  22. +all: gperiodic
  23. + $(MAKE) -C po/ all enable_nls=$(enable_nls)
  24. gperiodic: gperiodic.o
  25. - $(CC) $(CFLAGS) -o gperiodic gperiodic.o $(LIBS)
  26. + $(CC) $(LDFLAGS) $(CFLAGS) -o gperiodic gperiodic.o $(LIBS)
  27. ifeq ($(strip),1)
  28. strip gperiodic
  29. endif
  30. @@ -23,24 +21,21 @@
  31. gperiodic.o: gperiodic.c gperiodic.h table_data.h
  32. install:
  33. - mkdir -p $(DESTDIR)$(bindir)
  34. - install -m 755 gperiodic $(DESTDIR)$(bindir)
  35. - mkdir -p $(DESTDIR)$(datadir)/applications
  36. - install -m 644 gperiodic.desktop $(DESTDIR)$(datadir)/applications
  37. - mkdir -p $(DESTDIR)$(datadir)/pixmaps
  38. - install -m 644 gperiodic.png $(DESTDIR)$(datadir)/pixmaps
  39. - install -m 644 gperiodic-crystal.png $(DESTDIR)$(datadir)/pixmaps
  40. - make -C po/ install enable_nls=$(enable_nls) datadir=$(datadir) DESTDIR=$(DESTDIR)
  41. + install -D -m 755 gperiodic $(DESTDIR)$(bindir)/gperiodic
  42. + install -D -m 644 gperiodic.desktop $(DESTDIR)$(datadir)/applications/gperiodic.desktop
  43. + install -D -m 644 gperiodic.png $(DESTDIR)$(datadir)/pixmaps/gperiodic.png
  44. + install -m 644 gperiodic-crystal.png $(DESTDIR)$(datadir)/pixmaps/gperiodic-crystal.png
  45. + $(MAKE) -C po/ install enable_nls=$(enable_nls) datadir=$(datadir) DESTDIR=$(DESTDIR)
  46. uninstall:
  47. rm -f $(bindir)/gperiodic \
  48. $(datadir)/applications/gperiodic.desktop
  49. $(datadir)/pixmaps/gperiodic.png \
  50. $(datadir)/pixmaps/gperiodic-crystal.png
  51. - make -C po/ uninstall enable_nls=$(enable_nls) datadir=$(datadir) DESTDIR=$(DESTDIR)
  52. + $(MAKE) -C po/ uninstall enable_nls=$(enable_nls) datadir=$(datadir) DESTDIR=$(DESTDIR)
  53. clean:
  54. rm -f *.o gperiodic
  55. - make -C po/ clean
  56. + $(MAKE) -C po/ clean
  57. .PHONY: install uninstall clean