annotate skeleton/Makefile.inc @ 433:f8a3bd2d86cb

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