nvclock-0.8_p20110102-r1-make.patch 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. - Fix building with --as-needed
  2. - Fix parallel make by defining two new targets
  3. - Fix one spelling error
  4. - Respect CFLAGS, LDFLAGS
  5. - Link GTK frontend against -lX11 since it uses XOpenDisplay all the time
  6. --- a/configure.in
  7. +++ b/configure.in
  8. @@ -141,7 +141,7 @@
  9. if [test "$HAVE_NVCONTROL" = "yes"]; then
  10. echo "- NV-CONTROL support enabled"
  11. else
  12. - echo "- NV-CONROL support disabled"
  13. + echo "- NV-CONTROL support disabled"
  14. fi
  15. if [test "$HAVE_GTK2" = "yes"]; then
  16. echo "- GTK2 GUI enabled"
  17. --- a/src/Makefile.in
  18. +++ b/src/Makefile.in
  19. @@ -16,7 +16,7 @@
  20. ifeq ($(HAVE_NVCONTROL), yes)
  21. DEPS=$(libbackend) $(libnvcontrol)
  22. INCLUDES=@X11_CFLAGS@ -I./backend -I./nvcontrol -I..
  23. - LIBS=@X11_LIBS@ -L./backend -lbackend -L./nvcontrol -lnvcontrol
  24. + LIBS=-L./backend -lbackend -L./nvcontrol -lnvcontrol @X11_LIBS@
  25. else
  26. DEPS=$(libbackend)
  27. INCLUDES=-I./backend -I./nvcontrol -I..
  28. @@ -30,12 +30,17 @@
  29. all: all-recursive nvclock smartdimmer
  30. +$(libbackend):
  31. + $(MAKE) -C backend
  32. +
  33. +$(libnvcontrol):
  34. + $(MAKE) -C nvcontrol
  35. nvclock: $(DEPS) $(LIB) nvclock.c
  36. - $(CC) $(CFLAGS) -o nvclock $(nvclock_SOURCES) $(INCLUDES) $(LIBS)
  37. + $(CC) $(CFLAGS) $(LDFLAGS) -o nvclock $(nvclock_SOURCES) $(INCLUDES) $(LIBS)
  38. smartdimmer: $(DEPS) $(LIB) smartdimmer.c
  39. - $(CC) $(CFLAGS) -o smartdimmer $(smartdimmer_SOURCES) $(INCLUDES) $(LIBS)
  40. + $(CC) $(CFLAGS) $(LDFLAGS) -o smartdimmer $(smartdimmer_SOURCES) $(INCLUDES) $(LIBS)
  41. clean: clean-recursive clean-app
  42. --- a/src/gtk/Makefile.in
  43. +++ b/src/gtk/Makefile.in
  44. @@ -27,6 +27,7 @@
  45. LIBS=@GTK_LIBS@ -L../backend -lbackend
  46. OBJECTS=banner.o hw.o main.o settings.o
  47. endif
  48. +LIBS += -lX11
  49. .PHONY: clean distclean install
  50. @@ -33,7 +33,7 @@
  51. all: $(PROGRAM)
  52. nvclock_gtk: $(DEPS) $(OBJECTS)
  53. - $(CC) $(CFLAGS) -o nvclock_gtk $(OBJECTS) $(libbackend) $(LIBS)
  54. + $(CC) $(CFLAGS) $(LDFLAGS) -o nvclock_gtk $(OBJECTS) $(libbackend) $(LIBS)
  55. clean:
  56. rm -f nvclock_gtk *.core *.o *.exe
  57. --- a/src/qt/Makefile.in
  58. +++ b/src/qt/Makefile.in
  59. @@ -31,7 +31,7 @@
  60. all: $(PROGRAM)
  61. nvclock_qt: $(DEPS) qt_nvclock.moc qt_xfree.moc $(OBJECTS)
  62. - $(CXX) $(CXXFLAGS) -o nvclock_qt $(CXXFLAGS) $(OBJECTS) $(LIBS)
  63. + $(CXX) $(CXXFLAGS) $(LDFLAGS) -o nvclock_qt $(OBJECTS) $(LIBS)
  64. clean:
  65. rm -f nvclock_qt *.core *.moc *.o
  66. --- a/src/backend/Makefile.in
  67. +++ b/src/backend/Makefile.in
  68. @@ -1,11 +1,11 @@
  69. -CC=@CC@ -O0
  70. +CC=@CC@
  71. AR=ar
  72. RANLIB=@RANLIB@
  73. system=@system@
  74. HAVE_NVCONTROL=@HAVE_NVCONTROL@
  75. OBJECTS=backend.o bios.o config.o error.o nv30.o nv40.o nv50.o info.o overclock.o utils.o i2c.o xf86i2c.o adt7473.o f75375.o lm99.o w83781d.o w83l785r.o libc_wrapper.o
  76. -CFLAGS=@X11_CFLAGS@ -I../.. -I../nvcontrol
  77. +CFLAGS=@CFLAGS@ @X11_CFLAGS@ -I../.. -I../nvcontrol
  78. ifeq ($(system), FreeBSD)
  79. OBJECTS+=back_bsd.o