(svn r3280) Merge the seperate (C|CXX|OBJC)_SOURCES variables into a single variable SRCS

Now adding a new file to compile is just adding a line like SRCS += $(FIILE), regardless of type
This commit is contained in:
tron 2005-12-10 07:29:31 +00:00
parent b6ca90e021
commit f1877b3fe9
1 changed files with 133 additions and 138 deletions

271
Makefile
View File

@ -608,167 +608,162 @@ endif
### Sources ### Sources
# clean up C_SOURCES first. Needed since building universal binaries on OSX calls the makefile recursively (just one time) # clean up C_SOURCES first. Needed since building universal binaries on OSX calls the makefile recursively (just one time)
C_SOURCES:= SRCS :=
C_SOURCES += aircraft_cmd.c SRCS += aircraft_cmd.c
C_SOURCES += aircraft_gui.c SRCS += aircraft_gui.c
C_SOURCES += airport.c SRCS += airport.c
C_SOURCES += airport_gui.c SRCS += airport_gui.c
C_SOURCES += aystar.c SRCS += aystar.c
C_SOURCES += bridge_gui.c SRCS += bridge_gui.c
C_SOURCES += callback_table.c SRCS += callback_table.c
C_SOURCES += clear_cmd.c SRCS += clear_cmd.c
C_SOURCES += command.c SRCS += command.c
C_SOURCES += console.c SRCS += console.c
C_SOURCES += console_cmds.c SRCS += console_cmds.c
C_SOURCES += currency.c SRCS += currency.c
C_SOURCES += debug.c SRCS += debug.c
C_SOURCES += dedicated.c SRCS += dedicated.c
C_SOURCES += depot.c SRCS += depot.c
C_SOURCES += disaster_cmd.c SRCS += disaster_cmd.c
C_SOURCES += dock_gui.c SRCS += dock_gui.c
C_SOURCES += driver.c SRCS += driver.c
C_SOURCES += dummy_land.c SRCS += dummy_land.c
C_SOURCES += economy.c SRCS += economy.c
C_SOURCES += engine.c SRCS += engine.c
C_SOURCES += engine_gui.c SRCS += engine_gui.c
C_SOURCES += fileio.c SRCS += fileio.c
C_SOURCES += gfx.c SRCS += gfx.c
C_SOURCES += gfxinit.c SRCS += gfxinit.c
C_SOURCES += graph_gui.c SRCS += graph_gui.c
C_SOURCES += newgrf.c SRCS += industry_cmd.c
C_SOURCES += industry_cmd.c SRCS += industry_gui.c
C_SOURCES += industry_gui.c SRCS += intro_gui.c
C_SOURCES += intro_gui.c SRCS += landscape.c
C_SOURCES += landscape.c SRCS += main_gui.c
C_SOURCES += main_gui.c SRCS += map.c
C_SOURCES += map.c SRCS += md5.c
C_SOURCES += md5.c SRCS += mersenne.c
C_SOURCES += mersenne.c SRCS += minilzo.c
C_SOURCES += minilzo.c SRCS += misc.c
C_SOURCES += misc.c SRCS += misc_cmd.c
C_SOURCES += misc_cmd.c SRCS += misc_gui.c
C_SOURCES += misc_gui.c SRCS += mixer.c
C_SOURCES += mixer.c SRCS += music_gui.c
C_SOURCES += music_gui.c SRCS += namegen.c
C_SOURCES += namegen.c SRCS += network.c
C_SOURCES += network.c SRCS += network_client.c
C_SOURCES += network_client.c SRCS += network_data.c
C_SOURCES += network_data.c SRCS += network_gamelist.c
C_SOURCES += network_gamelist.c SRCS += network_gui.c
C_SOURCES += network_gui.c SRCS += network_server.c
C_SOURCES += network_server.c SRCS += network_udp.c
C_SOURCES += network_udp.c SRCS += newgrf.c
C_SOURCES += news_gui.c SRCS += news_gui.c
C_SOURCES += npf.c SRCS += npf.c
C_SOURCES += oldloader.c SRCS += oldloader.c
C_SOURCES += order_cmd.c SRCS += openttd.c
C_SOURCES += order_gui.c SRCS += order_cmd.c
C_SOURCES += openttd.c SRCS += order_gui.c
C_SOURCES += pathfind.c SRCS += pathfind.c
C_SOURCES += pbs.c SRCS += pbs.c
C_SOURCES += player_gui.c SRCS += player_gui.c
C_SOURCES += players.c SRCS += players.c
C_SOURCES += pool.c SRCS += pool.c
C_SOURCES += queue.c SRCS += queue.c
C_SOURCES += rail.c SRCS += rail.c
C_SOURCES += rail_cmd.c SRCS += rail_cmd.c
C_SOURCES += rail_gui.c SRCS += rail_gui.c
C_SOURCES += rev.c SRCS += rev.c
C_SOURCES += road_cmd.c SRCS += road_cmd.c
C_SOURCES += road_gui.c SRCS += road_gui.c
C_SOURCES += roadveh_cmd.c SRCS += roadveh_cmd.c
C_SOURCES += roadveh_gui.c SRCS += roadveh_gui.c
C_SOURCES += saveload.c SRCS += saveload.c
C_SOURCES += screenshot.c SRCS += screenshot.c
C_SOURCES += settings.c SRCS += settings.c
C_SOURCES += settings_gui.c SRCS += settings_gui.c
C_SOURCES += ship_cmd.c SRCS += ship_cmd.c
C_SOURCES += ship_gui.c SRCS += ship_gui.c
C_SOURCES += signs.c SRCS += signs.c
C_SOURCES += smallmap_gui.c SRCS += smallmap_gui.c
C_SOURCES += sound.c SRCS += sound.c
C_SOURCES += sprite.c SRCS += sprite.c
C_SOURCES += spritecache.c SRCS += spritecache.c
C_SOURCES += station_cmd.c SRCS += station_cmd.c
C_SOURCES += station_gui.c SRCS += station_gui.c
C_SOURCES += station_newgrf.c SRCS += station_newgrf.c
C_SOURCES += string.c SRCS += string.c
C_SOURCES += strings.c SRCS += strings.c
C_SOURCES += subsidy_gui.c SRCS += subsidy_gui.c
C_SOURCES += terraform_gui.c SRCS += terraform_gui.c
C_SOURCES += texteff.c SRCS += texteff.c
C_SOURCES += thread.c SRCS += thread.c
C_SOURCES += tile.c SRCS += tile.c
C_SOURCES += town_cmd.c SRCS += town_cmd.c
C_SOURCES += town_gui.c SRCS += town_gui.c
C_SOURCES += train_cmd.c SRCS += train_cmd.c
C_SOURCES += train_gui.c SRCS += train_gui.c
C_SOURCES += tree_cmd.c SRCS += tree_cmd.c
C_SOURCES += tunnelbridge_cmd.c SRCS += tunnelbridge_cmd.c
C_SOURCES += unmovable_cmd.c SRCS += unmovable_cmd.c
C_SOURCES += vehicle.c SRCS += vehicle.c
C_SOURCES += vehicle_gui.c SRCS += vehicle_gui.c
C_SOURCES += viewport.c SRCS += viewport.c
C_SOURCES += water_cmd.c SRCS += water_cmd.c
C_SOURCES += waypoint.c SRCS += waypoint.c
C_SOURCES += widget.c SRCS += widget.c
C_SOURCES += window.c SRCS += window.c
C_SOURCES += music/null_m.c SRCS += music/null_m.c
C_SOURCES += sound/null_s.c SRCS += sound/null_s.c
C_SOURCES += video/dedicated_v.c SRCS += video/dedicated_v.c
C_SOURCES += video/null_v.c SRCS += video/null_v.c
# AI related files # AI related files
C_SOURCES += ai/ai.c SRCS += ai/ai.c
C_SOURCES += ai/default/default.c SRCS += ai/default/default.c
C_SOURCES += ai/trolly/trolly.c SRCS += ai/trolly/build.c
C_SOURCES += ai/trolly/build.c SRCS += ai/trolly/pathfinder.c
C_SOURCES += ai/trolly/pathfinder.c SRCS += ai/trolly/shared.c
C_SOURCES += ai/trolly/shared.c SRCS += ai/trolly/trolly.c
CXX_SOURCES =
OBJC_SOURCES =
ifdef WITH_SDL ifdef WITH_SDL
C_SOURCES += sdl.c SRCS += sdl.c
C_SOURCES += sound/sdl_s.c SRCS += sound/sdl_s.c
C_SOURCES += video/sdl_v.c SRCS += video/sdl_v.c
endif endif
ifdef WIN32 ifdef WIN32
C_SOURCES += win32.c SRCS += win32.c
C_SOURCES += music/win32_m.c SRCS += music/win32_m.c
C_SOURCES += sound/win32_s.c SRCS += sound/win32_s.c
C_SOURCES += video/win32_v.c SRCS += video/win32_v.c
else else
C_SOURCES += unix.c SRCS += unix.c
C_SOURCES += music/extmidi.c SRCS += music/extmidi.c
endif endif
ifdef OSX ifdef OSX
OBJC_SOURCES += os/macosx/macos.m SRCS += os/macosx/macos.m
ifndef DEDICATED ifndef DEDICATED
C_SOURCES += music/qtmidi.c SRCS += music/qtmidi.c
endif
endif endif
endif
OBJS = $(C_SOURCES:%.c=%.o) $(CXX_SOURCES:%.cpp=%.o) $(OBJC_SOURCES:%.m=%.o)
ifdef BEOS ifdef BEOS
CXX_SOURCES += music/bemidi.cpp SRCS += music/bemidi.cpp
endif endif
ifdef WIN32 ifdef WIN32
# Resource file # Resource file
OBJS += winres.o OBJS += winres.o
endif endif
ifdef WITH_DIRECTMUSIC ifdef WITH_DIRECTMUSIC
CXX_SOURCES += music/dmusic.cpp SRCS += music/dmusic.cpp
endif endif
OBJS += $(filter %.o, $(SRCS:%.cpp=%.o) $(SRCS:%.m=%.o) $(SRCS:%.c=%.o) $(SRCS:%.rc=%.o))
DEPS = $(OBJS:%.o=.deps/%.d) DEPS = $(OBJS:%.o=.deps/%.d)
LANG_TXT = $(filter-out %.unfinished.txt,$(wildcard lang/*.txt)) LANG_TXT = $(filter-out %.unfinished.txt,$(wildcard lang/*.txt))