-
Notifications
You must be signed in to change notification settings - Fork 4
/
makefile.mingw
40 lines (34 loc) · 2.26 KB
/
makefile.mingw
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
CC = gcc
CXXFLAGS = -Wall -O3 -ggdb -std=c++1y -fPIC -I. -I./win/ -I/mingw64/include -D__EMSCRIPTEN__ #-flto
CFLAGS = -Wall -O3 -ggdb -fPIC -Wno-unknown-pragmas -Wno-incompatible-pointer-types -DHAVE_WINDOWS_H=1 #-flto
BINS = ./bin/libjukebox.dll ./bin/test.exe ./bin/play.exe ./bin/loop.exe ./bin/soundShell.exe ./bin/soundfontDemo.exe
LDFLAGS = -ldxguid -ldsound -lwinmm -L/mingw64/lib #-flto
include makefile.common
objects += ./win/Sound/DirectSoundBuffer.o ./win/Mixer/WindowsMixer.o \
./win/Sound/States/DirectSoundPaused.o ./win/Sound/States/DirectSoundPlaying.o \
./win/Sound/States/DirectSoundState.o ./win/Sound/States/DirectSoundStopped.o
SRCS += ./win/Sound/DirectSoundBuffer.cpp ./win/Mixer/WindowsMixer.cpp \
./win/Sound/States/DirectSoundPaused.cpp ./win/Sound/States/DirectSoundPlaying.cpp \
./win/Sound/States/DirectSoundState.cpp ./win/Sound/States/DirectSoundStopped.cpp
all : $(BINS)
./bin/libjukebox.dll : $(objects)
g++ -std=c++1y -ggdb -Wall $(objects) -shared $(LDFLAGS) -o ./bin/libjukebox.dll
./bin/test.exe : genheader ./jukebox_test/demo/main.o ./bin/libjukebox.dll
g++ -std=c++1y -ggdb -Wall ./jukebox_test/demo/main.o -Lbin -ljukebox -o ./bin/test.exe #-flto
./bin/play.exe : genheader ./jukebox_test/demo/play.o ./bin/libjukebox.dll
g++ -std=c++1y -ggdb -Wall ./jukebox_test/demo/play.o -Lbin -ljukebox -o ./bin/play.exe #-flto
./bin/loop.exe : genheader ./jukebox_test/demo/loop.o ./bin/libjukebox.dll
g++ -std=c++1y -ggdb -Wall ./jukebox_test/demo/loop.o -Lbin -ljukebox -o ./bin/loop.exe #-flto
./bin/soundShell.exe : genheader ./jukebox_test/demo/soundShell.o ./bin/libjukebox.dll
g++ -std=c++1y -ggdb -Wall ./jukebox_test/demo/soundShell.o -L/mingw64/lib -Lbin -ljukebox -llua -o ./bin/soundShell.exe #-flto
./bin/soundfontDemo.exe : genheader ./jukebox_test/demo/soundfontDemo.o ./bin/libjukebox.dll
g++ -std=c++1y -ggdb -Wall ./jukebox_test/demo/soundfontDemo.o -Lbin -ljukebox -o ./bin/soundfontDemo.exe #-flto
.PHONY : clean genheader
genheader :
./genheader.sh
clean :
rm -rf $(DEPDIR) $(objects) ./jukebox_test/demo/*.o $(BINS)
$(shell mkdir -p $(DEPDIR)/win >/dev/null)
$(shell mkdir -p $(DEPDIR)/win/Mixer >/dev/null)
$(shell mkdir -p $(DEPDIR)/win/Sound >/dev/null)
$(shell mkdir -p $(DEPDIR)/win/Sound/States >/dev/null)