1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
|
$NetBSD: patch-aa,v 1.5 2017/07/15 18:12:51 wiz Exp $
--- makefile.orig 2007-11-06 10:42:45.000000000 +0000
+++ makefile
@@ -4,9 +4,9 @@
#
# Change these if you want to install somewhere else.
-INSTALL_PLUGINS_DIR = /usr/lib/ladspa/
-INSTALL_INCLUDE_DIR = /usr/include/
-INSTALL_BINARY_DIR = /usr/bin/
+INSTALL_PLUGINS_DIR = ${PREFIX}/lib/ladspa/
+INSTALL_INCLUDE_DIR = ${PREFIX}/include/
+INSTALL_BINARY_DIR = ${PREFIX}/bin/
###############################################################################
#
@@ -14,8 +14,8 @@ INSTALL_BINARY_DIR = /usr/bin/
#
INCLUDES = -I.
-LIBRARIES = -ldl -lm
-CFLAGS = $(INCLUDES) -Wall -Werror -O3 -fPIC
+LIBRARIES = $(DL_LIBS) -lm
+CFLAGS = $(INCLUDES) -Wall -Werror -fPIC
CXXFLAGS = $(CFLAGS)
PLUGINS = ../plugins/amp.so \
../plugins/delay.so \
@@ -25,8 +25,8 @@ PLUGINS = ../plugins/amp.so \
PROGRAMS = ../bin/analyseplugin \
../bin/applyplugin \
../bin/listplugins
-CC = cc
-CPP = c++
+#CC = cc
+#CPP = c++
###############################################################################
#
@@ -34,12 +34,12 @@ CPP = c++
#
../plugins/%.so: plugins/%.c ladspa.h
- $(CC) $(CFLAGS) -o plugins/$*.o -c plugins/$*.c
- $(LD) -o ../plugins/$*.so plugins/$*.o -shared
+ $(CC) $(CFLAGS) $(LDFLAGS) -o plugins/$*.o -c plugins/$*.c
+ $(LD) $(REAL_LDFLAGS) -o ../plugins/$*.so plugins/$*.o -shared
../plugins/%.so: plugins/%.cpp ladspa.h
- $(CPP) $(CXXFLAGS) -o plugins/$*.o -c plugins/$*.cpp
- $(CPP) -o ../plugins/$*.so plugins/$*.o -shared
+ $(CXX) $(CXXFLAGS) -o plugins/$*.o -c plugins/$*.cpp
+ $(CXX) $(LDFLAGS) -o ../plugins/$*.so plugins/$*.o -shared
###############################################################################
#
@@ -58,13 +58,13 @@ test: /tmp/test.wav ../snd/noise.wav alw
-sndfile-play /tmp/test.wav
@echo Test complete.
-install: targets
- -mkdirhier $(INSTALL_PLUGINS_DIR)
- -mkdirhier $(INSTALL_INCLUDE_DIR)
- -mkdirhier $(INSTALL_BINARY_DIR)
- cp ../plugins/* $(INSTALL_PLUGINS_DIR)
- cp ladspa.h $(INSTALL_INCLUDE_DIR)
- cp ../bin/* $(INSTALL_BINARY_DIR)
+install:
+ $(BSD_INSTALL_DATA_DIR) ${DESTDIR}$(INSTALL_PLUGINS_DIR)
+ $(BSD_INSTALL_DATA_DIR) ${DESTDIR}$(INSTALL_INCLUDE_DIR)
+ $(BSD_INSTALL_DATA_DIR) ${DESTDIR}$(INSTALL_BINARY_DIR)
+ $(BSD_INSTALL_DATA) ../plugins/* ${DESTDIR}$(INSTALL_PLUGINS_DIR)
+ $(BSD_INSTALL_DATA) ladspa.h ${DESTDIR}$(INSTALL_INCLUDE_DIR)
+ $(BSD_INSTALL_PROGRAM) ../bin/* ${DESTDIR}$(INSTALL_BINARY_DIR)
/tmp/test.wav: targets ../snd/noise.wav
../bin/listplugins
@@ -82,7 +82,7 @@ install: targets
../plugins/delay.so delay_5s 1 0.1 \
../plugins/amp.so amp_mono 4 \
-targets: $(PLUGINS) $(PROGRAMS)
+all: $(PLUGINS) $(PROGRAMS)
###############################################################################
#
@@ -90,17 +90,17 @@ targets: $(PLUGINS) $(PROGRAMS)
#
../bin/applyplugin: applyplugin.o load.o default.o
- $(CC) $(CFLAGS) $(LIBRARIES) \
+ $(CC) $(CFLAGS) $(LDFLAGS) $(LIBRARIES) \
-o ../bin/applyplugin \
applyplugin.o load.o default.o
../bin/analyseplugin: analyseplugin.o load.o default.o
- $(CC) $(CFLAGS) $(LIBRARIES) \
+ $(CC) $(CFLAGS) $(LDFLAGS) $(LIBRARIES) \
-o ../bin/analyseplugin \
analyseplugin.o load.o default.o
../bin/listplugins: listplugins.o search.o
- $(CC) $(CFLAGS) $(LIBRARIES) \
+ $(CC) $(CFLAGS) $(LDFLAGS) $(LIBRARIES) \
-o ../bin/listplugins \
listplugins.o search.o
|