forked from aubio/vamp-aubio-plugins
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
46 lines (31 loc) · 1.05 KB
/
Makefile
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
# Location of our plugins
#
PLUGINDIR = plugins
# Compile flags
#
CFLAGS := -fPIC -DDEBUG -O2 -Wall $(CFLAGS)
CXXFLAGS := $(CFLAGS)
LDFLAGS := -laubio $(LDFLAGS)
# Libraries required for the plugins.
#
PLUGIN_LIBS = -Wl,-Bstatic -lvamp-sdk -Wl,-Bdynamic
# Flags required to tell the compiler to make a dynamically loadable object
#
PLUGIN_LDFLAGS = -shared -Wl,-Bsymbolic -Wl,--version-script=vamp-plugin.map
# File extension for a dynamically loadable object
#
PLUGIN_EXT = .so
## For OS/X with g :
#PLUGIN_LDFLAGS = -dynamiclib -exported_symbols_list=vamp-plugin.list
#PLUGIN_EXT = .dylib
### End of user-serviceable parts
PLUGIN_OBJECTS = libmain.o $(patsubst %.cpp,%.o,$(wildcard $(PLUGINDIR)/*.cpp))
PLUGIN_HEADERS = $(patsubst %.cpp,%.h,$(wildcard $(PLUGINDIR)/*.cpp))
PLUGIN_TARGET = vamp-aubio$(PLUGIN_EXT)
all: $(PLUGIN_TARGET)
$(PLUGIN_TARGET): $(PLUGIN_OBJECTS) $(PLUGIN_HEADERS)
$(CXX) $(LDFLAGS) $(PLUGIN_LDFLAGS) -o $@ $(PLUGIN_OBJECTS) $(PLUGIN_LIBS)
clean:
rm -f $(PLUGIN_OBJECTS)
distclean: clean
rm -f $(PLUGIN_TARGET) *~ */*~