Skip to content

Commit

Permalink
Add VAMP plugin skeleton
Browse files Browse the repository at this point in the history
  • Loading branch information
trishume committed Jan 28, 2016
1 parent d4e83aa commit 3d11362
Show file tree
Hide file tree
Showing 10 changed files with 501 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
@@ -0,0 +1,2 @@
*.o
*.dylib
73 changes: 73 additions & 0 deletions Makefile.inc
@@ -0,0 +1,73 @@

## Makefile for Vamp plugin builds using command-line tools.
##
## This file defines all of the system-independent information about
## your project: the list of source files, plugin library name, etc.
## Edit this file to make sure it has all the right information.
##
## This file does not define the system-specific stuff such as which
## compiler to use -- that goes into Makefile.osx, Makefile.mingw32,
## Makefile.linux etc. Those files all include this file, so that
## they all have a consistent set of project data.
##
## To build the plugin project, type
##
## $ gmake -f Makefile.osx
##
## or whatever the equivalent filename suffix is for your platform.
##
## This requires GNU make, which is what you get with OS/X, Linux, or
## MinGW/Cygwin on Windows.
##
## (For Windows builds using MS Visual Studio, start instead with the
## VampExamplePlugins project found in the build directory of the SDK.)


# Edit this to the base name of your plugin library
#
PLUGIN_LIBRARY_NAME := popclick

# Edit this to list the .cpp or .c files in your plugin project
#
PLUGIN_SOURCES := PopDetector.cpp plugins.cpp

# Edit this to list the .h files in your plugin project
#
PLUGIN_HEADERS := PopDetector.h


## Normally you should not edit anything below this line

SRC_DIR := .

CFLAGS := $(ARCHFLAGS) $(CFLAGS)
CXXFLAGS := $(CFLAGS) -I. -I$(VAMPSDK_DIR) $(CXXFLAGS)

LDFLAGS := $(ARCHFLAGS) $(LDFLAGS)
PLUGIN_LDFLAGS := $(LDFLAGS) $(PLUGIN_LDFLAGS)

# Defaults, overridden from the platform-specific Makefile
VAMPSDK_DIR ?= ../vamp-plugin-sdk
PLUGIN_EXT ?= .so
CXX ?= g++
CC ?= gcc

PLUGIN := $(PLUGIN_LIBRARY_NAME)$(PLUGIN_EXT)

PLUGIN_OBJECTS := $(PLUGIN_SOURCES:.cpp=.o)
PLUGIN_OBJECTS := $(PLUGIN_OBJECTS:.c=.o)

$(PLUGIN): $(PLUGIN_OBJECTS)
$(CXX) -o $@ $^ $(PLUGIN_LDFLAGS)

$(PLUGIN_OBJECTS): $(PLUGIN_HEADERS)

clean:
rm -f $(PLUGIN_OBJECTS)

distclean: clean
rm -f $(PLUGIN)

depend:
makedepend -Y -fMakefile.inc $(PLUGIN_SOURCES) $(PLUGIN_HEADERS)

38 changes: 38 additions & 0 deletions Makefile.linux
@@ -0,0 +1,38 @@

## Makefile for Vamp plugin using GNU tools on Linux.
##
## Edit this to adjust compiler and library settings when
## building for Linux.
##
## Note that the list of source files, etc, goes in Makefile.inc
## instead so that it can be included by all platform Makefiles.


# For a debug build...

CFLAGS := -Wall -Wextra -g -fPIC

# ... or for a release build

#CFLAGS := -Wall -Wextra -O3 -msse -msse2 -mfpmath=sse -ftree-vectorize -fPIC


# Location of Vamp plugin SDK relative to the project directory

VAMPSDK_DIR := ../vamp-plugin-sdk


# Libraries and linker flags required by plugin: add any -l<library>
# options here

PLUGIN_LDFLAGS := -shared -Wl,-Bsymbolic -Wl,-z,defs -Wl,--version-script=vamp-plugin.map $(VAMPSDK_DIR)/libvamp-sdk.a


# File extension for plugin library on this platform

PLUGIN_EXT := .so


include Makefile.inc


43 changes: 43 additions & 0 deletions Makefile.mingw32
@@ -0,0 +1,43 @@

## Makefile for Vamp plugin using MinGW tools on Windows.
##
## Edit this to adjust compiler and library settings when
## building using MinGW.
##
## Note that the list of source files, etc, goes in Makefile.inc
## instead so that it can be included by all platform Makefiles.

TOOLPREFIX ?=
CXX = $(TOOLPREFIX)g++
CC = $(TOOLPREFIX)gcc
LD = $(TOOLPREFIX)g++
AR = $(TOOLPREFIX)ar
RANLIB = $(TOOLPREFIX)ranlib


# For a debug build...

CFLAGS := -Wall -Wextra -g

# ... or for a release build

#CFLAGS := -Wall -Wextra -O3 -ftree-vectorize


# Location of Vamp plugin SDK relative to the project directory

VAMPSDK_DIR := ../vamp-plugin-sdk


# Libraries and linker flags required by plugin: add any -l<library>
# options here

PLUGIN_LDFLAGS := -shared -static -Wl,--retain-symbols-file=vamp-plugin.list $(VAMPSDK_DIR)/libvamp-sdk.a


# File extension for plugin library on this platform

PLUGIN_EXT := .dll


include Makefile.inc
43 changes: 43 additions & 0 deletions Makefile.osx
@@ -0,0 +1,43 @@

## Makefile for Vamp plugin using command-line tools on OS/X.
##
## Edit this to adjust compiler and library settings when
## building for OS/X.
##
## Note that the list of source files, etc, goes in Makefile.inc
## instead so that it can be included by all platform Makefiles.


# For a debug build...

CFLAGS := -Wall -Wextra -g -fPIC

# ... or for a release build

#CFLAGS := -Wall -Wextra -O3 -fPIC


# Flags to determine processor architecture and system SDK

ARCHFLAGS ?= -mmacosx-version-min=10.7 -arch x86_64 -stdlib=libc++


# Location of Vamp plugin SDK relative to the project directory

VAMPSDK_DIR := /usr/local/lib


# Libraries and linker flags required by plugin: add any -l<library>
# options here

PLUGIN_LDFLAGS := -dynamiclib -exported_symbols_list vamp-plugin.list $(VAMPSDK_DIR)/libvamp-sdk.a


# File extension for plugin library on this platform

PLUGIN_EXT := .dylib


include Makefile.inc


0 comments on commit 3d11362

Please sign in to comment.