-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile.linux-pulse
172 lines (161 loc) · 4.92 KB
/
Makefile.linux-pulse
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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
TARGET=pulse-testbench
.DEFAULT_GOAL=pulse-testbench
CC:=ccache gcc
CXX:=ccache g++
AR:=ar
INC_PATHS:=-Iaosdk
INC_PATHS+=-Igme-source
INC_PATHS+=-Ivio2sf
INC_PATHS+=-Ixz-embedded
INC_PATHS+=-Izlib
LIBS:=libxzdec.a libvio2sf.a libaosdk.a libz.a libgme.a
MAIN_LDFLAGS:=-lpulse-simple -lxzdec -lvio2sf -laosdk -lz -lgme -L.
# build the core
MAIN_C_SOURCES:=pulse-main.c \
plugin-libgme.c \
plugin-vio2sf.c \
plugin-aosdk.c \
xzdec.c
MAIN_CFLAGS:=-Wall -g $(INC_PATHS)
MAIN_C_OBJECTS:=$(patsubst %.c,%.o,$(MAIN_C_SOURCES))
$(MAIN_C_OBJECTS) : %.o : %.c
$(CC) -o $@ -c $< $(MAIN_CFLAGS)
$(TARGET): $(MAIN_C_OBJECTS) $(MAIN_CXX_OBJECTS) $(LIBS)
$(CXX) -o $(TARGET) $(MAIN_C_OBJECTS) $(MAIN_CXX_OBJECTS) $(MAIN_CFLAGS) $(MAIN_LDFLAGS)
# build the XZ decoder
XZ_LIB_TARGET:=libxzdec.a
XZ_C_SOURCES:=xz-embedded/xz_crc32.c \
xz-embedded/xz_dec_lzma2.c \
xz-embedded/xz_dec_stream.c
XZ_CFLAGS:=-Wall -g
XZ_C_OBJECTS:=$(patsubst %.c,%.o,$(XZ_C_SOURCES))
$(XZ_C_OBJECTS) : %.o : %.c
$(CC) -o $@ -c $< $(XZ_CFLAGS)
$(XZ_LIB_TARGET): $(XZ_C_OBJECTS)
$(AR) r $@ $^
# build the Vio2sf engine
VIO2SF_LIB_TARGET:=libvio2sf.a
VIO2SF_C_SOURCES:=vio2sf/corlett.c \
vio2sf/vio2sf.c \
vio2sf/desmume/MMU.c \
vio2sf/desmume/mc.c \
vio2sf/desmume/thumb_instructions.c \
vio2sf/desmume/cp15.c \
vio2sf/desmume/FIFO.c \
vio2sf/desmume/arm_instructions.c \
vio2sf/desmume/GPU.c \
vio2sf/desmume/SPU.c \
vio2sf/desmume/armcpu.c \
vio2sf/desmume/bios.c \
vio2sf/desmume/matrix.c \
vio2sf/desmume/NDSSystem.c
VIO2SF_CFLAGS:=-Wall -g
VIO2SF_C_OBJECTS:=$(patsubst %.c,%.o,$(VIO2SF_C_SOURCES))
$(VIO2SF_C_OBJECTS) : %.o : %.c
$(CC) -o $@ -c $< $(VIO2SF_CFLAGS)
$(VIO2SF_LIB_TARGET): $(VIO2SF_C_OBJECTS)
$(AR) r $@ $^
# build the AOSDK engine
AOSDK_LIB_TARGET:=libaosdk.a
AOSDK_C_SOURCES:=aosdk/corlett.c \
aosdk/eng_dsf/eng_dsf.c \
aosdk/eng_dsf/dc_hw.c \
aosdk/eng_dsf/arm7.c \
aosdk/eng_dsf/arm7i.c \
aosdk/eng_dsf/aica.c \
aosdk/eng_dsf/aicadsp.c \
aosdk/eng_ssf/scspdsp.c \
aosdk/eng_ssf/m68kopnz.c \
aosdk/eng_ssf/m68kcpu.c \
aosdk/eng_ssf/scsp.c \
aosdk/eng_ssf/sat_hw.c \
aosdk/eng_ssf/m68kops.c \
aosdk/eng_ssf/m68kopac.c \
aosdk/eng_ssf/eng_ssf.c \
aosdk/eng_ssf/m68kopdm.c \
aosdk/eng_psf/psx.c \
aosdk/eng_psf/eng_psf2.c \
aosdk/eng_psf/eng_psf.c \
aosdk/eng_psf/eng_spu.c \
aosdk/eng_psf/psx_hw.c \
aosdk/eng_psf/peops2/spu.c \
aosdk/eng_psf/peops2/dma.c \
aosdk/eng_psf/peops2/registers.c \
aosdk/eng_psf/peops/spu.c
AOSDK_CFLAGS:=-Wall -g -Iaosdk -D__LITTLE_ENDIAN__
AOSDK_C_OBJECTS:=$(patsubst %.c,%.o,$(AOSDK_C_SOURCES))
$(AOSDK_C_OBJECTS) : %.o : %.c
$(CC) -o $@ -c $< $(AOSDK_CFLAGS)
$(AOSDK_LIB_TARGET): $(AOSDK_C_OBJECTS)
$(AR) r $@ $^
# build the zlib decoder
ZLIB_LIB_TARGET:=libz.a
ZLIB_C_SOURCES:=zlib/adler32.c \
zlib/crc32.c \
zlib/infback.c \
zlib/inffast.c \
zlib/inflate.c \
zlib/zutil.c \
zlib/inftrees.c \
zlib/uncompr.c
ZLIB_CFLAGS:=-Wall -g
ZLIB_C_OBJECTS:=$(patsubst %.c,%.o,$(ZLIB_C_SOURCES))
$(ZLIB_C_OBJECTS) : %.o : %.c
$(CC) -o $@ -c $< $(ZLIB_CFLAGS)
$(ZLIB_LIB_TARGET): $(ZLIB_C_OBJECTS)
$(AR) r $@ $^
# build the GME engine
GME_LIB_TARGET:=libgme.a
GME_CXX_SOURCES:=gme-source/Ay_Apu.cpp \
gme-source/Ay_Cpu.cpp \
gme-source/Ay_Emu.cpp \
gme-source/Blip_Buffer.cpp \
gme-source/Classic_Emu.cpp \
gme-source/Data_Reader.cpp \
gme-source/Dual_Resampler.cpp \
gme-source/Effects_Buffer.cpp \
gme-source/Fir_Resampler.cpp \
gme-source/Gb_Apu.cpp \
gme-source/Gb_Cpu.cpp \
gme-source/Gb_Oscs.cpp \
gme-source/Gbs_Emu.cpp \
gme-source/gme.cpp \
gme-source/Gme_File.cpp \
gme-source/Gym_Emu.cpp \
gme-source/Hes_Apu.cpp \
gme-source/Hes_Cpu.cpp \
gme-source/Hes_Emu.cpp \
gme-source/Kss_Cpu.cpp \
gme-source/Kss_Emu.cpp \
gme-source/Kss_Scc_Apu.cpp \
gme-source/M3u_Playlist.cpp \
gme-source/Multi_Buffer.cpp \
gme-source/Music_Emu.cpp \
gme-source/Nes_Apu.cpp \
gme-source/Nes_Cpu.cpp \
gme-source/Nes_Fme7_Apu.cpp \
gme-source/Nes_Namco_Apu.cpp \
gme-source/Nes_Oscs.cpp \
gme-source/Nes_Vrc6_Apu.cpp \
gme-source/Nsfe_Emu.cpp \
gme-source/Nsf_Emu.cpp \
gme-source/Sap_Apu.cpp \
gme-source/Sap_Cpu.cpp \
gme-source/Sap_Emu.cpp \
gme-source/Sms_Apu.cpp \
gme-source/Snes_Spc.cpp \
gme-source/Spc_Cpu.cpp \
gme-source/Spc_Dsp.cpp \
gme-source/Spc_Emu.cpp \
gme-source/Vgm_Emu.cpp \
gme-source/Vgm_Emu_Impl.cpp \
gme-source/Ym2413_Emu.cpp \
gme-source/Ym2612_Emu.cpp
GME_CXX_CXXFLAGS:=-Wall -g
GME_CXX_OBJECTS:=$(patsubst %.cpp,%.o,$(GME_CXX_SOURCES))
$(GME_CXX_OBJECTS) : %.o : %.cpp
$(CXX) -o $@ -c $< $(GME_CXXFLAGS)
$(GME_LIB_TARGET): $(GME_CXX_OBJECTS)
$(AR) r $@ $^
clean:
rm -f $(TARGET) $(LIBS) $(MAIN_C_OBJECTS) $(XZ_C_OBJECTS) $(VIO2SF_C_OBJECTS) $(AOSDK_C_OBJECTS) $(ZLIB_C_OBJECTS) $(GME_CXX_OBJECTS)