summaryrefslogtreecommitdiff
path: root/vst/Makefile.mingw32
blob: e4f91274c39299ed1040d7686593c71d118c745e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
VST_BASE = vstsdk2.4
VST_SRC_BASE = ${VST_BASE}/public.sdk/source/vst2.x/
VST_SRC = \
	${VST_SRC_BASE}/audioeffectx.cpp \
	${VST_SRC_BASE}/audioeffect.cpp \
	${VST_SRC_BASE}/vstplugmain.cpp

DG_BASE = ..
DG_SRC = \
	${DG_BASE}/src/audiofile.cc \
	${DG_BASE}/src/configuration.cc \
	${DG_BASE}/src/channel.cc \
	${DG_BASE}/src/channelmixer.cc \
	${DG_BASE}/src/drumgizmo.cc \
	${DG_BASE}/src/drumkit.cc \
	${DG_BASE}/src/drumkitparser.cc \
	${DG_BASE}/src/events.cc \
	${DG_BASE}/src/instrument.cc \
	${DG_BASE}/src/instrumentparser.cc \
	${DG_BASE}/src/midimapparser.cc \
	${DG_BASE}/src/midimapper.cc \
	${DG_BASE}/src/mutex.cc \
	${DG_BASE}/src/path.cc \
	${DG_BASE}/src/sample.cc \
	${DG_BASE}/src/saxparser.cc \
	${DG_BASE}/src/velocity.cc
DG_FLAGS = -I../include -I../src -DSSE -msse -msse2

GUI_SRC = \
	$(DG_BASE)/plugingui/plugingui.cc \
	$(DG_BASE)/plugingui/globalcontext.cc \
	$(DG_BASE)/plugingui/label.cc \
	$(DG_BASE)/plugingui/eventhandler.cc \
	$(DG_BASE)/plugingui/font.cc \
	$(DG_BASE)/plugingui/window.cc \
	$(DG_BASE)/plugingui/widget.cc \
	$(DG_BASE)/plugingui/colour.cc \
	$(DG_BASE)/plugingui/painter.cc \
	$(DG_BASE)/plugingui/button.cc \
	$(DG_BASE)/plugingui/pixelbuffer.cc \
	$(DG_BASE)/plugingui/filelineedit.cc \
	$(DG_BASE)/plugingui/lineedit.cc \
	$(DG_BASE)/plugingui/led.cc \
	$(DG_BASE)/plugingui/checkbox.cc \
	$(DG_BASE)/plugingui/slider.cc

GUI_FLAGS=-lgdi32 -I../plugingui

#
# http://old.nabble.com/using-VC%2B%2B-.lib-with-mingw-td23151303.html
# Given `-lfoo', the win32 build of GNU ld will search for libfoo.a and foo.lib
#

EXPAT_BASE=c:/expat
EXPAT_FLAGS=-I${EXPAT_BASE}/Source/lib -L${EXPAT_BASE}/Bin -llibexpat

SNDFILE_BASE=c:/libsndfile
SNDFILE_FLAGS=-I${SNDFILE_BASE}/include -L${SNDFILE_BASE}/lib -llibsndfile-1

SRC = \
	drumgizmo_vst.cc \
	input_vst.cc \
	output_vst.cc

all:
	g++ -g -Wall -DWIN32 ${DG_FLAGS} -I${VST_BASE} ${DG_SRC} ${VST_SRC} ${SRC} ${GUI_SRC} ${GUI_FLAGS} ${EXPAT_FLAGS} ${SNDFILE_FLAGS} -shared -o drumgizmo_vst.dll -Wl,--out-implib,libdrumgizmo_vst.a

clean:
	rm -f drumgizmo_vst.dll libdrumgizmo_vst.a

#LDFLAGS="-g -Wall -DWIN32 ${DG_FLAGS} ${EXPAT_FLAGS} ${SNDFILE_FLAGS} -I${VST_BASE}"
#CFLAGS=$(LDFLAGS)
#SOURCES="$(DG_SRC) $(VST_SRC) $(SRC)"
#OBJECTS=$(SOURCES:.cc=.o)
#
#all: drumgizmo_vst.dll
#
#drumgizmo_vst.dll: $(OBJECTS)
#	g++ $(OBJECTS) $(LDFLAGS) -shared -o drumgizmo_vst.dll -Wl,--out-implib,libdrumgizmo_vst.a
#
#%.o: %.cc
#	g++ -c $(CFLAGS) $< -o $@
#
#clean:
#	del -rf *.o drumgizmo_vst.dll libdrumgizmo_vst.a