properbuild.patch 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. diff -Nur ladspa_sdk-old/src/makefile ladspa_sdk/src/makefile
  2. --- ladspa_sdk-old/src/Makefile 2008-04-04 20:13:49.000000000 +0300
  3. +++ ladspa_sdk/src/Makefile 2008-04-04 20:14:03.000000000 +0300
  4. @@ -13,10 +13,12 @@
  5. # GENERAL
  6. #
  7. +CFLAGS = -Wall -Werror -O3
  8. +CXXFLAGS = -Wall -Werror -O3
  9. +
  10. INCLUDES = -I.
  11. -LIBRARIES = -ldl -lm
  12. -CFLAGS = $(INCLUDES) -Wall -Werror -O3 -fPIC
  13. -CXXFLAGS = $(CFLAGS)
  14. +DYNAMIC_LD_LIBS = -ldl
  15. +LIBRARIES = $(DYNAMIC_LD_LIBS) -lm
  16. PLUGINS = ../plugins/amp.so \
  17. ../plugins/delay.so \
  18. ../plugins/filter.so \
  19. @@ -26,7 +28,8 @@
  20. ../bin/applyplugin \
  21. ../bin/listplugins
  22. CC = cc
  23. -CPP = c++
  24. +CXX = c++
  25. +MKDIR_P = mkdirhier
  26. ###############################################################################
  27. #
  28. @@ -34,12 +37,12 @@
  29. #
  30. ../plugins/%.so: plugins/%.c ladspa.h
  31. - $(CC) $(CFLAGS) -o plugins/$*.o -c plugins/$*.c
  32. - $(LD) -o ../plugins/$*.so plugins/$*.o -shared
  33. + $(CC) $(CFLAGS) $(INCLUDES) -fPIC -o plugins/$*.o -c plugins/$*.c
  34. + $(LD) $(RAW_LDFLAGS) -o ../plugins/$*.so plugins/$*.o -shared
  35. ../plugins/%.so: plugins/%.cpp ladspa.h
  36. - $(CPP) $(CXXFLAGS) -o plugins/$*.o -c plugins/$*.cpp
  37. - $(CPP) -o ../plugins/$*.so plugins/$*.o -shared
  38. + $(CXX) $(CXXFLAGS) $(INCLUDES) -fPIC -o plugins/$*.o -c plugins/$*.cpp
  39. + $(CXX) $(LDFLAGS) -o ../plugins/$*.so plugins/$*.o -shared
  40. ###############################################################################
  41. #
  42. @@ -59,12 +62,12 @@
  43. @echo Test complete.
  44. install: targets
  45. - -mkdirhier $(INSTALL_PLUGINS_DIR)
  46. - -mkdirhier $(INSTALL_INCLUDE_DIR)
  47. - -mkdirhier $(INSTALL_BINARY_DIR)
  48. - cp ../plugins/* $(INSTALL_PLUGINS_DIR)
  49. - cp ladspa.h $(INSTALL_INCLUDE_DIR)
  50. - cp ../bin/* $(INSTALL_BINARY_DIR)
  51. + -$(MKDIR_P) $(DESTDIR)$(INSTALL_PLUGINS_DIR)
  52. + -$(MKDIR_P) $(DESTDIR)$(INSTALL_INCLUDE_DIR)
  53. + -$(MKDIR_P) $(DESTDIR)$(INSTALL_BINARY_DIR)
  54. + cp ../plugins/* $(DESTDIR)$(INSTALL_PLUGINS_DIR)
  55. + cp ladspa.h $(DESTDIR)$(INSTALL_INCLUDE_DIR)
  56. + cp ../bin/* $(DESTDIR)$(INSTALL_BINARY_DIR)
  57. /tmp/test.wav: targets ../snd/noise.wav
  58. ../bin/listplugins
  59. @@ -90,19 +93,19 @@
  60. #
  61. ../bin/applyplugin: applyplugin.o load.o default.o
  62. - $(CC) $(CFLAGS) $(LIBRARIES) \
  63. + $(CC) $(CFLAGS) $(INCLUDES) $(LDFLAGS) \
  64. -o ../bin/applyplugin \
  65. - applyplugin.o load.o default.o
  66. + applyplugin.o load.o default.o $(LIBRARIES)
  67. ../bin/analyseplugin: analyseplugin.o load.o default.o
  68. - $(CC) $(CFLAGS) $(LIBRARIES) \
  69. + $(CC) $(CFLAGS) $(INCLUDES) $(LDFLAGS) \
  70. -o ../bin/analyseplugin \
  71. - analyseplugin.o load.o default.o
  72. + analyseplugin.o load.o default.o $(LIBRARIES)
  73. ../bin/listplugins: listplugins.o search.o
  74. - $(CC) $(CFLAGS) $(LIBRARIES) \
  75. + $(CC) $(CFLAGS) $(INCLUDES) $(LDFLAGS) \
  76. -o ../bin/listplugins \
  77. - listplugins.o search.o
  78. + listplugins.o search.o $(LIBRARIES)
  79. ###############################################################################
  80. #