# Auto-generated file from 'Makefile.src.in' -- DO NOT EDIT # $Id$ # This file is part of OpenTTD. # OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. # OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see . CC_HOST = gcc CXX_HOST = g++ CC_BUILD = gcc CXX_BUILD = g++ WINDRES = STRIP = strip -s CFLAGS = -O2 -fomit-frame-pointer -Wall -Wno-multichar -Wsign-compare -Wundef -Wwrite-strings -Wpointer-arith -W -Wno-unused-parameter -Wredundant-decls -Wformat=2 -Wformat-security -Wno-unused-variable -Wno-unused-but-set-variable -Wno-unused-but-set-parameter -Winit-self -fno-strict-aliasing -Wcast-qual -fno-strict-overflow -Wnon-virtual-dtor -Wno-free-nonheap-object -rdynamic -DUNIX -D_FORTIFY_SOURCE=2 -DWITH_SSE -DWITH_ZLIB -DWITH_LZMA -DWITH_LZO -D_SQ64 -I/home/openttd/openttd-virj-source/src/3rdparty/squirrel/include -DWITH_PNG -I/usr/include/libpng12 -DDEDICATED -DENABLE_NETWORK -DNDEBUG -DWITH_PERSONAL_DIR -DPERSONAL_DIR=\".openttd\" -DGLOBAL_DATA_DIR=\"/usr/local/share/games/openttd\" CFLAGS_BUILD = -Wall -Wno-multichar -Wsign-compare -Wundef -Wwrite-strings -Wpointer-arith -W -Wno-unused-parameter -Wredundant-decls -Wformat=2 -Wformat-security -Wno-unused-variable -Wno-unused-but-set-variable -Wno-unused-but-set-parameter -Winit-self -fno-strict-aliasing -Wcast-qual -fno-strict-overflow -Wnon-virtual-dtor -Wno-free-nonheap-object -rdynamic -DUNIX -D_FORTIFY_SOURCE=2 -O1 -DNDEBUG CXXFLAGS = -std=gnu++0x -Wno-narrowing CXXFLAGS_BUILD = -std=gnu++0x -Wno-narrowing LIBS = -lstdc++ -lpthread -lc -lz -llzma -llzo2 -lpng12 LDFLAGS = -rdynamic LDFLAGS_BUILD = -rdynamic ROOT_DIR = /home/openttd/openttd-virj-source BIN_DIR = /home/openttd/openttd-virj-source/bin LANG_DIR = /home/openttd/openttd-virj-source/src/lang SRC_OBJS_DIR = /home/openttd/openttd-virj-source/objs/release LANG_OBJS_DIR = /home/openttd/openttd-virj-source/objs/lang SETTING_OBJS_DIR= /home/openttd/openttd-virj-source/objs/setting SRC_DIR = /home/openttd/openttd-virj-source/src SCRIPT_SRC_DIR = /home/openttd/openttd-virj-source/src/3rdparty/squirrel/include MEDIA_DIR = /home/openttd/openttd-virj-source/media TTD = openttd STRGEN = strgen ENDIAN_CHECK = endian_check DEPEND = depend ENDIAN_FORCE = AUTO OS = UNIX STAGE = [SRC] MAKEDEPEND = $(SRC_OBJS_DIR)/$(DEPEND) CFLAGS_MAKEDEP = -D__SSP_STRONG__ -D__DBL_MIN_EXP__ -D__cpp_attributes -D__UINT_LEAST16_MAX__ -D__ATOMIC_ACQUIRE -D__FLT_MIN__ -D__GCC_IEC_559_COMPLEX -D__UINT_LEAST8_TYPE__ -D__INTMAX_C -D__CHAR_BIT__ -D__UINT8_MAX__ -D__WINT_MAX__ -D__cpp_static_assert -D__ORDER_LITTLE_ENDIAN__ -D__SIZE_MAX__ -D__WCHAR_MAX__ -D__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 -D__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 -D__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 -D__DBL_DENORM_MIN__ -D__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 -D__GCC_ATOMIC_CHAR_LOCK_FREE -D__GCC_IEC_559 -D__FLT_EVAL_METHOD__ -D__unix__ -D__cpp_binary_literals -D__GCC_ATOMIC_CHAR32_T_LOCK_FREE -D__x86_64 -D__cpp_variadic_templates -D__UINT_FAST64_MAX__ -D__SIG_ATOMIC_TYPE__ -D__DBL_MIN_10_EXP__ -D__FINITE_MATH_ONLY__ -D__GNUC_PATCHLEVEL__ -D__UINT_FAST8_MAX__ -D__has_include -D__DEC64_MAX_EXP__ -D__INT8_C -D__UINT_LEAST64_MAX__ -D__SHRT_MAX__ -D__LDBL_MAX__ -D__UINT_LEAST8_MAX__ -D__GCC_ATOMIC_BOOL_LOCK_FREE -D__UINTMAX_TYPE__ -D__linux -D__DEC32_EPSILON__ -D__unix -D__UINT32_MAX__ -D__GXX_EXPERIMENTAL_CXX0X__ -D__LDBL_MAX_EXP__ -D__WINT_MIN__ -D__linux__ -D__SCHAR_MAX__ -D__WCHAR_MIN__ -D__INT64_C -D__DBL_DIG__ -D__GCC_ATOMIC_POINTER_LOCK_FREE -D__SIZEOF_INT__ -D__SIZEOF_POINTER__ -D__GCC_ATOMIC_CHAR16_T_LOCK_FREE -D__USER_LABEL_PREFIX__ -D__STDC_HOSTED__ -D__LDBL_HAS_INFINITY__ -D__FLT_EPSILON__ -D__GXX_WEAK__ -D__LDBL_MIN__ -D__DEC32_MAX__ -D__INT32_MAX__ -D__SIZEOF_LONG__ -D__STDC_IEC_559__ -D__STDC_ISO_10646__ -D__UINT16_C -D__DECIMAL_DIG__ -D__gnu_linux__ -D__has_include_next -D__LDBL_HAS_QUIET_NAN__ -D__GNUC__ -D__GXX_RTTI -D__MMX__ -D__FLT_HAS_DENORM__ -D__SIZEOF_LONG_DOUBLE__ -D__BIGGEST_ALIGNMENT__ -D__DBL_MAX__ -D__cpp_raw_strings -D__INT_FAST32_MAX__ -D__DBL_HAS_INFINITY__ -D__INT64_MAX__ -D__DEC32_MIN_EXP__ -D__INT_FAST16_TYPE__ -D__LDBL_HAS_DENORM__ -D__cplusplus -D__DEC128_MAX__ -D__INT_LEAST32_MAX__ -D__DEC32_MIN__ -D__DEPRECATED -D__DBL_MAX_EXP__ -D__DEC128_EPSILON__ -D__SSE2_MATH__ -D__ATOMIC_HLE_RELEASE -D__PTRDIFF_MAX__ -D__amd64 -D__STDC_NO_THREADS__ -D__ATOMIC_HLE_ACQUIRE -D__GNUG__ -D__LONG_LONG_MAX__ -D__SIZEOF_SIZE_T__ -D__cpp_rvalue_reference -D__SIZEOF_WINT_T__ -D__GCC_HAVE_DWARF2_CFI_ASM -D__GXX_ABI_VERSION -D__FLT_MIN_EXP__ -D__cpp_lambdas -D__INT_FAST64_TYPE__ -D__DBL_MIN__ -D__LP64__ -D__DECIMAL_BID_FORMAT__ -D__DEC128_MIN__ -D__REGISTER_PREFIX__ -D__UINT16_MAX__ -D__DBL_HAS_DENORM__ -D__UINT8_TYPE__ -D__NO_INLINE__ -D__FLT_MANT_DIG__ -D__VERSION__ -D__UINT64_C -D__cpp_unicode_characters -D_STDC_PREDEF_H -D__GCC_ATOMIC_INT_LOCK_FREE -D__FLOAT_WORD_ORDER__ -D__STDC_IEC_559_COMPLEX__ -D__INT32_C -D__DEC64_EPSILON__ -D__ORDER_PDP_ENDIAN__ -D__DEC128_MIN_EXP__ -D__INT_FAST32_TYPE__ -D__UINT_LEAST16_TYPE__ -Dunix -D__INT16_MAX__ -D__SIZE_TYPE__ -D__UINT64_MAX__ -D__INT8_TYPE__ -D__ELF__ -D__FLT_RADIX__ -D__INT_LEAST16_TYPE__ -D__LDBL_EPSILON__ -D__UINTMAX_C -D__k8 -D__SIG_ATOMIC_MAX__ -D__GCC_ATOMIC_WCHAR_T_LOCK_FREE -D__SIZEOF_PTRDIFF_T__ -D__x86_64__ -D__DEC32_SUBNORMAL_MIN__ -D__INT_FAST16_MAX__ -D__UINT_FAST32_MAX__ -D__UINT_LEAST64_TYPE__ -D__FLT_HAS_QUIET_NAN__ -D__FLT_MAX_10_EXP__ -D__LONG_MAX__ -D__DEC128_SUBNORMAL_MIN__ -D__FLT_HAS_INFINITY__ -D__cpp_unicode_literals -D__UINT_FAST16_TYPE__ -D__DEC64_MAX__ -D__CHAR16_TYPE__ -D__PRAGMA_REDEFINE_EXTNAME -D__INT_LEAST16_MAX__ -D__DEC64_MANT_DIG__ -D__UINT_LEAST32_MAX__ -D__GCC_ATOMIC_LONG_LOCK_FREE -D__INT_LEAST64_TYPE__ -D__INT16_TYPE__ -D__INT_LEAST8_TYPE__ -D__DEC32_MAX_EXP__ -D__INT_FAST8_MAX__ -D__INTPTR_MAX__ -Dlinux -D__SSE2__ -D__EXCEPTIONS -D__LDBL_MANT_DIG__ -D__DBL_HAS_QUIET_NAN__ -D__SIG_ATOMIC_MIN__ -D__code_model_small__ -D__k8__ -D__INTPTR_TYPE__ -D__UINT16_TYPE__ -D__WCHAR_TYPE__ -D__SIZEOF_FLOAT__ -D__UINTPTR_MAX__ -D__DEC64_MIN_EXP__ -D__cpp_decltype -D__INT_FAST64_MAX__ -D__GCC_ATOMIC_TEST_AND_SET_TRUEVAL -D__FLT_DIG__ -D__UINT_FAST64_TYPE__ -D__INT_MAX__ -D__amd64__ -D__INT64_TYPE__ -D__FLT_MAX_EXP__ -D__ORDER_BIG_ENDIAN__ -D__DBL_MANT_DIG__ -D__INT_LEAST64_MAX__ -D__DEC64_MIN__ -D__WINT_TYPE__ -D__UINT_LEAST32_TYPE__ -D__SIZEOF_SHORT__ -D__SSE__ -D__LDBL_MIN_EXP__ -D__INT_LEAST8_MAX__ -D__SIZEOF_INT128__ -D__LDBL_MAX_10_EXP__ -D__ATOMIC_RELAXED -D__DBL_EPSILON__ -D_LP64 -D__UINT8_C -D__INT_LEAST32_TYPE__ -D__SIZEOF_WCHAR_T__ -D__UINT64_TYPE__ -D__INT_FAST8_TYPE__ -D__GNUC_STDC_INLINE__ -D__DBL_DECIMAL_DIG__ -D__FXSR__ -D__DEC_EVAL_METHOD__ -D__UINT32_C -D__INTMAX_MAX__ -D__cpp_alias_templates -D__BYTE_ORDER__ -D__FLT_DENORM_MIN__ -D__INT8_MAX__ -D__UINT_FAST32_TYPE__ -D__CHAR32_TYPE__ -D__FLT_MAX__ -D__cpp_constexpr -D__INT32_TYPE__ -D__SIZEOF_DOUBLE__ -D__INTMAX_TYPE__ -D__DEC128_MAX_EXP__ -D__ATOMIC_CONSUME -D__GNUC_MINOR__ -D__UINTMAX_MAX__ -D__DEC32_MANT_DIG__ -D__DBL_MAX_10_EXP__ -D__LDBL_DENORM_MIN__ -D__INT16_C -D__STDC__ -D__PTRDIFF_TYPE__ -D__ATOMIC_SEQ_CST -D__UINT32_TYPE__ -D__UINTPTR_TYPE__ -D__DEC64_SUBNORMAL_MIN__ -D__DEC128_MANT_DIG__ -D__LDBL_MIN_10_EXP__ -D__SSE_MATH__ -D__SIZEOF_LONG_LONG__ -D__cpp_user_defined_literals -D__GCC_ATOMIC_LLONG_LOCK_FREE -D__LDBL_DIG__ -D__FLT_DECIMAL_DIG__ -D__UINT_FAST16_MAX__ -D__FLT_MIN_10_EXP__ -D__GCC_ATOMIC_SHORT_LOCK_FREE -D__UINT_FAST8_TYPE__ -D_GNU_SOURCE -D__ATOMIC_ACQ_REL -D__ATOMIC_RELEASE -O2 -fomit-frame-pointer -Wall -Wno-multichar -Wsign-compare -Wundef -Wwrite-strings -Wpointer-arith -W -Wno-unused-parameter -Wredundant-decls -Wformat=2 -Wformat-security -Wno-unused-variable -Wno-unused-but-set-variable -Wno-unused-but-set-parameter -Winit-self -fno-strict-aliasing -Wcast-qual -fno-strict-overflow -Wnon-virtual-dtor -Wno-free-nonheap-object -rdynamic -DUNIX -D_FORTIFY_SOURCE=2 -DWITH_SSE -DWITH_ZLIB -DWITH_LZMA -DWITH_LZO -D_SQ64 -DWITH_PNG -DDEDICATED -DENABLE_NETWORK -DNDEBUG -DWITH_PERSONAL_DIR -DPERSONAL_DIR=".openttd" -DGLOBAL_DATA_DIR="/usr/local/share/games/openttd" -std=gnu++0x -Wno-narrowing SORT = sort -u AWK = awk CONFIG_CACHE_COMPILER = $(SRC_OBJS_DIR)/config.cache.compiler CONFIG_CACHE_LINKER = $(SRC_OBJS_DIR)/config.cache.linker CONFIG_CACHE_ENDIAN = $(SRC_OBJS_DIR)/config.cache.endian CONFIG_CACHE_SOURCE = $(SRC_OBJS_DIR)/config.cache.source CONFIG_CACHE_VERSION = $(SRC_OBJS_DIR)/config.cache.version OBJS_C := OBJS_CPP := 3rdparty/md5/md5.o 3rdparty/squirrel/sqstdlib/sqstdaux.o 3rdparty/squirrel/sqstdlib/sqstdmath.o 3rdparty/squirrel/squirrel/sqapi.o 3rdparty/squirrel/squirrel/sqbaselib.o 3rdparty/squirrel/squirrel/sqclass.o 3rdparty/squirrel/squirrel/sqcompiler.o 3rdparty/squirrel/squirrel/sqdebug.o 3rdparty/squirrel/squirrel/sqfuncstate.o 3rdparty/squirrel/squirrel/sqlexer.o 3rdparty/squirrel/squirrel/sqmem.o 3rdparty/squirrel/squirrel/sqobject.o 3rdparty/squirrel/squirrel/sqstate.o 3rdparty/squirrel/squirrel/sqtable.o 3rdparty/squirrel/squirrel/sqvm.o ai/ai_config.o ai/ai_core.o ai/ai_gui.o ai/ai_info.o ai/ai_instance.o ai/ai_scanner.o aircraft_cmd.o aircraft_gui.o airport.o airport_gui.o animated_tile.o articulated_vehicles.o autoreplace.o autoreplace_cmd.o autoreplace_gui.o base_consist.o blitter/base.o blitter/null.o bmp.o bootstrap_gui.o bridge_gui.o bridge_map.o build_vehicle_gui.o cargoaction.o cargomonitor.o cargopacket.o cargotype.o cheat.o cheat_gui.o clear_cmd.o command.o company_cmd.o company_gui.o console.o console_cmds.o console_gui.o core/alloc_func.o core/bitmath_func.o core/geometry_func.o core/math_func.o core/pool_func.o core/random_func.o cpu.o crashlog.o currency.o date.o date_gui.o debug.o dedicated.o departures.o departures_gui.o depot.o depot_cmd.o depot_gui.o disaster_vehicle.o dock_gui.o driver.o economy.o effectvehicle.o elrail.o engine.o engine_gui.o error_gui.o fileio.o fios.o fios_gui.o fontcache.o fontdetection.o game/game_config.o game/game_core.o game/game_info.o game/game_instance.o game/game_scanner.o game/game_text.o gamelog.o genworld.o genworld_gui.o gfx.o gfx_layout.o gfxinit.o goal.o goal_gui.o graph_gui.o ground_vehicle.o group_cmd.o group_gui.o heightmap.o highscore.o highscore_gui.o hotkeys.o industry_cmd.o industry_gui.o infrastructure.o ini.o ini_load.o intro_gui.o landscape.o linkgraph/demands.o linkgraph/flowmapper.o linkgraph/linkgraph.o linkgraph/linkgraph_gui.o linkgraph/linkgraphjob.o linkgraph/linkgraphschedule.o linkgraph/mcf.o linkgraph/refresh.o main_gui.o map.o misc.o misc/countedobj.o misc/dbg_helpers.o misc/getoptdata.o misc_cmd.o misc_gui.o mixer.o music.o music/null_m.o music_gui.o network/core/address.o network/core/core.o network/core/host.o network/core/packet.o network/core/tcp.o network/core/tcp_admin.o network/core/tcp_connect.o network/core/tcp_content.o network/core/tcp_game.o network/core/tcp_http.o network/core/udp.o network/network.o network/network_admin.o network/network_chat_gui.o network/network_client.o network/network_command.o network/network_content.o network/network_content_gui.o network/network_gamelist.o network/network_gui.o network/network_server.o network/network_udp.o newgrf.o newgrf_airport.o newgrf_airporttiles.o newgrf_canal.o newgrf_cargo.o newgrf_commons.o newgrf_config.o newgrf_debug_gui.o newgrf_engine.o newgrf_generic.o newgrf_gui.o newgrf_house.o newgrf_industries.o newgrf_industrytiles.o newgrf_object.o newgrf_railtype.o newgrf_sound.o newgrf_spritegroup.o newgrf_station.o newgrf_storage.o newgrf_text.o newgrf_town.o newgrf_townname.o news_gui.o object_cmd.o object_gui.o openttd.o order_backup.o order_cmd.o order_gui.o os/unix/crashlog_unix.o os/unix/unix.o osk_gui.o pathfinder/npf/aystar.o pathfinder/npf/npf.o pathfinder/npf/queue.o pathfinder/opf/opf_ship.o pathfinder/yapf/yapf_rail.o pathfinder/yapf/yapf_road.o pathfinder/yapf/yapf_ship.o pbs.o progress.o rail.o rail_cmd.o rail_gui.o rev.o road.o road_cmd.o road_gui.o road_map.o roadstop.o roadveh_cmd.o roadveh_gui.o saveload/afterload.o saveload/ai_sl.o saveload/airport_sl.o saveload/animated_tile_sl.o saveload/autoreplace_sl.o saveload/cargomonitor_sl.o saveload/cargopacket_sl.o saveload/cheat_sl.o saveload/company_sl.o saveload/depot_sl.o saveload/economy_sl.o saveload/engine_sl.o saveload/game_sl.o saveload/gamelog_sl.o saveload/goal_sl.o saveload/group_sl.o saveload/industry_sl.o saveload/labelmaps_sl.o saveload/linkgraph_sl.o saveload/map_sl.o saveload/misc_sl.o saveload/newgrf_sl.o saveload/object_sl.o saveload/oldloader.o saveload/oldloader_sl.o saveload/order_sl.o saveload/saveload.o saveload/signs_sl.o saveload/station_sl.o saveload/storage_sl.o saveload/story_sl.o saveload/strings_sl.o saveload/subsidy_sl.o saveload/town_sl.o saveload/vehicle_sl.o saveload/waypoint_sl.o screenshot.o script/api/script_accounting.o script/api/script_admin.o script/api/script_airport.o script/api/script_base.o script/api/script_basestation.o script/api/script_bridge.o script/api/script_bridgelist.o script/api/script_cargo.o script/api/script_cargolist.o script/api/script_cargomonitor.o script/api/script_company.o script/api/script_companymode.o script/api/script_controller.o script/api/script_date.o script/api/script_depotlist.o script/api/script_engine.o script/api/script_enginelist.o script/api/script_error.o script/api/script_event.o script/api/script_event_types.o script/api/script_execmode.o script/api/script_game.o script/api/script_gamesettings.o script/api/script_goal.o script/api/script_group.o script/api/script_grouplist.o script/api/script_industry.o script/api/script_industrylist.o script/api/script_industrytype.o script/api/script_industrytypelist.o script/api/script_infrastructure.o script/api/script_list.o script/api/script_log.o script/api/script_map.o script/api/script_marine.o script/api/script_news.o script/api/script_object.o script/api/script_order.o script/api/script_rail.o script/api/script_railtypelist.o script/api/script_road.o script/api/script_sign.o script/api/script_signlist.o script/api/script_station.o script/api/script_stationlist.o script/api/script_story_page.o script/api/script_storypageelementlist.o script/api/script_storypagelist.o script/api/script_subsidy.o script/api/script_subsidylist.o script/api/script_testmode.o script/api/script_text.o script/api/script_tile.o script/api/script_tilelist.o script/api/script_town.o script/api/script_townlist.o script/api/script_tunnel.o script/api/script_vehicle.o script/api/script_vehiclelist.o script/api/script_viewport.o script/api/script_waypoint.o script/api/script_waypointlist.o script/api/script_window.o script/script_config.o script/script_info.o script/script_info_dummy.o script/script_instance.o script/script_scanner.o script/squirrel.o script/squirrel_std.o settings.o settings_gui.o ship_cmd.o ship_gui.o signal.o signs.o signs_cmd.o signs_gui.o smallmap_gui.o sound.o sound/null_s.o sprite.o spritecache.o spriteloader/grf.o station.o station_cmd.o station_gui.o statusbar_gui.o story.o story_gui.o strgen/strgen_base.o string.o stringfilter.o strings.o subsidy.o subsidy_gui.o terraform_cmd.o terraform_gui.o textbuf.o texteff.o textfile_gui.o tgp.o thread/thread_pthread.o tile_map.o tilearea.o timetable_cmd.o timetable_gui.o toolbar_gui.o town_cmd.o town_gui.o townname.o train_cmd.o train_gui.o transparency_gui.o tree_cmd.o tree_gui.o tunnel_map.o tunnelbridge_cmd.o vehicle.o vehicle_cmd.o vehicle_gui.o vehiclelist.o video/dedicated_v.o video/null_v.o viewport.o viewport_gui.o viewport_sprite_sorter_sse4.o void_cmd.o watch_gui.o water_cmd.o waypoint.o waypoint_cmd.o waypoint_gui.o widget.o widgets/dropdown.o window.o OBJS_MM := OBJS_RC := OBJS := $(OBJS_C) $(OBJS_CPP) $(OBJS_MM) $(OBJS_RC) SRCS := 3rdparty/md5/md5.cpp 3rdparty/squirrel/sqstdlib/sqstdaux.cpp 3rdparty/squirrel/sqstdlib/sqstdmath.cpp 3rdparty/squirrel/squirrel/sqapi.cpp 3rdparty/squirrel/squirrel/sqbaselib.cpp 3rdparty/squirrel/squirrel/sqclass.cpp 3rdparty/squirrel/squirrel/sqcompiler.cpp 3rdparty/squirrel/squirrel/sqdebug.cpp 3rdparty/squirrel/squirrel/sqfuncstate.cpp 3rdparty/squirrel/squirrel/sqlexer.cpp 3rdparty/squirrel/squirrel/sqmem.cpp 3rdparty/squirrel/squirrel/sqobject.cpp 3rdparty/squirrel/squirrel/sqstate.cpp 3rdparty/squirrel/squirrel/sqtable.cpp 3rdparty/squirrel/squirrel/sqvm.cpp ai/ai_config.cpp ai/ai_core.cpp ai/ai_gui.cpp ai/ai_info.cpp ai/ai_instance.cpp ai/ai_scanner.cpp aircraft_cmd.cpp aircraft_gui.cpp airport.cpp airport_gui.cpp animated_tile.cpp articulated_vehicles.cpp autoreplace.cpp autoreplace_cmd.cpp autoreplace_gui.cpp base_consist.cpp blitter/base.cpp blitter/null.cpp bmp.cpp bootstrap_gui.cpp bridge_gui.cpp bridge_map.cpp build_vehicle_gui.cpp cargoaction.cpp cargomonitor.cpp cargopacket.cpp cargotype.cpp cheat.cpp cheat_gui.cpp clear_cmd.cpp command.cpp company_cmd.cpp company_gui.cpp console.cpp console_cmds.cpp console_gui.cpp core/alloc_func.cpp core/bitmath_func.cpp core/geometry_func.cpp core/math_func.cpp core/pool_func.cpp core/random_func.cpp cpu.cpp crashlog.cpp currency.cpp date.cpp date_gui.cpp debug.cpp dedicated.cpp departures.cpp departures_gui.cpp depot.cpp depot_cmd.cpp depot_gui.cpp disaster_vehicle.cpp dock_gui.cpp driver.cpp economy.cpp effectvehicle.cpp elrail.cpp engine.cpp engine_gui.cpp error_gui.cpp fileio.cpp fios.cpp fios_gui.cpp fontcache.cpp fontdetection.cpp game/game_config.cpp game/game_core.cpp game/game_info.cpp game/game_instance.cpp game/game_scanner.cpp game/game_text.cpp gamelog.cpp genworld.cpp genworld_gui.cpp gfx.cpp gfx_layout.cpp gfxinit.cpp goal.cpp goal_gui.cpp graph_gui.cpp ground_vehicle.cpp group_cmd.cpp group_gui.cpp heightmap.cpp highscore.cpp highscore_gui.cpp hotkeys.cpp industry_cmd.cpp industry_gui.cpp infrastructure.cpp ini.cpp ini_load.cpp intro_gui.cpp landscape.cpp linkgraph/demands.cpp linkgraph/flowmapper.cpp linkgraph/linkgraph.cpp linkgraph/linkgraph_gui.cpp linkgraph/linkgraphjob.cpp linkgraph/linkgraphschedule.cpp linkgraph/mcf.cpp linkgraph/refresh.cpp main_gui.cpp map.cpp misc.cpp misc/countedobj.cpp misc/dbg_helpers.cpp misc/getoptdata.cpp misc_cmd.cpp misc_gui.cpp mixer.cpp music.cpp music/null_m.cpp music_gui.cpp network/core/address.cpp network/core/core.cpp network/core/host.cpp network/core/packet.cpp network/core/tcp.cpp network/core/tcp_admin.cpp network/core/tcp_connect.cpp network/core/tcp_content.cpp network/core/tcp_game.cpp network/core/tcp_http.cpp network/core/udp.cpp network/network.cpp network/network_admin.cpp network/network_chat_gui.cpp network/network_client.cpp network/network_command.cpp network/network_content.cpp network/network_content_gui.cpp network/network_gamelist.cpp network/network_gui.cpp network/network_server.cpp network/network_udp.cpp newgrf.cpp newgrf_airport.cpp newgrf_airporttiles.cpp newgrf_canal.cpp newgrf_cargo.cpp newgrf_commons.cpp newgrf_config.cpp newgrf_debug_gui.cpp newgrf_engine.cpp newgrf_generic.cpp newgrf_gui.cpp newgrf_house.cpp newgrf_industries.cpp newgrf_industrytiles.cpp newgrf_object.cpp newgrf_railtype.cpp newgrf_sound.cpp newgrf_spritegroup.cpp newgrf_station.cpp newgrf_storage.cpp newgrf_text.cpp newgrf_town.cpp newgrf_townname.cpp news_gui.cpp object_cmd.cpp object_gui.cpp openttd.cpp order_backup.cpp order_cmd.cpp order_gui.cpp os/unix/crashlog_unix.cpp os/unix/unix.cpp osk_gui.cpp pathfinder/npf/aystar.cpp pathfinder/npf/npf.cpp pathfinder/npf/queue.cpp pathfinder/opf/opf_ship.cpp pathfinder/yapf/yapf_rail.cpp pathfinder/yapf/yapf_road.cpp pathfinder/yapf/yapf_ship.cpp pbs.cpp progress.cpp rail.cpp rail_cmd.cpp rail_gui.cpp rev.cpp road.cpp road_cmd.cpp road_gui.cpp road_map.cpp roadstop.cpp roadveh_cmd.cpp roadveh_gui.cpp saveload/afterload.cpp saveload/ai_sl.cpp saveload/airport_sl.cpp saveload/animated_tile_sl.cpp saveload/autoreplace_sl.cpp saveload/cargomonitor_sl.cpp saveload/cargopacket_sl.cpp saveload/cheat_sl.cpp saveload/company_sl.cpp saveload/depot_sl.cpp saveload/economy_sl.cpp saveload/engine_sl.cpp saveload/game_sl.cpp saveload/gamelog_sl.cpp saveload/goal_sl.cpp saveload/group_sl.cpp saveload/industry_sl.cpp saveload/labelmaps_sl.cpp saveload/linkgraph_sl.cpp saveload/map_sl.cpp saveload/misc_sl.cpp saveload/newgrf_sl.cpp saveload/object_sl.cpp saveload/oldloader.cpp saveload/oldloader_sl.cpp saveload/order_sl.cpp saveload/saveload.cpp saveload/signs_sl.cpp saveload/station_sl.cpp saveload/storage_sl.cpp saveload/story_sl.cpp saveload/strings_sl.cpp saveload/subsidy_sl.cpp saveload/town_sl.cpp saveload/vehicle_sl.cpp saveload/waypoint_sl.cpp screenshot.cpp script/api/script_accounting.cpp script/api/script_admin.cpp script/api/script_airport.cpp script/api/script_base.cpp script/api/script_basestation.cpp script/api/script_bridge.cpp script/api/script_bridgelist.cpp script/api/script_cargo.cpp script/api/script_cargolist.cpp script/api/script_cargomonitor.cpp script/api/script_company.cpp script/api/script_companymode.cpp script/api/script_controller.cpp script/api/script_date.cpp script/api/script_depotlist.cpp script/api/script_engine.cpp script/api/script_enginelist.cpp script/api/script_error.cpp script/api/script_event.cpp script/api/script_event_types.cpp script/api/script_execmode.cpp script/api/script_game.cpp script/api/script_gamesettings.cpp script/api/script_goal.cpp script/api/script_group.cpp script/api/script_grouplist.cpp script/api/script_industry.cpp script/api/script_industrylist.cpp script/api/script_industrytype.cpp script/api/script_industrytypelist.cpp script/api/script_infrastructure.cpp script/api/script_list.cpp script/api/script_log.cpp script/api/script_map.cpp script/api/script_marine.cpp script/api/script_news.cpp script/api/script_object.cpp script/api/script_order.cpp script/api/script_rail.cpp script/api/script_railtypelist.cpp script/api/script_road.cpp script/api/script_sign.cpp script/api/script_signlist.cpp script/api/script_station.cpp script/api/script_stationlist.cpp script/api/script_story_page.cpp script/api/script_storypageelementlist.cpp script/api/script_storypagelist.cpp script/api/script_subsidy.cpp script/api/script_subsidylist.cpp script/api/script_testmode.cpp script/api/script_text.cpp script/api/script_tile.cpp script/api/script_tilelist.cpp script/api/script_town.cpp script/api/script_townlist.cpp script/api/script_tunnel.cpp script/api/script_vehicle.cpp script/api/script_vehiclelist.cpp script/api/script_viewport.cpp script/api/script_waypoint.cpp script/api/script_waypointlist.cpp script/api/script_window.cpp script/script_config.cpp script/script_info.cpp script/script_info_dummy.cpp script/script_instance.cpp script/script_scanner.cpp script/squirrel.cpp script/squirrel_std.cpp settings.cpp settings_gui.cpp ship_cmd.cpp ship_gui.cpp signal.cpp signs.cpp signs_cmd.cpp signs_gui.cpp smallmap_gui.cpp sound.cpp sound/null_s.cpp sprite.cpp spritecache.cpp spriteloader/grf.cpp station.cpp station_cmd.cpp station_gui.cpp statusbar_gui.cpp story.cpp story_gui.cpp strgen/strgen_base.cpp string.cpp stringfilter.cpp strings.cpp subsidy.cpp subsidy_gui.cpp terraform_cmd.cpp terraform_gui.cpp textbuf.cpp texteff.cpp textfile_gui.cpp tgp.cpp thread/thread_pthread.cpp tile_map.cpp tilearea.cpp timetable_cmd.cpp timetable_gui.cpp toolbar_gui.cpp town_cmd.cpp town_gui.cpp townname.cpp train_cmd.cpp train_gui.cpp transparency_gui.cpp tree_cmd.cpp tree_gui.cpp tunnel_map.cpp tunnelbridge_cmd.cpp vehicle.cpp vehicle_cmd.cpp vehicle_gui.cpp vehiclelist.cpp video/dedicated_v.cpp video/null_v.cpp viewport.cpp viewport_gui.cpp viewport_sprite_sorter_sse4.cpp void_cmd.cpp watch_gui.cpp water_cmd.cpp waypoint.cpp waypoint_cmd.cpp waypoint_gui.cpp widget.cpp widgets/dropdown.cpp window.cpp # All C-files depend on those 3 files FILE_DEP := $(CONFIG_CACHE_COMPILER) endian_target.h # Create all dirs and subdirs RES := $(shell mkdir -p $(BIN_DIR) $(sort $(dir $(OBJS)))) # Make sure endian_target.h is reasable as if it was in the src/ dir CFLAGS += -I $(SRC_OBJS_DIR) -I $(LANG_OBJS_DIR) -I $(SETTING_OBJS_DIR) CFLAGS_MAKEDEP += -I $(SRC_OBJS_DIR) -I $(LANG_OBJS_DIR) -I $(SETTING_OBJS_DIR) ifdef SCRIPT_SRC_DIR CFLAGS_MAKEDEP += -I $(SCRIPT_SRC_DIR) endif ENDIAN_TARGETS := endian_target.h $(ENDIAN_CHECK) # Check if we want to show what we are doing ifdef VERBOSE Q = E = @true else Q = @ E = @echo endif # Our default target all: $(BIN_DIR)/$(TTD) # This are 2 rules that are pointing back to STRGEN stuff. # There is not really a need to have them here, but in case # some weirdo wants to run 'make' in the 'src' dir and expects # the languages to be recompiled, this catches that case and # takes care of it nicely. $(LANG_OBJS_DIR)/$(STRGEN): $(MAKE) -C $(LANG_OBJS_DIR) $(STRGEN) $(LANG_OBJS_DIR)/table/strings.h: $(LANG_DIR)/english.txt $(LANG_OBJS_DIR)/$(STRGEN) $(MAKE) -C $(LANG_OBJS_DIR) table/strings.h # Always run version detection, so we always have an accurate modified # flag VERSIONS := $(shell AWK="$(AWK)" "$(ROOT_DIR)/findversion.sh") MODIFIED := $(shell echo "$(VERSIONS)" | cut -f 3 -d' ') # Use autodetected revisions REV := $(shell echo "$(VERSIONS)" | cut -f 1 -d' ') REV_NR := $(shell echo "$(VERSIONS)" | cut -f 2 -d' ') # Make sure we have something in REV and REV_NR ifeq ($(REV),) REV := norev000 endif ifeq ($(REV_NR),) REV_NR := 0 endif # This helps to recompile if flags change RES := $(shell if [ "`cat $(CONFIG_CACHE_COMPILER) 2>/dev/null`" != "$(CFLAGS) $(CXXFLAGS)" ]; then echo "$(CFLAGS) $(CXXFLAGS)" > $(CONFIG_CACHE_COMPILER); fi ) RES := $(shell if [ "`cat $(CONFIG_CACHE_LINKER) 2>/dev/null`" != "$(LDFLAGS) $(LIBS)" ]; then echo "$(LDFLAGS) $(LIBS)" > $(CONFIG_CACHE_LINKER); fi ) RES := $(shell if [ "`cat $(CONFIG_CACHE_ENDIAN) 2>/dev/null`" != "$(ENDIAN_FORCE)" ]; then echo "$(ENDIAN_FORCE)" > $(CONFIG_CACHE_ENDIAN); fi ) # If there is a change in the source-file-list, make sure we recheck the deps RES := $(shell if [ "`cat $(CONFIG_CACHE_SOURCE) 2>/dev/null`" != "$(SRCS)" ]; then echo "$(SRCS)" > $(CONFIG_CACHE_SOURCE); fi ) # If there is a change in the revision, make sure we recompile rev.cpp RES := $(shell if [ "`cat $(CONFIG_CACHE_VERSION) 2>/dev/null`" != "$(REV) $(MODIFIED)" ]; then echo "$(REV) $(MODIFIED)" > $(CONFIG_CACHE_VERSION); fi ) ifndef MAKEDEPEND # The slow, but always correct, dep-check DEP_MASK := %.d DEPS := $(OBJS:%.o=%.d) # Only include the deps if we are compiling everything ifeq ($(filter $(ENDIAN_TARGETS) %.o clean mrproper, $(MAKECMDGOALS)),) -include $(DEPS) else # In case we want to compile a single target, include the .d file for it ifneq ($(filter %.o, $(MAKECMDGOALS)),) SINGLE_DEP := $(filter %.o, $(MAKECMDGOALS)) -include $(SINGLE_DEP:%.o=%.d) endif endif # Find the deps via GCC. Rarely wrong, but a bit slow $(OBJS_C:%.o=%.d): %.d: $(SRC_DIR)/%.c $(FILE_DEP) $(E) '$(STAGE) DEP $(<:$(SRC_DIR)/%.c=%.c)' $(Q)$(CC_HOST) $(CFLAGS) -MM $< | sed 's@^$(@F:%.d=%.o):@$@ $(@:%.d=%.o):@' > $@ $(OBJS_CPP:%.o=%.d): %.d: $(SRC_DIR)/%.cpp $(FILE_DEP) $(E) '$(STAGE) DEP $(<:$(SRC_DIR)/%.cpp=%.cpp)' $(Q)$(CXX_HOST) $(CFLAGS) $(CXXFLAGS) -MM $< | sed 's@^$(@F:%.d=%.o):@$@ $(@:%.d=%.o):@' > $@ $(OBJS_MM:%.o=%.d): %.d: $(SRC_DIR)/%.mm $(FILE_DEP) $(E) '$(STAGE) DEP $(<:$(SRC_DIR)/%.mm=%.mm)' $(Q)$(CC_HOST) $(CFLAGS) -MM $< | sed 's@^$(@F:%.d=%.o):@$@ $(@:%.d=%.o):@' > $@ $(OBJS_RC:%.o=%.d): %.d: $(SRC_DIR)/%.rc $(FILE_DEP) $(E) '$(STAGE) DEP $(<:$(SRC_DIR)/%.rc=%.rc)' $(Q)touch $@ else # The much faster, but can be wrong, dep-check DEP_MASK := DEPS := Makefile.dep # Only include the deps if we are not cleaning ifeq ($(filter $(ENDIAN_TARGETS) depend clean mrproper, $(MAKECMDGOALS)),) -include Makefile.dep endif ifeq ("$(SRC_OBJS_DIR)/$(DEPEND)","$(MAKEDEPEND)") DEP := $(MAKEDEPEND) $(SRC_OBJS_DIR)/$(DEPEND): $(SRC_DIR)/depend/depend.cpp $(E) '$(STAGE) Compiling and linking $(DEPEND)' $(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) $(LDFLAGS_BUILD) -o $@ $< endif # Make sure that only 'make depend' ALWAYS triggers a recheck ifeq ($(filter depend, $(MAKECMDGOALS)),) Makefile.dep: $(FILE_DEP) $(SRCS:%=$(SRC_DIR)/%) $(CONFIG_CACHE_SOURCE) $(DEP) else Makefile.dep: $(FILE_DEP) $(SRCS:%=$(SRC_DIR)/%) $(DEP) FORCE endif $(E) '$(STAGE) DEP CHECK (all files)' $(Q)rm -f Makefile.dep.tmp $(Q)touch Makefile.dep.tmp # Calculate the deps via makedepend $(Q)$(MAKEDEPEND) -f$(SRC_OBJS_DIR)/Makefile.dep.tmp -o.o -Y -v -- $(CFLAGS_MAKEDEP) -- $(SRCS:%=$(SRC_DIR)/%) 2>/dev/null # Convert x:/... paths to /x/... for mingw ifeq ($(OS), MINGW) @cat Makefile.dep.tmp | sed 's@/\([a-zA-Z]\):\/@\/\1\/@g' > Makefile.dep.tmp.mingw @cp Makefile.dep.tmp.mingw Makefile.dep.tmp @rm -f Makefile.dep.tmp.mingw endif # Remove all comments and includes that don't start with $(SRC_DIR) # Remove $(SRC_DIR) from object-file-name @$(AWK) ' \ /^# DO NOT/ { print $$0 ; next} \ /^#/ {next} \ /: / { \ left = NF - 1; \ for (n = 2; n <= NF; n++) { \ if (match($$n, "^$(ROOT_DIR)") == 0) { \ $$n = ""; \ left--; \ } \ } \ gsub("$(SRC_DIR)/", "", $$1); \ if (left > 0) { \ print $$0; \ $$1 = "Makefile.dep:"; \ print $$0; \ } \ next \ } \ { \ print $$0 \ } \ ' < Makefile.dep.tmp | sed 's@ *@ @g;s@ $$@@' | $(SORT) > Makefile.dep $(Q)rm -f Makefile.dep.tmp Makefile.dep.tmp.bak endif # Avoid problems with deps if a .h/.hpp/.hpp.sq file is deleted without the deps # being updated. Now the Makefile continues, the deps are recreated # and all will be fine. %.h %.hpp %.hpp.sq: @true # Compile all the files according to the targets $(OBJS_C): %.o: $(SRC_DIR)/%.c $(DEP_MASK) $(FILE_DEP) $(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.c=%.c)' $(Q)$(CC_HOST) $(CFLAGS) -c -o $@ $< $(filter-out %sse2.o, $(filter-out %ssse3.o, $(filter-out %sse4.o, $(OBJS_CPP)))): %.o: $(SRC_DIR)/%.cpp $(DEP_MASK) $(FILE_DEP) $(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)' $(Q)$(CXX_HOST) $(CFLAGS) $(CXXFLAGS) -c -o $@ $< $(filter %sse2.o, $(OBJS_CPP)): %.o: $(SRC_DIR)/%.cpp $(DEP_MASK) $(FILE_DEP) $(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)' $(Q)$(CXX_HOST) $(CFLAGS) $(CXXFLAGS) -c -msse2 -o $@ $< $(filter %ssse3.o, $(OBJS_CPP)): %.o: $(SRC_DIR)/%.cpp $(DEP_MASK) $(FILE_DEP) $(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)' $(Q)$(CXX_HOST) $(CFLAGS) $(CXXFLAGS) -c -mssse3 -o $@ $< $(filter %sse4.o, $(OBJS_CPP)): %.o: $(SRC_DIR)/%.cpp $(DEP_MASK) $(FILE_DEP) $(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)' $(Q)$(CXX_HOST) $(CFLAGS) $(CXXFLAGS) -c -msse4.1 -o $@ $< $(OBJS_MM): %.o: $(SRC_DIR)/%.mm $(DEP_MASK) $(FILE_DEP) $(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.mm=%.mm)' $(Q)$(CC_HOST) $(CFLAGS) -c -o $@ $< $(OBJS_RC): %.o: $(SRC_DIR)/%.rc $(FILE_DEP) $(E) '$(STAGE) Compiling resource $(<:$(SRC_DIR)/%.rc=%.rc)' $(Q)$(WINDRES) -o $@ -I `basename $<` $< $(BIN_DIR)/$(TTD): $(TTD) $(Q)cp $(TTD) $(BIN_DIR)/$(TTD) ifeq ($(OS), UNIX) $(Q)cp $(MEDIA_DIR)/openttd.32.bmp $(BIN_DIR)/baseset/ endif ifeq ($(OS), OSX) $(Q)cp $(ROOT_DIR)/os/macosx/splash.png $(BIN_DIR)/baseset/ endif $(TTD): $(OBJS) $(CONFIG_CACHE_LINKER) $(E) '$(STAGE) Linking $@' ifeq ($(OS), PSP) # Because of a bug in the PSP GCC tools, linking via CXX results # in total chaos and more problems then you can handle. So we need # CC to link OpenTTD for PSP $(Q)+$(CC_HOST) $(LDFLAGS) $(OBJS) $(LIBS) -o $@ else $(Q)+$(CXX_HOST) $(LDFLAGS) $(OBJS) $(LIBS) -o $@ endif ifdef STRIP $(Q)$(STRIP) $@ endif ifeq ($(OS), DOS) $(E) '$(STAGE) Adding CWSDPMI stub to $@' $(Q)$(ROOT_DIR)/os/dos/make_dos_binary_selfcontained.sh $(SRC_OBJS_DIR)/$@ endif # The targets to compile the endian-code endian_target.h: $(ENDIAN_CHECK) $(CONFIG_CACHE_ENDIAN) $(E) '$(STAGE) Testing endianness for target' $(Q)./$(ENDIAN_CHECK) $(ENDIAN_FORCE) > $@ $(ENDIAN_CHECK): $(SRC_DIR)/endian_check.cpp $(E) '$(STAGE) Compiling and Linking $@' $(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $(CXXFLAGS_BUILD) $(LDFLAGS_BUILD) $< -o $@ # Revision files $(SRC_DIR)/rev.cpp: $(CONFIG_CACHE_VERSION) $(SRC_DIR)/rev.cpp.in $(Q)cat $(SRC_DIR)/rev.cpp.in | sed "s@\!\!REVISION\!\!@$(REV_NR)@g;s@!!VERSION!!@$(REV)@g;s@!!MODIFIED!!@$(MODIFIED)@g;s@!!DATE!!@`date +%d.%m.%y`@g" > $(SRC_DIR)/rev.cpp $(SRC_DIR)/os/windows/ottdres.rc: $(CONFIG_CACHE_VERSION) $(SRC_DIR)/os/windows/ottdres.rc.in $(Q)cat $(SRC_DIR)/os/windows/ottdres.rc.in | sed "s@\!\!REVISION\!\!@$(REV_NR)@g;s@!!VERSION!!@$(REV)@g;s@!!DATE!!@`date +%d.%m.%y`@g" > $(SRC_DIR)/os/windows/ottdres.rc FORCE: depend: $(DEPS) clean: $(E) '$(STAGE) Cleaning up object files' $(Q)rm -f $(DEPS) $(OBJS) $(TTD) $(DEPEND) $(TTD:%=$(BIN_DIR)/%) $(BIN_DIR)/baseset/openttd.32.bmp $(CONFIG_CACHE_COMPILER) $(CONFIG_CACHE_LINKER) $(CONFIG_CACHE_ENDIAN) $(CONFIG_CACHE_SOURCE) $(ENDIAN_TARGETS) mrproper: clean $(Q)rm -f $(SRC_DIR)/rev.cpp $(SRC_DIR)/os/windows/ottdres.rc %.o: @echo '$(STAGE) No such source-file: $(@:%.o=%).[c|cpp|mm|rc]' .PHONY: all mrproper depend clean FORCE