How to compile a plugin for linux (scons)
Following is an example SConstruct file taken from Blackrain's SVF package.
Modify this with your headers path, plugin name, source file, and any compiler options you want.
Place this SConstruct file in the same directory with your source code.
Executing `scons` in this directory should then produce a shared object file which you can install in your plugins directory.
# linux scons build script. # BlackrRain # edit this to point to your SuperCollider3 headers headers = '../SuperCollider3/Headers' Environment( CPPPATH = [headers + '/common', headers + '/plugin_interface', headers + '/server'], CPPDEFINES = ['SC_LINUX', '_REENTRANT', 'NDEBUG', ('SC_MEMORY_ALIGNMENT', 1)], CCFLAGS = ['-Wno-unknown-pragmas'], CXXFLAGS = ['-Wno-deprecated'], SHLIBPREFIX = '', SHLIBSUFFIX = '.so' ).SharedLibrary('SVFUGen', ['SVF.cpp'])
How to compile a plugin for linux (old make system)
John Yates:
Date: 19 November 2004 18:05:59 CET
Subject: Re: [sc-users] Compile Plugin using Linux
Put your .cpp source file in the
SuperCollider3/source/pluginsdirectory. Add entries for the new file in
SuperCollider3/source/plugins/Makefile.amAdd to plugin_LTLIBRARIES, and make new la_SOURCES and la_LDFLAGS entries.
Put your .sc class file somewhere in your library path like
/usr/local/share/SuperCollider/SCClassLibrary/Linuxor if you have your own library set up, then put it there.
Re-configure/make SC as usual and you should be ready to go.
added by till