1 ################################################################################
3 # CROSSCOMPILATION FROM LINUX OF VST PLUGINS FOR WINDOWS
4 # Faust Project, Y. Orlarey - Grame
6 ################################################################################
8 #------------------------------------------------------------------------------
9 # 1/ VST SDK Should be installed somewhere
10 VST=/usr/local/lib/vstsdk2.4
12 #------------------------------------------------------------------------------
13 # 2/ mingw crosscompiler should be installed ('mingw32' package on Ubuntu)
15 CROSS=i586-mingw32msvc-
17 CXXFLAGS=-I$(VST) -I$(VST)/public.sdk/source/vst2.x -DBUILDING_DLL -mno-cygwin
19 DLLWRAP=$(CROSS)dllwrap --target=i386-mingw32 -mno-cygwin
23 #------------------------------------------------------------------------------
24 # 3/ we transform all .dsp Faust codes into the corresponding dll
25 DSP= $(wildcard *.dsp)
26 DLL= $(addprefix $(DEST), $(DSP:.dsp=.dll))
28 ##PLUGIN= $(SRC:.dsp=)
34 # how to generate the cpp file from the faust source
36 faust -a vst2p4.cpp $< -o $@
38 # we need to create the .def file needed to generate the .dll
40 @echo LIBRARY $(@:.def=) > $@
41 @echo DESCRIPTION \'Faust generated VST plugin\' >> $@
42 @echo EXPORTS main=VSTPluginMain >> $@
45 $(DEST)%.dll: $(DEST)%.o $(DEST)%.def $(DEST)audioeffect.o $(DEST)audioeffectx.o $(DEST)vstplugmain.o
46 $(DLLWRAP) --driver-name $(CXX) --def $(@:.dll=.def) $^ -o $@
49 $(DEST)audioeffect.o: $(VST)/public.sdk/source/vst2.x/audioeffect.cpp
50 $(CXX) $(CXXFLAGS) -c $< -o $@
52 $(DEST)audioeffectx.o: $(VST)/public.sdk/source/vst2.x/audioeffectx.cpp
53 $(CXX) $(CXXFLAGS) -c $< -o $@
55 $(DEST)vstplugmain.o: $(VST)/public.sdk/source/vst2.x/vstplugmain.cpp
56 $(CXX) $(CXXFLAGS) -c $< -o $@