-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathMakefile.inc
66 lines (51 loc) · 1.5 KB
/
Makefile.inc
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
# Makefile for vamp-aubio. This file gets included from platform specific makefiles.
#
# To build on OSX, use:
#
# $ make -f Makefile.osx
#
# To build on linux, use:
#
# $ make -f Makefile.linux
#
# To build with mingw32, use:
#
# $ make -f Makefile.mingw
# Defaults, overridden from the platform-specific Makefile
VAMPSDK_DIR ?= ./contrib/vamp-plugin-sdk-2.6
PLUGIN_EXT ?= .so
CXX ?= g++
CC ?= gcc
CFLAGS := $(ARCHFLAGS) $(CFLAGS)
CXXFLAGS := $(CFLAGS) -I$(VAMPSDK_DIR) $(CXXFLAGS)
LDFLAGS := $(ARCHFLAGS) -L$(VAMPSDK_DIR) $(LDFLAGS)
PLUGIN_LDFLAGS := $(LDFLAGS) $(PLUGIN_LDFLAGS)
# Location of our plugins
#
PLUGINDIR = plugins
PLUGIN_OBJECTS = libmain.o $(patsubst %.cpp,%.o,$(wildcard $(PLUGINDIR)/*.cpp))
PLUGIN_HEADERS = $(patsubst %.cpp,%.h,$(wildcard $(PLUGINDIR)/*.cpp))
PLUGIN_TARGET = vamp-aubio$(PLUGIN_EXT)
# use local aubio, can be build with ./scripts/get_aubio.sh
CXXFLAGS := $(CXXFLAGS) -I./contrib/aubio-dist/include
all: $(PLUGIN_TARGET)
$(PLUGIN_TARGET): $(PLUGIN_OBJECTS) $(PLUGIN_HEADERS)
$(CXX) -o $@ $(PLUGIN_OBJECTS) $(PLUGIN_LDFLAGS) $(PLUGIN_LIBS)
clean:
rm -f $(PLUGIN_OBJECTS)
distclean: clean
rm -f $(PLUGIN_TARGET) *~ */*~
WAFCMD=python waf
WAFURL=https://waf.io/waf-1.9.6
checkwaf:
@[ -f waf ] || make getwaf
getwaf:
./scripts/get_waf.sh
expandwaf: getwaf
[ -d wafilb ] || rm -fr waflib
$(WAFCMD) --help > /dev/null
mv .waf*/waflib . && rm -fr .waf*
sed '/^#==>$$/,$$d' waf > waf2 && mv waf2 waf
chmod +x waf && chmod -R go-w waflib
cleanwaf:
rm -rf waf waflib .waf*