comparison skeleton/Makefile.inc @ 378:29a73259f59a

Split out big Makefile into Makefile.inc and platform-specific Makefiles
author Chris Cannam
date Fri, 05 Sep 2014 09:31:00 +0100
parents skeleton/Makefile.skeleton@d5c5a52e6c9f
children 853640243f3d
comparison
equal deleted inserted replaced
368:0ca8e104e8b1 378:29a73259f59a
1
2 ## Makefile for Vamp plugin builds using command-line tools.
3 ##
4 ## This file defines all of the system-independent information about
5 ## your project: the list of source files, plugin library name, etc.
6 ## Edit this file to make sure it has all the right information.
7 ##
8 ## This file does not define the system-specific stuff such as which
9 ## compiler to use -- that goes into Makefile.osx, Makefile.mingw32,
10 ## Makefile.linux etc. Those files all include this file, so that
11 ## they all have a consistent set of project data.
12 ##
13 ## To build the plugin project, type
14 ##
15 ## $ gmake -f Makefile.osx
16 ##
17 ## or whatever the equivalent filename suffix is for your platform.
18 ##
19 ## This requires GNU make, which is what you get with OS/X, Linux, or
20 ## MinGW/Cygwin on Windows.
21 ##
22 ## (For Windows builds using MS Visual Studio, start instead with the
23 ## VampExamplePlugins project found in the build directory of the SDK.)
24
25
26 # Edit this to the base name of your plugin library
27 #
28 PLUGIN_LIBRARY_NAME := myplugins
29
30 # Edit this to list the .cpp or .c files in your plugin project
31 #
32 PLUGIN_SOURCES := MyPlugin.cpp plugins.cpp
33
34 # Edit this to list the .h files in your plugin project
35 #
36 PLUGIN_HEADERS := MyPlugin.h
37
38
39 ## Normally you should not edit anything below this line
40
41 SRC_DIR := .
42
43 CFLAGS := $(ARCHFLAGS) $(CFLAGS)
44 CXXFLAGS := $(CFLAGS) -I. -I$(VAMPSDK_DIR) -I$(CQ_DIR) -I$(BQVEC_DIR) -I$(FD_DIR) $(CXXFLAGS)
45
46 LDFLAGS := $(ARCHFLAGS) $(LDFLAGS)
47 PLUGIN_LDFLAGS := $(LDFLAGS) $(PLUGIN_LDFLAGS)
48
49 # Defaults, overridden from the platform-specific Makefile
50 VAMPSDK_DIR ?= ../vamp-plugin-sdk
51 PLUGIN_EXT ?= .so
52 CXX ?= g++
53 CC ?= gcc
54
55 PLUGIN := $(PLUGIN_LIBRARY_NAME)$(PLUGIN_EXT)
56
57 PLUGIN_OBJECTS := $(PLUGIN_SOURCES:.cpp=.o)
58 PLUGIN_OBJECTS := $(PLUGIN_OBJECTS:.c=.o)
59
60 $(PLUGIN): $(PLUGIN_OBJECTS)
61 $(CXX) -o $@ $^ $(LDFLAGS)
62
63 $(PLUGIN_OBJECTS): $(PLUGIN_HEADERS)
64
65 clean:
66 rm -f $(OBJECTS)
67
68 distclean: clean
69 rm -f $(PLUGIN)
70
71 depend:
72 makedepend -Y -fMakefile.inc $(SOURCES) $(HEADERS)
73