Import('env')

my_list =  Split("""
archive.cpp
args.cpp
aviout.cpp
cdlogger.cpp
cheat.cpp
common.cpp
config.cpp
debugger.cpp
debuggersp.cpp
directories.cpp
gui.cpp
guiconfig.cpp
help.cpp
input.cpp
joystick.cpp
keyboard.cpp
log.cpp
main.cpp
mapinput.cpp
memview.cpp
memviewsp.cpp
memwatch.cpp
monitor.cpp
netplay.cpp
ntview.cpp
OutputDS.cpp
palette.cpp
ppuview.cpp
pref.cpp
replay.cpp
sound.cpp
state.cpp
tasedit.cpp
texthook.cpp
throttle.cpp
timing.cpp
tracer.cpp
video.cpp
wave.cpp
Win32InputBox.cpp
window.cpp 
""")

# TODO this is probably .obj if built on a Windows system...
my_list.append('res.o')
env.Command('res.o', 'res.rc', env['WINDRES'] + ' -Isrc/drivers/win -DLVS_OWNERDATA=0x1000 -o $TARGET $SOURCE')

subdirs = Split("""
directx
zlib""")

for x in range(len(my_list)):
  my_list[x] = 'drivers/win/' + my_list[x]

for dir in subdirs:
  subdir_files = SConscript('%s/SConscript' % dir)
  my_list.append(subdir_files)

Return('my_list')
