scons: dynamically generate the build source list

This commit is contained in:
punkrockguy318 2012-12-01 21:54:02 +00:00
parent fb0a9dd2ff
commit 969258d32a
8 changed files with 42 additions and 284 deletions

View File

@ -1,32 +1,6 @@
file_list = Split(""" import glob
asm.cpp file_list = glob.glob('*.cpp')
cart.cpp file_list.remove('lua-engine.cpp') # use logic below for this
cheat.cpp
conddebug.cpp
config.cpp
debug.cpp
drawing.cpp
emufile.cpp
fceu.cpp
fds.cpp
file.cpp
filter.cpp
ines.cpp
input.cpp
netplay.cpp
nsf.cpp
oldmovie.cpp
palette.cpp
ppu.cpp
sound.cpp
state.cpp
unif.cpp
video.cpp
vsuni.cpp
wave.cpp
x6502.cpp
movie.cpp
""")
subdirs = Split(""" subdirs = Split("""
boards boards

View File

@ -1,149 +1,6 @@
my_list = Split(""" import glob
01-222.cpp source_list = glob.glob('*.cpp')
103.cpp
106.cpp
108.cpp
112.cpp
116.cpp
117.cpp
120.cpp
121.cpp
12in1.cpp
15.cpp
151.cpp
156.cpp
164.cpp
168.cpp
17.cpp
170.cpp
175.cpp
176.cpp
177.cpp
178.cpp
179.cpp
18.cpp
183.cpp
185.cpp
186.cpp
187.cpp
189.cpp
193.cpp
199.cpp
206.cpp
208.cpp
222.cpp
225.cpp
228.cpp
230.cpp
232.cpp
234.cpp
235.cpp
244.cpp
246.cpp
252.cpp
253.cpp
28.cpp
32.cpp
33.cpp
34.cpp
36.cpp
3d-block.cpp
40.cpp
41.cpp
411120-c.cpp
42.cpp
43.cpp
46.cpp
50.cpp
51.cpp
57.cpp
603-5052.cpp
62.cpp
68.cpp
71.cpp
72.cpp
77.cpp
79.cpp
80.cpp
8157.cpp
82.cpp
8237.cpp
830118C.cpp
88.cpp
90.cpp
91.cpp
96.cpp
99.cpp
a9711.cpp
a9746.cpp
ac-08.cpp
addrlatch.cpp
ax5705.cpp
bandai.cpp
bb.cpp
bmc13in1jy110.cpp
bmc42in1r.cpp
bmc64in1nr.cpp
bmc70in1.cpp
bonza.cpp
bs-5.cpp
cityfighter.cpp
dance2000.cpp
datalatch.cpp
deirom.cpp
dream.cpp
edu2000.cpp
famicombox.cpp
fk23c.cpp
ghostbusters63in1.cpp
gs-2004.cpp
gs-2013.cpp
h2288.cpp
karaoke.cpp
kof97.cpp
konami-qtai.cpp
ks7012.cpp
ks7013.cpp
ks7017.cpp
ks7030.cpp
ks7031.cpp
ks7032.cpp
ks7037.cpp
ks7057.cpp
le05.cpp
lh32.cpp
lh53.cpp
malee.cpp
mmc1.cpp
mmc3.cpp
mmc5.cpp
n-c22m.cpp
n106.cpp
n625092.cpp
novel.cpp
onebus.cpp
pec-586.cpp
sa-9602b.cpp
sachen.cpp
sc-127.cpp
sheroes.cpp
sl1632.cpp
smb2j.cpp
subor.cpp
super24.cpp
supervision.cpp
t-227-1.cpp
t-262.cpp
tengen.cpp
tf-1201.cpp
transformer.cpp
vrc1.cpp
vrc2and4.cpp
vrc3.cpp
vrc7.cpp
yoko.cpp
""")
for x in range(len(my_list)): for x in range(len(source_list)):
my_list[x] = 'boards/' + my_list[x] source_list[x] = 'boards/' + source_list[x]
Return('my_list') Return('source_list')

View File

@ -1,17 +1,6 @@
my_list = Split(""" import glob
args.cpp source_list = glob.glob('*.cpp') + glob.glob('*.c')
cheat.cpp
config.cpp
hq2x.cpp
hq3x.cpp
scale2x.cpp
scale3x.cpp
scalebit.cpp
vidblit.cpp
configSys.cpp
nes_ntsc.c
""")
for x in range(len(my_list)): for x in range(len(source_list)):
my_list[x] = 'drivers/common/' + my_list[x] source_list[x] = 'drivers/common/' + source_list[x]
Return('my_list') Return('source_list')

View File

@ -1,21 +1,6 @@
my_list = Split(""" import glob
arkanoid.cpp source_list = glob.glob('*.cpp')
bworld.cpp
cursor.cpp
fkb.cpp
ftrainer.cpp
hypershot.cpp
mahjong.cpp
mouse.cpp
oekakids.cpp
powerpad.cpp
quiz.cpp
shadow.cpp
suborkb.cpp
toprider.cpp
zapper.cpp
""")
for x in range(len(my_list)): for x in range(len(source_list)):
my_list[x] = 'input/' + my_list[x] source_list[x] = 'input/' + source_list[x]
Return('my_list') Return('source_list')

View File

@ -1,36 +1,8 @@
my_list = Split(""" import glob
lapi.c source_list = glob.glob('src/*.c')
lauxlib.c source_list.remove('src/lua.c')
lbaselib.c source_list.remove('src/luac.c')
lcode.c
ldblib.c
ldebug.c
ldo.c
ldump.c
lfunc.c
lgc.c
linit.c
liolib.c
llex.c
lmathlib.c
lmem.c
loadlib.c
lobject.c
lopcodes.c
loslib.c
lparser.c
lstate.c
lstring.c
lstrlib.c
ltable.c
ltablib.c
ltm.c
lundump.c
lvm.c
lzio.c
print.c
""")
for x in range(len(my_list)): for x in range(len(source_list)):
my_list[x] = 'lua/src/' + my_list[x] source_list[x] = 'lua/' + source_list[x]
Return('my_list') Return('source_list')

View File

@ -1,16 +1,6 @@
my_list = Split(""" import glob
24and26.cpp source_list = glob.glob('*.cpp') + glob.glob('*.c')
6.cpp
65.cpp for x in range(len(source_list)):
67.cpp source_list[x] = 'mappers/' + source_list[x]
69.cpp Return('source_list')
85.cpp
mmc2and4.cpp
""")
#
# emu2413.h
# mapinc.h
#
for x in range(len(my_list)):
my_list[x] = 'mappers/' + my_list[x]
Return('my_list')

View File

@ -1,7 +1,6 @@
Import('file_list') import glob
my_list = Split(""" source_list = glob.glob('*.c')
""")
for x in range(len(my_list)): for x in range(len(source_list)):
my_list[x] = 'palettes/' + my_list[x] source_list[x] = 'palettes/' + source_list[x]
file_list = my_list + file_list Return('source_list')
Export('file_list')

View File

@ -1,14 +1,6 @@
my_list = Split(""" import glob
crc32.cpp source_list = glob.glob('*.cpp')
endian.cpp
general.cpp
guid.cpp
md5.cpp
memory.cpp
unzip.cpp
xstring.cpp
""")
for x in range(len(my_list)): for x in range(len(source_list)):
my_list[x] = 'utils/' + my_list[x] source_list[x] = 'utils/' + source_list[x]
Return('my_list') Return('source_list')