summaryrefslogtreecommitdiff
path: root/vst/Makefile.mingw32
blob: 706c729ed3234033f792ff5c3c803358ab087b03 (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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
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
VST_CFLAGS=-I$(VST_BASE)

DG_SRC = \
	../src/audioinputenginemidi.cc \
	../src/audiofile.cc \
	../src/channel.cc \
	../src/channelmixer.cc \
	../src/configuration.cc \
	../src/configparser.cc \
	../src/drumgizmo.cc \
	../src/drumkit.cc \
	../src/drumkitloader.cc \
	../src/drumkitparser.cc \
	../src/events.cc \
	../src/instrument.cc \
	../src/instrumentparser.cc \
	../src/messagehandler.cc \
	../src/messagereceiver.cc \
	../src/midimapparser.cc \
	../src/midimapper.cc \
	../src/mutex.cc \
	../src/path.cc \
	../src/powerlist.cc \
	../src/sample.cc \
	../src/semaphore.cc \
	../src/saxparser.cc \
	../src/thread.cc \
	../src/velocity.cc \
	../src/versionstr.cc
DG_CFLAGS = -I.. -I../include -I../src -DSSE -msse -msse2 -DDISABLE_HUGIN

GUI_SRC = \
	../plugingui/nativewindow_x11.cc \
	../plugingui/nativewindow_win32.cc \
	../plugingui/plugingui.cc \
	../plugingui/label.cc \
	../plugingui/eventhandler.cc \
	../plugingui/font.cc \
	../plugingui/window.cc \
	../plugingui/widget.cc \
	../plugingui/colour.cc \
	../plugingui/painter.cc \
	../plugingui/button.cc \
	../plugingui/pixelbuffer.cc \
	../plugingui/lineedit.cc \
	../plugingui/led.cc \
	../plugingui/checkbox.cc \
	../plugingui/slider.cc \
	../plugingui/scrollbar.cc \
	../plugingui/listbox.cc \
	../plugingui/listboxthin.cc \
	../plugingui/listboxbasic.cc \
	../plugingui/knob.cc \
	../plugingui/filebrowser.cc \
	../plugingui/directory.cc \
	../plugingui/image.cc \
	../plugingui/combobox.cc \
	../plugingui/progressbar.cc \
	../plugingui/verticalline.cc \
	../plugingui/resource.cc \
	../plugingui/resource_data.cc \
	../plugingui/lodepng/lodepng.cpp

GUI_CFLAGS=-I../plugingui/ -DX11 
GUI_LIBS=-lgdi32 -lsetupapi -lws2_32

DBG_SRC = \
	../hugin/hugin.c \
	../hugin/hugin_syslog.c

DBG_CFLAGS=-I../hugin -DWITH_HUG_SYSLOG -DWITH_HUG_MUTEX -DDISABLE_HUGIN

#
# 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_CFLAGS=  
EXPAT_LIBS= -lexpat 
 
SNDFILE_CFLAGS=
SNDFILE_LIBS=-lsndfile 

ZLIB_CFLAGS=
ZLIB_LIBS=-L/usr/lib -lz 

SRC_CFLAGS=
SRC_LIBS=

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

#######################
#
#CXXFLAGS=-DWIN32 $(EXPAT_CFLAGS) $(SNDFILE_CFLAGS) $(DG_CFLAGS) $(GUI_CFLAGS) $(DBG_CFLAGS) $(VST_CFLAGS)
#CFLAGS=$(CXXFLAGS)
#LDFLAGS=$(EXPAT_LIBS) $(SNDFILE_LIBS) $(GUI_LIBS) $(DBG_LIBS)
#
#C_SOURCES=$(DBG_SRC)
#CXX_SOURCES=$(GUI_SRC) $(DG_SRC)
#CPP_SOURCES=$(VST_SRC) 
#
#OBJECTS=$(CXX_SOURCES:.cc=.o) $(CPP_SOURCES:.cpp=.o) $(C_SOURCES:.c=.o)
#all: $(CXX_SOURCES) $(CPP_SOURCES) $(C_SOURCES) drumgizmo_vst.dll
#
#drumgizmo_vst.dll: $(OBJECTS)
#	g++ $(CXXFLAGS) $(OBJECTS) $(LDFLAGS) -shared -o drumgizmo_vst.dll -Wl,--out-implib,libdrumgizmo_vst.a
#
#%.o: %.cc
#	g++ -O3 -c $(CXXFLAGS) $(LDFLAGS) $< -o $(notdir $@)
#
#%.o: %.cpp
#	g++ -O3 -c $(CXXFLAGS) $(LDFLAGS) $< -o $(notdir $@)
#
#%.o: %.c
#	gcc -O3 -c $(CFLAGS) $(LDFLAGS) $< -o $@
#
#clean:
#	del -f $(notdir $(OBJECTS)) drumgizmo_vst.dll libdrumgizmo_vst.a
#
########################

 
all:
	gcc $(DBG_CFLAGS) ../hugin/hugin.c -c
	gcc $(DBG_CFLAGS) ../hugin/hugin_syslog.c -c
	g++ -static -static-libgcc -O2 -g -Wall $(DBG_CFLAGS) $(DG_CFLAGS) $(DG_LIBS) $(VST_CFLAGS) hugin.o hugin_syslog.o $(DG_SRC) $(VST_SRC) ${SRC} ${GUI_SRC} ${GUI_CFLAGS} $(GUI_LIBS) $(EXPAT_CFLAGS) $(ZLIB_CFLAGS) $(SRC_CFLAGS) $(EXPAT_LIBS) $(ZLIB_LIBS) $(SNDFILE_CFLAGS) $(SNDFILE_LIBS) $(SRC_LIBS) -shared -o drumgizmo_vst.dll -Wl,--out-implib,libdrumgizmo_vst.a
 
clean:
	del -f drumgizmo_vst.dll libdrumgizmo_vst.a