Makefile
changeset 2735 07adb417aa05
parent 2731 888a994e9fe9
child 2736 3d6487cbbb69
equal deleted inserted replaced
2734:3fd8a3519be0 2735:07adb417aa05
   606 
   606 
   607 
   607 
   608 ### Sources
   608 ### Sources
   609 
   609 
   610 # clean up C_SOURCES first. Needed since building universal binaries on OSX calls the makefile recursively (just one time)
   610 # clean up C_SOURCES first. Needed since building universal binaries on OSX calls the makefile recursively (just one time)
   611 C_SOURCES:=
   611 SRCS :=
   612 
   612 
   613 C_SOURCES += aircraft_cmd.c
   613 SRCS += aircraft_cmd.c
   614 C_SOURCES += aircraft_gui.c
   614 SRCS += aircraft_gui.c
   615 C_SOURCES += airport.c
   615 SRCS += airport.c
   616 C_SOURCES += airport_gui.c
   616 SRCS += airport_gui.c
   617 C_SOURCES += aystar.c
   617 SRCS += aystar.c
   618 C_SOURCES += bridge_gui.c
   618 SRCS += bridge_gui.c
   619 C_SOURCES += callback_table.c
   619 SRCS += callback_table.c
   620 C_SOURCES += clear_cmd.c
   620 SRCS += clear_cmd.c
   621 C_SOURCES += command.c
   621 SRCS += command.c
   622 C_SOURCES += console.c
   622 SRCS += console.c
   623 C_SOURCES += console_cmds.c
   623 SRCS += console_cmds.c
   624 C_SOURCES += currency.c
   624 SRCS += currency.c
   625 C_SOURCES += debug.c
   625 SRCS += debug.c
   626 C_SOURCES += dedicated.c
   626 SRCS += dedicated.c
   627 C_SOURCES += depot.c
   627 SRCS += depot.c
   628 C_SOURCES += disaster_cmd.c
   628 SRCS += disaster_cmd.c
   629 C_SOURCES += dock_gui.c
   629 SRCS += dock_gui.c
   630 C_SOURCES += driver.c
   630 SRCS += driver.c
   631 C_SOURCES += dummy_land.c
   631 SRCS += dummy_land.c
   632 C_SOURCES += economy.c
   632 SRCS += economy.c
   633 C_SOURCES += engine.c
   633 SRCS += engine.c
   634 C_SOURCES += engine_gui.c
   634 SRCS += engine_gui.c
   635 C_SOURCES += fileio.c
   635 SRCS += fileio.c
   636 C_SOURCES += gfx.c
   636 SRCS += gfx.c
   637 C_SOURCES += gfxinit.c
   637 SRCS += gfxinit.c
   638 C_SOURCES += graph_gui.c
   638 SRCS += graph_gui.c
   639 C_SOURCES += newgrf.c
   639 SRCS += industry_cmd.c
   640 C_SOURCES += industry_cmd.c
   640 SRCS += industry_gui.c
   641 C_SOURCES += industry_gui.c
   641 SRCS += intro_gui.c
   642 C_SOURCES += intro_gui.c
   642 SRCS += landscape.c
   643 C_SOURCES += landscape.c
   643 SRCS += main_gui.c
   644 C_SOURCES += main_gui.c
   644 SRCS += map.c
   645 C_SOURCES += map.c
   645 SRCS += md5.c
   646 C_SOURCES += md5.c
   646 SRCS += mersenne.c
   647 C_SOURCES += mersenne.c
   647 SRCS += minilzo.c
   648 C_SOURCES += minilzo.c
   648 SRCS += misc.c
   649 C_SOURCES += misc.c
   649 SRCS += misc_cmd.c
   650 C_SOURCES += misc_cmd.c
   650 SRCS += misc_gui.c
   651 C_SOURCES += misc_gui.c
   651 SRCS += mixer.c
   652 C_SOURCES += mixer.c
   652 SRCS += music_gui.c
   653 C_SOURCES += music_gui.c
   653 SRCS += namegen.c
   654 C_SOURCES += namegen.c
   654 SRCS += network.c
   655 C_SOURCES += network.c
   655 SRCS += network_client.c
   656 C_SOURCES += network_client.c
   656 SRCS += network_data.c
   657 C_SOURCES += network_data.c
   657 SRCS += network_gamelist.c
   658 C_SOURCES += network_gamelist.c
   658 SRCS += network_gui.c
   659 C_SOURCES += network_gui.c
   659 SRCS += network_server.c
   660 C_SOURCES += network_server.c
   660 SRCS += network_udp.c
   661 C_SOURCES += network_udp.c
   661 SRCS += newgrf.c
   662 C_SOURCES += news_gui.c
   662 SRCS += news_gui.c
   663 C_SOURCES += npf.c
   663 SRCS += npf.c
   664 C_SOURCES += oldloader.c
   664 SRCS += oldloader.c
   665 C_SOURCES += order_cmd.c
   665 SRCS += openttd.c
   666 C_SOURCES += order_gui.c
   666 SRCS += order_cmd.c
   667 C_SOURCES += openttd.c
   667 SRCS += order_gui.c
   668 C_SOURCES += pathfind.c
   668 SRCS += pathfind.c
   669 C_SOURCES += pbs.c
   669 SRCS += pbs.c
   670 C_SOURCES += player_gui.c
   670 SRCS += player_gui.c
   671 C_SOURCES += players.c
   671 SRCS += players.c
   672 C_SOURCES += pool.c
   672 SRCS += pool.c
   673 C_SOURCES += queue.c
   673 SRCS += queue.c
   674 C_SOURCES += rail.c
   674 SRCS += rail.c
   675 C_SOURCES += rail_cmd.c
   675 SRCS += rail_cmd.c
   676 C_SOURCES += rail_gui.c
   676 SRCS += rail_gui.c
   677 C_SOURCES += rev.c
   677 SRCS += rev.c
   678 C_SOURCES += road_cmd.c
   678 SRCS += road_cmd.c
   679 C_SOURCES += road_gui.c
   679 SRCS += road_gui.c
   680 C_SOURCES += roadveh_cmd.c
   680 SRCS += roadveh_cmd.c
   681 C_SOURCES += roadveh_gui.c
   681 SRCS += roadveh_gui.c
   682 C_SOURCES += saveload.c
   682 SRCS += saveload.c
   683 C_SOURCES += screenshot.c
   683 SRCS += screenshot.c
   684 C_SOURCES += settings.c
   684 SRCS += settings.c
   685 C_SOURCES += settings_gui.c
   685 SRCS += settings_gui.c
   686 C_SOURCES += ship_cmd.c
   686 SRCS += ship_cmd.c
   687 C_SOURCES += ship_gui.c
   687 SRCS += ship_gui.c
   688 C_SOURCES += signs.c
   688 SRCS += signs.c
   689 C_SOURCES += smallmap_gui.c
   689 SRCS += smallmap_gui.c
   690 C_SOURCES += sound.c
   690 SRCS += sound.c
   691 C_SOURCES += sprite.c
   691 SRCS += sprite.c
   692 C_SOURCES += spritecache.c
   692 SRCS += spritecache.c
   693 C_SOURCES += station_cmd.c
   693 SRCS += station_cmd.c
   694 C_SOURCES += station_gui.c
   694 SRCS += station_gui.c
   695 C_SOURCES += station_newgrf.c
   695 SRCS += station_newgrf.c
   696 C_SOURCES += string.c
   696 SRCS += string.c
   697 C_SOURCES += strings.c
   697 SRCS += strings.c
   698 C_SOURCES += subsidy_gui.c
   698 SRCS += subsidy_gui.c
   699 C_SOURCES += terraform_gui.c
   699 SRCS += terraform_gui.c
   700 C_SOURCES += texteff.c
   700 SRCS += texteff.c
   701 C_SOURCES += thread.c
   701 SRCS += thread.c
   702 C_SOURCES += tile.c
   702 SRCS += tile.c
   703 C_SOURCES += town_cmd.c
   703 SRCS += town_cmd.c
   704 C_SOURCES += town_gui.c
   704 SRCS += town_gui.c
   705 C_SOURCES += train_cmd.c
   705 SRCS += train_cmd.c
   706 C_SOURCES += train_gui.c
   706 SRCS += train_gui.c
   707 C_SOURCES += tree_cmd.c
   707 SRCS += tree_cmd.c
   708 C_SOURCES += tunnelbridge_cmd.c
   708 SRCS += tunnelbridge_cmd.c
   709 C_SOURCES += unmovable_cmd.c
   709 SRCS += unmovable_cmd.c
   710 C_SOURCES += vehicle.c
   710 SRCS += vehicle.c
   711 C_SOURCES += vehicle_gui.c
   711 SRCS += vehicle_gui.c
   712 C_SOURCES += viewport.c
   712 SRCS += viewport.c
   713 C_SOURCES += water_cmd.c
   713 SRCS += water_cmd.c
   714 C_SOURCES += waypoint.c
   714 SRCS += waypoint.c
   715 C_SOURCES += widget.c
   715 SRCS += widget.c
   716 C_SOURCES += window.c
   716 SRCS += window.c
   717 C_SOURCES += music/null_m.c
   717 SRCS += music/null_m.c
   718 C_SOURCES += sound/null_s.c
   718 SRCS += sound/null_s.c
   719 C_SOURCES += video/dedicated_v.c
   719 SRCS += video/dedicated_v.c
   720 C_SOURCES += video/null_v.c
   720 SRCS += video/null_v.c
   721 
   721 
   722 # AI related files
   722 # AI related files
   723 C_SOURCES += ai/ai.c
   723 SRCS += ai/ai.c
   724 C_SOURCES += ai/default/default.c
   724 SRCS += ai/default/default.c
   725 C_SOURCES += ai/trolly/trolly.c
   725 SRCS += ai/trolly/build.c
   726 C_SOURCES += ai/trolly/build.c
   726 SRCS += ai/trolly/pathfinder.c
   727 C_SOURCES += ai/trolly/pathfinder.c
   727 SRCS += ai/trolly/shared.c
   728 C_SOURCES += ai/trolly/shared.c
   728 SRCS += ai/trolly/trolly.c
   729 
       
   730 CXX_SOURCES =
       
   731 
       
   732 OBJC_SOURCES =
       
   733 
   729 
   734 ifdef WITH_SDL
   730 ifdef WITH_SDL
   735 C_SOURCES += sdl.c
   731   SRCS += sdl.c
   736 C_SOURCES += sound/sdl_s.c
   732   SRCS += sound/sdl_s.c
   737 C_SOURCES += video/sdl_v.c
   733   SRCS += video/sdl_v.c
   738 endif
   734 endif
   739 
   735 
   740 ifdef WIN32
   736 ifdef WIN32
   741 C_SOURCES += win32.c
   737   SRCS += win32.c
   742 C_SOURCES += music/win32_m.c
   738   SRCS += music/win32_m.c
   743 C_SOURCES += sound/win32_s.c
   739   SRCS += sound/win32_s.c
   744 C_SOURCES += video/win32_v.c
   740   SRCS += video/win32_v.c
   745 else
   741 else
   746 C_SOURCES += unix.c
   742   SRCS += unix.c
   747 C_SOURCES += music/extmidi.c
   743   SRCS += music/extmidi.c
   748 endif
   744 endif
   749 
   745 
   750 ifdef OSX
   746 ifdef OSX
   751 OBJC_SOURCES += os/macosx/macos.m
   747   SRCS += os/macosx/macos.m
   752 ifndef DEDICATED
   748   ifndef DEDICATED
   753 C_SOURCES    += music/qtmidi.c
   749     SRCS += music/qtmidi.c
   754 endif
   750   endif
   755 endif
   751 endif
   756 
       
   757 OBJS = $(C_SOURCES:%.c=%.o) $(CXX_SOURCES:%.cpp=%.o) $(OBJC_SOURCES:%.m=%.o)
       
   758 
   752 
   759 ifdef BEOS
   753 ifdef BEOS
   760 CXX_SOURCES += music/bemidi.cpp
   754   SRCS += music/bemidi.cpp
   761 endif
   755 endif
   762 
   756 
   763 ifdef WIN32
   757 ifdef WIN32
   764 # Resource file
   758   # Resource file
   765 OBJS += winres.o
   759   OBJS += winres.o
   766 endif
   760 endif
   767 
   761 
   768 ifdef WITH_DIRECTMUSIC
   762 ifdef WITH_DIRECTMUSIC
   769 CXX_SOURCES += music/dmusic.cpp
   763   SRCS += music/dmusic.cpp
   770 endif
   764 endif
   771 
   765 
       
   766 OBJS += $(filter %.o, $(SRCS:%.cpp=%.o) $(SRCS:%.m=%.o) $(SRCS:%.c=%.o) $(SRCS:%.rc=%.o))
   772 DEPS = $(OBJS:%.o=.deps/%.d)
   767 DEPS = $(OBJS:%.o=.deps/%.d)
   773 
   768 
   774 LANG_TXT = $(filter-out %.unfinished.txt,$(wildcard lang/*.txt))
   769 LANG_TXT = $(filter-out %.unfinished.txt,$(wildcard lang/*.txt))
   775 LANGS = $(LANG_TXT:%.txt=%.lng)
   770 LANGS = $(LANG_TXT:%.txt=%.lng)
   776 
   771