annotate Makefile.inc @ 37:44d8e5dc1902

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