
Import("env platform")

tools = Split("""
	undo.cpp
	framerate_limiter.cpp
	drawable_manager.cpp
	keymods.cpp
	replay.cpp
	profile.cpp
	winutil.cpp
	prefs.cpp
	../alchemy.cpp
	../damage.cpp
	../enchant.cpp
	../location.cpp
	../mathutil.cpp
	../porting.cpp
	../pattern.cpp
	../sounds.cpp
	../spell.cpp
	../utility.cpp
	../fileio/estreams.cpp
	../fileio/fileio.cpp
	../fileio/fileio_scen.cpp
	../fileio/map_parse.cpp
	../fileio/special_parse.cpp
	../fileio/tarball.cpp
	../fileio/tagfile.cpp
	../fileio/gzstream/gzstream.cpp
""") + Glob("../fileio/resmgr/*.cpp") + Glob("../gfx/*.cpp") + Glob("../scenario/*.cpp")

if str(platform) == "darwin":
	tools.extend(Glob("*.mac.*"))
elif str(platform) == "win32":
	tools.extend(Glob("*.win.cpp"))
	tools.extend(Glob("../fileio/*.win.cpp"))
elif str(platform) == "posix":
	tools.extend(Glob("*.linux.cpp"))

tools_obj = env.StaticLibrary("#build/lib/tools", tools)

Return("tools_obj")
