Made scons build hierarchical.
This commit is contained in:
parent
9f608b9838
commit
ea1b9efdd7
2 changed files with 438 additions and 422 deletions
428
SConstruct
428
SConstruct
|
@ -9,7 +9,7 @@
|
|||
# 4. msgfmt(1) for making builds with i18n support.
|
||||
# 5. graph-includes for making the project dependency graph.
|
||||
|
||||
import os, sys, commands, shutil, sets, re
|
||||
import os, sys, shutil, sets, re
|
||||
from glob import glob
|
||||
from subprocess import Popen, PIPE
|
||||
from os import access, F_OK
|
||||
|
@ -362,7 +362,7 @@ else:
|
|||
have_X = True
|
||||
have_server_prereqs = True
|
||||
|
||||
env.Append(CPPPATH = ["src"])
|
||||
env.Append(CPPPATH = ["#/src"])
|
||||
|
||||
boost_test_dyn_link = boost_auto_test = False
|
||||
if 'test' in COMMAND_LINE_TARGETS:
|
||||
|
@ -460,6 +460,7 @@ if boost_test_dyn_link:
|
|||
test_env.Append(CPPDEFINES = "WESNOTH_BOOST_AUTO_TEST_MAIN")
|
||||
else:
|
||||
test_env.Append(CPPDEFINES = "WESNOTH_BOOST_TEST_MAIN")
|
||||
Export("test_env")
|
||||
|
||||
cc_version = env["CCVERSION"]
|
||||
if env["CC"] == "gcc":
|
||||
|
@ -474,426 +475,9 @@ if env["PLATFORM"] == 'win32': # Microsoft Windows
|
|||
elif env["PLATFORM"] == 'darwin': # Mac OS X
|
||||
env.Append(FRAMEWORKS = "Carbon") # Carbon GUI
|
||||
|
||||
#color_range.cpp should be removed, but game_config depends on it.
|
||||
#game_config has very few things that are needed elsewhere, it should be
|
||||
#removed. Requires moving path and version at least to other files.
|
||||
|
||||
libwesnoth_core_sources = Split("""
|
||||
src/color_range.cpp
|
||||
src/config.cpp
|
||||
src/filesystem.cpp
|
||||
src/game_config.cpp
|
||||
src/gettext.cpp
|
||||
src/log.cpp
|
||||
src/map.cpp
|
||||
src/network.cpp
|
||||
src/network_worker.cpp
|
||||
src/thread.cpp
|
||||
src/tstring.cpp
|
||||
src/util.cpp
|
||||
src/serialization/binary_or_text.cpp
|
||||
src/serialization/binary_wml.cpp
|
||||
src/serialization/parser.cpp
|
||||
src/serialization/preprocessor.cpp
|
||||
src/serialization/string_utils.cpp
|
||||
src/serialization/tokenizer.cpp
|
||||
""")
|
||||
libwesnoth_core = env.Library("wesnoth_core", libwesnoth_core_sources)
|
||||
|
||||
libwesnoth_sources = Split("""
|
||||
src/astarnode.cpp
|
||||
src/astarsearch.cpp
|
||||
src/builder.cpp
|
||||
src/cavegen.cpp
|
||||
src/clipboard.cpp
|
||||
src/construct_dialog.cpp
|
||||
src/cursor.cpp
|
||||
src/display.cpp
|
||||
src/events.cpp
|
||||
src/filechooser.cpp
|
||||
src/font.cpp
|
||||
src/generic_event.cpp
|
||||
src/hotkeys.cpp
|
||||
src/image.cpp
|
||||
src/key.cpp
|
||||
src/language.cpp
|
||||
src/loadscreen.cpp
|
||||
src/map_create.cpp
|
||||
src/map_label.cpp
|
||||
src/mapgen.cpp
|
||||
src/mapgen_dialog.cpp
|
||||
src/marked-up_text.cpp
|
||||
src/minimap.cpp
|
||||
src/pathutils.cpp
|
||||
src/preferences.cpp
|
||||
src/preferences_display.cpp
|
||||
src/race.cpp
|
||||
src/random.cpp
|
||||
src/reports.cpp
|
||||
src/show_dialog.cpp
|
||||
src/sound.cpp
|
||||
src/soundsource.cpp
|
||||
src/terrain.cpp
|
||||
src/terrain_translation.cpp
|
||||
src/tooltips.cpp
|
||||
src/video.cpp
|
||||
src/theme.cpp
|
||||
src/widgets/button.cpp
|
||||
src/widgets/file_menu.cpp
|
||||
src/widgets/label.cpp
|
||||
src/widgets/menu.cpp
|
||||
src/widgets/menu_style.cpp
|
||||
src/widgets/progressbar.cpp
|
||||
src/widgets/scrollarea.cpp
|
||||
src/widgets/scrollbar.cpp
|
||||
src/widgets/slider.cpp
|
||||
src/widgets/textbox.cpp
|
||||
src/widgets/widget.cpp
|
||||
src/wml_exception.cpp
|
||||
src/gui/dialogs/addon_connect.cpp
|
||||
src/gui/widgets/button.cpp
|
||||
src/gui/widgets/canvas.cpp
|
||||
src/gui/widgets/control.cpp
|
||||
src/gui/widgets/event_handler.cpp
|
||||
src/gui/widgets/grid.cpp
|
||||
src/gui/widgets/label.cpp
|
||||
src/gui/widgets/panel.cpp
|
||||
src/gui/widgets/settings.cpp
|
||||
src/gui/widgets/text_box.cpp
|
||||
src/gui/widgets/helper.cpp
|
||||
src/gui/widgets/tooltip.cpp
|
||||
src/gui/widgets/widget.cpp
|
||||
src/gui/widgets/window.cpp
|
||||
src/gui/widgets/window_builder.cpp
|
||||
""")
|
||||
libwesnoth = env.Library("wesnoth", libwesnoth_sources)
|
||||
|
||||
libwesnothd_sources = Split("""
|
||||
src/loadscreen_empty.cpp
|
||||
src/tools/dummy_video.cpp
|
||||
""")
|
||||
libwesnothd = env.Library("wesnothd", libwesnothd_sources)
|
||||
|
||||
libcampaignd_sources = Split("""
|
||||
src/publish_campaign.cpp
|
||||
""")
|
||||
libcampaignd = env.Library("campaignd", libcampaignd_sources)
|
||||
|
||||
libwesnoth_sdl_sources = Split("""
|
||||
src/sdl_utils.cpp
|
||||
""")
|
||||
libwesnoth_sdl = env.Library("wesnoth_sdl", libwesnoth_sdl_sources)
|
||||
|
||||
libcutter_sources = Split("""
|
||||
src/tools/exploder_utils.cpp
|
||||
src/tools/exploder_cutter.cpp
|
||||
""")
|
||||
libcutter = env.Library("cutter", libcutter_sources)
|
||||
|
||||
# Used by both 'wesnoth' and 'test' targets
|
||||
wesnoth_sources = Split("""
|
||||
src/about.cpp
|
||||
src/actions.cpp
|
||||
src/ai.cpp
|
||||
src/ai_dfool.cpp
|
||||
src/ai_attack.cpp
|
||||
src/ai_move.cpp
|
||||
src/ai_python.cpp
|
||||
src/ai_village.cpp
|
||||
src/animated_game.cpp
|
||||
src/attack_prediction.cpp
|
||||
src/callable_objects.cpp
|
||||
src/config_adapter.cpp
|
||||
src/dialogs.cpp
|
||||
src/floating_textbox.cpp
|
||||
src/formula.cpp
|
||||
src/formula_ai.cpp
|
||||
src/formula_function.cpp
|
||||
src/formula_tokenizer.cpp
|
||||
src/game_display.cpp
|
||||
src/game_events.cpp
|
||||
src/game_preferences.cpp
|
||||
src/game_preferences_display.cpp
|
||||
src/gamestatus.cpp
|
||||
src/generate_report.cpp
|
||||
src/halo.cpp
|
||||
src/help.cpp
|
||||
src/intro.cpp
|
||||
src/leader_list.cpp
|
||||
src/menu_events.cpp
|
||||
src/mouse_events.cpp
|
||||
src/multiplayer.cpp
|
||||
src/multiplayer_ui.cpp
|
||||
src/multiplayer_wait.cpp
|
||||
src/multiplayer_connect.cpp
|
||||
src/multiplayer_create.cpp
|
||||
src/multiplayer_lobby.cpp
|
||||
src/pathfind.cpp
|
||||
src/playcampaign.cpp
|
||||
src/play_controller.cpp
|
||||
src/playmp_controller.cpp
|
||||
src/playsingle_controller.cpp
|
||||
src/playturn.cpp
|
||||
src/replay.cpp
|
||||
src/replay_controller.cpp
|
||||
src/sha1.cpp
|
||||
src/settings.cpp
|
||||
src/statistics.cpp
|
||||
src/team.cpp
|
||||
src/terrain_filter.cpp
|
||||
src/titlescreen.cpp
|
||||
src/unit.cpp
|
||||
src/unit_abilities.cpp
|
||||
src/unit_animation.cpp
|
||||
src/unit_display.cpp
|
||||
src/unit_frame.cpp
|
||||
src/unit_map.cpp
|
||||
src/unit_types.cpp
|
||||
src/upload_log.cpp
|
||||
src/variable.cpp
|
||||
src/variant.cpp
|
||||
src/widgets/combo.cpp
|
||||
src/widgets/scrollpane.cpp
|
||||
""")
|
||||
|
||||
#
|
||||
# Target declarations
|
||||
#
|
||||
|
||||
if have_client_prereqs:
|
||||
wesnoth = env.Program("wesnoth", ["src/game.cpp"] + wesnoth_sources + [libwesnoth_core, libwesnoth_sdl, libwesnoth, libcampaignd])
|
||||
else:
|
||||
wesnoth = None
|
||||
|
||||
wesnoth_editor_sources = Split("""
|
||||
src/editor/editor.cpp
|
||||
src/editor/editor_layout.cpp
|
||||
src/editor/map_manip.cpp
|
||||
src/editor/editor_display.cpp
|
||||
src/editor/editor_palettes.cpp
|
||||
src/editor/editor_main.cpp
|
||||
src/editor/editor_dialogs.cpp
|
||||
src/editor/editor_undo.cpp
|
||||
src/animated_editor.cpp
|
||||
""")
|
||||
if have_client_prereqs and have_X:
|
||||
wesnoth_editor = env.Program("wesnoth_editor", wesnoth_editor_sources + [libwesnoth_core, libwesnoth_sdl, libwesnoth])
|
||||
else:
|
||||
wesnoth_editor = None
|
||||
|
||||
campaignd_sources = Split("""
|
||||
src/campaign_server/campaign_server.cpp
|
||||
""")
|
||||
if have_server_prereqs:
|
||||
campaignd = env.Program("campaignd", campaignd_sources + [libwesnoth_core, libwesnothd, libcampaignd, libwesnoth])
|
||||
else:
|
||||
campaignd = None
|
||||
|
||||
wesnothd_sources = Split("""
|
||||
src/server/game.cpp
|
||||
src/server/input_stream.cpp
|
||||
src/server/metrics.cpp
|
||||
src/server/player.cpp
|
||||
src/server/proxy.cpp
|
||||
src/server/server.cpp
|
||||
src/server/simple_wml.cpp
|
||||
""")
|
||||
if have_server_prereqs:
|
||||
wesnothd = env.Program("wesnothd", wesnothd_sources + [libwesnoth_core, libwesnothd])
|
||||
else:
|
||||
wesnothd = None
|
||||
|
||||
cutter_sources = Split("""
|
||||
src/tools/cutter.cpp
|
||||
""")
|
||||
if have_client_prereqs:
|
||||
cutter = env.Program("cutter", cutter_sources + [libcutter, libwesnoth_core, libwesnoth_sdl, libwesnothd, libwesnoth],
|
||||
LIBS = env["LIBS"] + ["png"])
|
||||
else:
|
||||
cutter = None
|
||||
|
||||
exploder_sources = Split("""
|
||||
src/tools/exploder.cpp
|
||||
src/tools/exploder_composer.cpp
|
||||
""")
|
||||
if have_client_prereqs:
|
||||
exploder = env.Program("exploder", exploder_sources + [libcutter, libwesnoth_core, libwesnoth_sdl, libwesnothd, libwesnoth],
|
||||
LIBS = env["LIBS"] + ["png"])
|
||||
else:
|
||||
exploder = None
|
||||
|
||||
test_sources = Split("""
|
||||
src/tests/main.cpp
|
||||
src/tests/test_util.cpp
|
||||
""")
|
||||
test_env.Program("test", test_sources + [libwesnoth_core, libwesnoth],
|
||||
CPPPATH = env["CPPPATH"] + ['/usr/include'],
|
||||
LIBS = env["LIBS"] + ['boost_unit_test_framework'])
|
||||
|
||||
# FIXME: Currently this will only work under Linux
|
||||
env["svnrev"] = commands.getoutput("LC_ALL=C svnversion -n . 2>/dev/null")
|
||||
env.Depends('src/game_config.o', 'src/revision.hpp')
|
||||
revision_define = ""
|
||||
if env["svnrev"] != "" and env["svnrev"] != "exported":
|
||||
revision_define = "#define REVISION \"%s\"\n" % env["svnrev"]
|
||||
r = env.Command("src/revision.hpp", [],
|
||||
lambda target, source, env: open(str(target[0]), "w").write(revision_define))
|
||||
env.AlwaysBuild(r)
|
||||
env.TargetSignatures('content')
|
||||
env.Clean(all, "src/revision.hpp")
|
||||
|
||||
#
|
||||
# File inventory, for archive makes abd analysis tools
|
||||
#
|
||||
headers = Split("""
|
||||
src/tools/exploder_composer.hpp
|
||||
src/tools/exploder_utils.hpp
|
||||
src/tools/exploder_cutter.hpp
|
||||
src/serialization/tokenizer.hpp
|
||||
src/serialization/parser.hpp
|
||||
src/serialization/binary_or_text.hpp
|
||||
src/serialization/binary_wml.hpp
|
||||
src/serialization/preprocessor.hpp
|
||||
src/serialization/string_utils.hpp
|
||||
src/widgets/progressbar.hpp
|
||||
src/widgets/textbox.hpp
|
||||
src/widgets/combo.hpp
|
||||
src/widgets/file_menu.hpp
|
||||
src/widgets/scrollpane.hpp
|
||||
src/widgets/menu.hpp
|
||||
src/widgets/button.hpp
|
||||
src/widgets/label.hpp
|
||||
src/widgets/slider.hpp
|
||||
src/widgets/scrollbar.hpp
|
||||
src/widgets/widget.hpp
|
||||
src/widgets/scrollarea.hpp
|
||||
src/server/player.hpp
|
||||
src/server/game.hpp
|
||||
src/server/input_stream.hpp
|
||||
src/server/proxy.hpp
|
||||
src/server/metrics.hpp
|
||||
src/editor/editor_undo.hpp
|
||||
src/editor/map_manip.hpp
|
||||
src/editor/editor_layout.hpp
|
||||
src/editor/editor.hpp
|
||||
src/editor/editor_palettes.hpp
|
||||
src/editor/editor_dialogs.hpp
|
||||
src/about.hpp
|
||||
src/actions.hpp
|
||||
src/ai.hpp
|
||||
src/ai2.hpp
|
||||
src/ai_dfool.hpp
|
||||
src/ai_interface.hpp
|
||||
src/ai_python.hpp
|
||||
src/animated.hpp
|
||||
src/animated.i
|
||||
src/array.hpp
|
||||
src/astarnode.hpp
|
||||
src/attack_prediction.hpp
|
||||
src/builder.hpp
|
||||
src/cavegen.hpp
|
||||
src/clipboard.hpp
|
||||
src/color_range.hpp
|
||||
src/config.hpp
|
||||
src/config_adapter.hpp
|
||||
src/construct_dialog.hpp
|
||||
src/cursor.hpp
|
||||
src/dialogs.hpp
|
||||
src/display.hpp
|
||||
src/events.hpp
|
||||
src/file_chooser.hpp
|
||||
src/filesystem.hpp
|
||||
src/floating_textbox.hpp
|
||||
src/font.hpp
|
||||
src/game_config.hpp
|
||||
src/game_display.hpp
|
||||
src/game_errors.hpp
|
||||
src/game_events.hpp
|
||||
src/game_preferences.hpp
|
||||
src/gamestatus.hpp
|
||||
src/generic_event.hpp
|
||||
src/gettext.hpp
|
||||
src/global.hpp
|
||||
src/halo.hpp
|
||||
src/help.hpp
|
||||
src/hotkeys.hpp
|
||||
src/image.hpp
|
||||
src/intro.hpp
|
||||
src/key.hpp
|
||||
src/language.hpp
|
||||
src/leader_list.hpp
|
||||
src/loadscreen.hpp
|
||||
src/log.hpp
|
||||
src/map.hpp
|
||||
src/map_create.hpp
|
||||
src/map_label.hpp
|
||||
src/mapgen.hpp
|
||||
src/mapgen_dialog.hpp
|
||||
src/marked-up_text.hpp
|
||||
src/menu_events.hpp
|
||||
src/minimap.hpp
|
||||
src/mouse_events.hpp
|
||||
src/multiplayer.hpp
|
||||
src/multiplayer_connect.hpp
|
||||
src/multiplayer_create.hpp
|
||||
src/multiplayer_lobby.hpp
|
||||
src/multiplayer_ui.hpp
|
||||
src/multiplayer_wait.hpp
|
||||
src/network.hpp
|
||||
src/network_worker.hpp
|
||||
src/pathfind.hpp
|
||||
src/pathutils.hpp
|
||||
src/play_controller.hpp
|
||||
src/playcampaign.hpp
|
||||
src/playmp_controller.hpp
|
||||
src/playsingle_controller.hpp
|
||||
src/playturn.hpp
|
||||
src/preferences.hpp
|
||||
src/preferences_display.hpp
|
||||
src/publish_campaign.hpp
|
||||
src/race.hpp
|
||||
src/random.hpp
|
||||
src/replay.hpp
|
||||
src/replay_controller.hpp
|
||||
src/reports.hpp
|
||||
src/scoped_resource.hpp
|
||||
src/sha1.hpp
|
||||
src/settings.hpp
|
||||
src/sdl_utils.hpp
|
||||
src/show_dialog.hpp
|
||||
src/sound.hpp
|
||||
src/soundsource.hpp
|
||||
src/statistics.hpp
|
||||
src/team.hpp
|
||||
src/terrain.hpp
|
||||
src/terrain_filter.hpp
|
||||
src/terrain_translation.hpp
|
||||
src/theme.hpp
|
||||
src/thread.hpp
|
||||
src/titlescreen.hpp
|
||||
src/tooltips.hpp
|
||||
src/tstring.hpp
|
||||
src/unit.hpp
|
||||
src/unit_abilities.hpp
|
||||
src/unit_animation.hpp
|
||||
src/unit_display.hpp
|
||||
src/unit_frame.hpp
|
||||
src/unit_map.hpp
|
||||
src/unit_types.hpp
|
||||
src/upload_log.hpp
|
||||
src/util.hpp
|
||||
src/variable.hpp
|
||||
src/video.hpp
|
||||
src/wml_separators.hpp
|
||||
src/wesconfig.h
|
||||
src/wml_exception.hpp
|
||||
""")
|
||||
|
||||
sources = libwesnoth_sources + libwesnoth_core_sources + \
|
||||
libwesnothd_sources + libcampaignd_sources + \
|
||||
libwesnoth_sdl_sources + libcutter_sources + \
|
||||
wesnoth_editor_sources + campaignd_sources + wesnothd_sources + \
|
||||
cutter_sources + exploder_sources + test_sources
|
||||
Export(Split("env have_client_prereqs have_X have_server_prereqs"))
|
||||
SConscript(dirs = ["src"])
|
||||
Import(Split("sources wesnoth wesnoth_editor wesnothd cutter exploder campaignd"))
|
||||
|
||||
#
|
||||
# Utility productions (Unix-like systems only)
|
||||
|
|
432
src/SConscript
Normal file
432
src/SConscript
Normal file
|
@ -0,0 +1,432 @@
|
|||
# vi: syntax=python:et:ts=4
|
||||
|
||||
import commands
|
||||
|
||||
Import(Split("env test_env have_client_prereqs have_X have_server_prereqs"))
|
||||
|
||||
#color_range.cpp should be removed, but game_config depends on it.
|
||||
#game_config has very few things that are needed elsewhere, it should be
|
||||
#removed. Requires moving path and version at least to other files.
|
||||
|
||||
libwesnoth_core_sources = Split("""
|
||||
color_range.cpp
|
||||
config.cpp
|
||||
filesystem.cpp
|
||||
game_config.cpp
|
||||
gettext.cpp
|
||||
log.cpp
|
||||
map.cpp
|
||||
network.cpp
|
||||
network_worker.cpp
|
||||
thread.cpp
|
||||
tstring.cpp
|
||||
util.cpp
|
||||
serialization/binary_or_text.cpp
|
||||
serialization/binary_wml.cpp
|
||||
serialization/parser.cpp
|
||||
serialization/preprocessor.cpp
|
||||
serialization/string_utils.cpp
|
||||
serialization/tokenizer.cpp
|
||||
""")
|
||||
libwesnoth_core = env.Library("wesnoth_core", libwesnoth_core_sources)
|
||||
|
||||
libwesnoth_sources = Split("""
|
||||
astarnode.cpp
|
||||
astarsearch.cpp
|
||||
builder.cpp
|
||||
cavegen.cpp
|
||||
clipboard.cpp
|
||||
construct_dialog.cpp
|
||||
cursor.cpp
|
||||
display.cpp
|
||||
events.cpp
|
||||
filechooser.cpp
|
||||
font.cpp
|
||||
generic_event.cpp
|
||||
hotkeys.cpp
|
||||
image.cpp
|
||||
key.cpp
|
||||
language.cpp
|
||||
loadscreen.cpp
|
||||
map_create.cpp
|
||||
map_label.cpp
|
||||
mapgen.cpp
|
||||
mapgen_dialog.cpp
|
||||
marked-up_text.cpp
|
||||
minimap.cpp
|
||||
pathutils.cpp
|
||||
preferences.cpp
|
||||
preferences_display.cpp
|
||||
race.cpp
|
||||
random.cpp
|
||||
reports.cpp
|
||||
show_dialog.cpp
|
||||
sound.cpp
|
||||
soundsource.cpp
|
||||
terrain.cpp
|
||||
terrain_translation.cpp
|
||||
tooltips.cpp
|
||||
video.cpp
|
||||
theme.cpp
|
||||
widgets/button.cpp
|
||||
widgets/file_menu.cpp
|
||||
widgets/label.cpp
|
||||
widgets/menu.cpp
|
||||
widgets/menu_style.cpp
|
||||
widgets/progressbar.cpp
|
||||
widgets/scrollarea.cpp
|
||||
widgets/scrollbar.cpp
|
||||
widgets/slider.cpp
|
||||
widgets/textbox.cpp
|
||||
widgets/widget.cpp
|
||||
wml_exception.cpp
|
||||
gui/dialogs/addon_connect.cpp
|
||||
gui/widgets/button.cpp
|
||||
gui/widgets/canvas.cpp
|
||||
gui/widgets/control.cpp
|
||||
gui/widgets/event_handler.cpp
|
||||
gui/widgets/grid.cpp
|
||||
gui/widgets/label.cpp
|
||||
gui/widgets/panel.cpp
|
||||
gui/widgets/settings.cpp
|
||||
gui/widgets/text_box.cpp
|
||||
gui/widgets/helper.cpp
|
||||
gui/widgets/tooltip.cpp
|
||||
gui/widgets/widget.cpp
|
||||
gui/widgets/window.cpp
|
||||
gui/widgets/window_builder.cpp
|
||||
""")
|
||||
libwesnoth = env.Library("wesnoth", libwesnoth_sources)
|
||||
|
||||
libwesnothd_sources = Split("""
|
||||
loadscreen_empty.cpp
|
||||
tools/dummy_video.cpp
|
||||
""")
|
||||
libwesnothd = env.Library("wesnothd", libwesnothd_sources)
|
||||
|
||||
libcampaignd_sources = Split("""
|
||||
publish_campaign.cpp
|
||||
""")
|
||||
libcampaignd = env.Library("campaignd", libcampaignd_sources)
|
||||
|
||||
libwesnoth_sdl_sources = Split("""
|
||||
sdl_utils.cpp
|
||||
""")
|
||||
libwesnoth_sdl = env.Library("wesnoth_sdl", libwesnoth_sdl_sources)
|
||||
|
||||
libcutter_sources = Split("""
|
||||
tools/exploder_utils.cpp
|
||||
tools/exploder_cutter.cpp
|
||||
""")
|
||||
libcutter = env.Library("cutter", libcutter_sources)
|
||||
|
||||
# Used by both 'wesnoth' and 'test' targets
|
||||
wesnoth_sources = Split("""
|
||||
about.cpp
|
||||
actions.cpp
|
||||
ai.cpp
|
||||
ai_dfool.cpp
|
||||
ai_attack.cpp
|
||||
ai_move.cpp
|
||||
ai_python.cpp
|
||||
ai_village.cpp
|
||||
animated_game.cpp
|
||||
attack_prediction.cpp
|
||||
callable_objects.cpp
|
||||
config_adapter.cpp
|
||||
dialogs.cpp
|
||||
floating_textbox.cpp
|
||||
formula.cpp
|
||||
formula_ai.cpp
|
||||
formula_function.cpp
|
||||
formula_tokenizer.cpp
|
||||
game_display.cpp
|
||||
game_events.cpp
|
||||
game_preferences.cpp
|
||||
game_preferences_display.cpp
|
||||
gamestatus.cpp
|
||||
generate_report.cpp
|
||||
halo.cpp
|
||||
help.cpp
|
||||
intro.cpp
|
||||
leader_list.cpp
|
||||
menu_events.cpp
|
||||
mouse_events.cpp
|
||||
multiplayer.cpp
|
||||
multiplayer_ui.cpp
|
||||
multiplayer_wait.cpp
|
||||
multiplayer_connect.cpp
|
||||
multiplayer_create.cpp
|
||||
multiplayer_lobby.cpp
|
||||
pathfind.cpp
|
||||
playcampaign.cpp
|
||||
play_controller.cpp
|
||||
playmp_controller.cpp
|
||||
playsingle_controller.cpp
|
||||
playturn.cpp
|
||||
replay.cpp
|
||||
replay_controller.cpp
|
||||
sha1.cpp
|
||||
settings.cpp
|
||||
statistics.cpp
|
||||
team.cpp
|
||||
terrain_filter.cpp
|
||||
titlescreen.cpp
|
||||
unit.cpp
|
||||
unit_abilities.cpp
|
||||
unit_animation.cpp
|
||||
unit_display.cpp
|
||||
unit_frame.cpp
|
||||
unit_map.cpp
|
||||
unit_types.cpp
|
||||
upload_log.cpp
|
||||
variable.cpp
|
||||
variant.cpp
|
||||
widgets/combo.cpp
|
||||
widgets/scrollpane.cpp
|
||||
""")
|
||||
|
||||
#
|
||||
# Target declarations
|
||||
#
|
||||
|
||||
if have_client_prereqs:
|
||||
wesnoth = env.Program("../wesnoth", ["game.cpp"] + wesnoth_sources + [libwesnoth_core, libwesnoth_sdl, libwesnoth, libcampaignd])
|
||||
else:
|
||||
wesnoth = None
|
||||
Export("wesnoth")
|
||||
|
||||
wesnoth_editor_sources = Split("""
|
||||
editor/editor.cpp
|
||||
editor/editor_layout.cpp
|
||||
editor/map_manip.cpp
|
||||
editor/editor_display.cpp
|
||||
editor/editor_palettes.cpp
|
||||
editor/editor_main.cpp
|
||||
editor/editor_dialogs.cpp
|
||||
editor/editor_undo.cpp
|
||||
animated_editor.cpp
|
||||
""")
|
||||
if have_client_prereqs and have_X:
|
||||
wesnoth_editor = env.Program("../wesnoth_editor", wesnoth_editor_sources + [libwesnoth_core, libwesnoth_sdl, libwesnoth])
|
||||
else:
|
||||
wesnoth_editor = None
|
||||
Export("wesnoth_editor")
|
||||
|
||||
campaignd_sources = Split("""
|
||||
campaign_server/campaign_server.cpp
|
||||
""")
|
||||
if have_server_prereqs:
|
||||
campaignd = env.Program("../campaignd", campaignd_sources + [libwesnoth_core, libwesnothd, libcampaignd, libwesnoth])
|
||||
else:
|
||||
campaignd = None
|
||||
Export("campaignd")
|
||||
|
||||
wesnothd_sources = Split("""
|
||||
server/game.cpp
|
||||
server/input_stream.cpp
|
||||
server/metrics.cpp
|
||||
server/player.cpp
|
||||
server/proxy.cpp
|
||||
server/server.cpp
|
||||
server/simple_wml.cpp
|
||||
""")
|
||||
if have_server_prereqs:
|
||||
wesnothd = env.Program("../wesnothd", wesnothd_sources + [libwesnoth_core, libwesnothd])
|
||||
else:
|
||||
wesnothd = None
|
||||
Export("wesnothd")
|
||||
|
||||
cutter_sources = Split("""
|
||||
tools/cutter.cpp
|
||||
""")
|
||||
if have_client_prereqs:
|
||||
cutter = env.Program("../cutter", cutter_sources + [libcutter, libwesnoth_core, libwesnoth_sdl, libwesnothd, libwesnoth],
|
||||
LIBS = env["LIBS"] + ["png"])
|
||||
else:
|
||||
cutter = None
|
||||
Export("cutter")
|
||||
|
||||
exploder_sources = Split("""
|
||||
tools/exploder.cpp
|
||||
tools/exploder_composer.cpp
|
||||
""")
|
||||
if have_client_prereqs:
|
||||
exploder = env.Program("../exploder", exploder_sources + [libcutter, libwesnoth_core, libwesnoth_sdl, libwesnothd, libwesnoth],
|
||||
LIBS = env["LIBS"] + ["png"])
|
||||
else:
|
||||
exploder = None
|
||||
Export("exploder")
|
||||
|
||||
test_sources = Split("""
|
||||
tests/main.cpp
|
||||
tests/test_util.cpp
|
||||
""")
|
||||
test_env.Program("test", test_sources + [libwesnoth_core, libwesnoth],
|
||||
CPPPATH = env["CPPPATH"] + ['/usr/include'],
|
||||
LIBS = env["LIBS"] + ['boost_unit_test_framework'])
|
||||
|
||||
# FIXME: Currently this will only work under Linux
|
||||
env["svnrev"] = commands.getoutput("LC_ALL=C svnversion -n . 2>/dev/null")
|
||||
revision_define = ""
|
||||
if env["svnrev"] != "" and env["svnrev"] != "exported":
|
||||
revision_define = "#define REVISION \"%s\"\n" % env["svnrev"]
|
||||
r = env.Command("revision.hpp", [],
|
||||
lambda target, source, env: open(str(target[0]), "w").write(revision_define))
|
||||
env.AlwaysBuild(r)
|
||||
env.TargetSignatures('content')
|
||||
|
||||
#
|
||||
# File inventory, for archive makes abd analysis tools
|
||||
#
|
||||
headers = Split("""
|
||||
tools/exploder_composer.hpp
|
||||
tools/exploder_utils.hpp
|
||||
tools/exploder_cutter.hpp
|
||||
serialization/tokenizer.hpp
|
||||
serialization/parser.hpp
|
||||
serialization/binary_or_text.hpp
|
||||
serialization/binary_wml.hpp
|
||||
serialization/preprocessor.hpp
|
||||
serialization/string_utils.hpp
|
||||
widgets/progressbar.hpp
|
||||
widgets/textbox.hpp
|
||||
widgets/combo.hpp
|
||||
widgets/file_menu.hpp
|
||||
widgets/scrollpane.hpp
|
||||
widgets/menu.hpp
|
||||
widgets/button.hpp
|
||||
widgets/label.hpp
|
||||
widgets/slider.hpp
|
||||
widgets/scrollbar.hpp
|
||||
widgets/widget.hpp
|
||||
widgets/scrollarea.hpp
|
||||
server/player.hpp
|
||||
server/game.hpp
|
||||
server/input_stream.hpp
|
||||
server/proxy.hpp
|
||||
server/metrics.hpp
|
||||
editor/editor_undo.hpp
|
||||
editor/map_manip.hpp
|
||||
editor/editor_layout.hpp
|
||||
editor/editor.hpp
|
||||
editor/editor_palettes.hpp
|
||||
editor/editor_dialogs.hpp
|
||||
about.hpp
|
||||
actions.hpp
|
||||
ai.hpp
|
||||
ai2.hpp
|
||||
ai_dfool.hpp
|
||||
ai_interface.hpp
|
||||
ai_python.hpp
|
||||
animated.hpp
|
||||
animated.i
|
||||
array.hpp
|
||||
astarnode.hpp
|
||||
attack_prediction.hpp
|
||||
builder.hpp
|
||||
cavegen.hpp
|
||||
clipboard.hpp
|
||||
color_range.hpp
|
||||
config.hpp
|
||||
config_adapter.hpp
|
||||
construct_dialog.hpp
|
||||
cursor.hpp
|
||||
dialogs.hpp
|
||||
display.hpp
|
||||
events.hpp
|
||||
file_chooser.hpp
|
||||
filesystem.hpp
|
||||
floating_textbox.hpp
|
||||
font.hpp
|
||||
game_config.hpp
|
||||
game_display.hpp
|
||||
game_errors.hpp
|
||||
game_events.hpp
|
||||
game_preferences.hpp
|
||||
gamestatus.hpp
|
||||
generic_event.hpp
|
||||
gettext.hpp
|
||||
global.hpp
|
||||
halo.hpp
|
||||
help.hpp
|
||||
hotkeys.hpp
|
||||
image.hpp
|
||||
intro.hpp
|
||||
key.hpp
|
||||
language.hpp
|
||||
leader_list.hpp
|
||||
loadscreen.hpp
|
||||
log.hpp
|
||||
map.hpp
|
||||
map_create.hpp
|
||||
map_label.hpp
|
||||
mapgen.hpp
|
||||
mapgen_dialog.hpp
|
||||
marked-up_text.hpp
|
||||
menu_events.hpp
|
||||
minimap.hpp
|
||||
mouse_events.hpp
|
||||
multiplayer.hpp
|
||||
multiplayer_connect.hpp
|
||||
multiplayer_create.hpp
|
||||
multiplayer_lobby.hpp
|
||||
multiplayer_ui.hpp
|
||||
multiplayer_wait.hpp
|
||||
network.hpp
|
||||
network_worker.hpp
|
||||
pathfind.hpp
|
||||
pathutils.hpp
|
||||
play_controller.hpp
|
||||
playcampaign.hpp
|
||||
playmp_controller.hpp
|
||||
playsingle_controller.hpp
|
||||
playturn.hpp
|
||||
preferences.hpp
|
||||
preferences_display.hpp
|
||||
publish_campaign.hpp
|
||||
race.hpp
|
||||
random.hpp
|
||||
replay.hpp
|
||||
replay_controller.hpp
|
||||
reports.hpp
|
||||
scoped_resource.hpp
|
||||
sha1.hpp
|
||||
settings.hpp
|
||||
sdl_utils.hpp
|
||||
show_dialog.hpp
|
||||
sound.hpp
|
||||
soundsource.hpp
|
||||
statistics.hpp
|
||||
team.hpp
|
||||
terrain.hpp
|
||||
terrain_filter.hpp
|
||||
terrain_translation.hpp
|
||||
theme.hpp
|
||||
thread.hpp
|
||||
titlescreen.hpp
|
||||
tooltips.hpp
|
||||
tstring.hpp
|
||||
unit.hpp
|
||||
unit_abilities.hpp
|
||||
unit_animation.hpp
|
||||
unit_display.hpp
|
||||
unit_frame.hpp
|
||||
unit_map.hpp
|
||||
unit_types.hpp
|
||||
upload_log.hpp
|
||||
util.hpp
|
||||
variable.hpp
|
||||
video.hpp
|
||||
wml_separators.hpp
|
||||
wesconfig.h
|
||||
wml_exception.hpp
|
||||
""")
|
||||
|
||||
sources = libwesnoth_sources + libwesnoth_core_sources + \
|
||||
libwesnothd_sources + libcampaignd_sources + \
|
||||
libwesnoth_sdl_sources + libcutter_sources + \
|
||||
wesnoth_editor_sources + campaignd_sources + wesnothd_sources + \
|
||||
cutter_sources + exploder_sources + test_sources
|
||||
|
||||
Export("sources")
|
Loading…
Add table
Reference in a new issue