Makefile
changeset 2171 60334c9ca477
parent 2106 a3060fdb94c4
child 2174 24d868f1c576
equal deleted inserted replaced
2170:a4ebf51dc23a 2171:60334c9ca477
   333   CFLAGS += -pg
   333   CFLAGS += -pg
   334   LDFLAGS += -pg
   334   LDFLAGS += -pg
   335 endif
   335 endif
   336 
   336 
   337 CDEFS=-DWITH_REV
   337 CDEFS=-DWITH_REV
       
   338 CFLAGS += -I. -I-
   338 
   339 
   339 ifndef DEBUG
   340 ifndef DEBUG
   340 ifndef PROFILE
   341 ifndef PROFILE
   341 # Release mode
   342 # Release mode
   342 ifndef MORPHOS
   343 ifndef MORPHOS
   622 C_SOURCES += debug.c
   623 C_SOURCES += debug.c
   623 C_SOURCES += dedicated.c
   624 C_SOURCES += dedicated.c
   624 C_SOURCES += depot.c
   625 C_SOURCES += depot.c
   625 C_SOURCES += disaster_cmd.c
   626 C_SOURCES += disaster_cmd.c
   626 C_SOURCES += dock_gui.c
   627 C_SOURCES += dock_gui.c
       
   628 C_SOURCES += driver.c
   627 C_SOURCES += dummy_land.c
   629 C_SOURCES += dummy_land.c
   628 C_SOURCES += economy.c
   630 C_SOURCES += economy.c
   629 C_SOURCES += engine.c
   631 C_SOURCES += engine.c
   630 C_SOURCES += engine_gui.c
   632 C_SOURCES += engine_gui.c
   631 C_SOURCES += fileio.c
   633 C_SOURCES += fileio.c
   705 C_SOURCES += viewport.c
   707 C_SOURCES += viewport.c
   706 C_SOURCES += water_cmd.c
   708 C_SOURCES += water_cmd.c
   707 C_SOURCES += waypoint.c
   709 C_SOURCES += waypoint.c
   708 C_SOURCES += widget.c
   710 C_SOURCES += widget.c
   709 C_SOURCES += window.c
   711 C_SOURCES += window.c
       
   712 C_SOURCES += music/null.c
       
   713 C_SOURCES += sound/null.c
       
   714 C_SOURCES += video/null.c
   710 
   715 
   711 CXX_SOURCES =
   716 CXX_SOURCES =
   712 
   717 
   713 ifdef WITH_SDL
   718 ifdef WITH_SDL
   714 C_SOURCES += sdl.c
   719 C_SOURCES += sdl.c
       
   720 C_SOURCES += sound/sdl.c
       
   721 C_SOURCES += video/sdl.c
   715 endif
   722 endif
   716 
   723 
   717 ifdef WIN32
   724 ifdef WIN32
   718 C_SOURCES += win32.c w32dm.c
   725 C_SOURCES += win32.c
   719 else
   726 C_SOURCES += music/win32.c
   720 C_SOURCES += extmidi.c unix.c
   727 C_SOURCES += sound/win32.c
       
   728 C_SOURCES += video/win32.c
       
   729 else
       
   730 C_SOURCES += unix.c
       
   731 C_SOURCES += music/extmidi.c
   721 endif
   732 endif
   722 
   733 
   723 OBJS = $(C_SOURCES:%.c=%.o) $(CXX_SOURCES:%.cpp=%.o)
   734 OBJS = $(C_SOURCES:%.c=%.o) $(CXX_SOURCES:%.cpp=%.o)
   724 
   735 
   725 ifdef BEOS
   736 ifdef BEOS
   726 CXX_SOURCES += os/beos/bemidi.cpp
   737 CXX_SOURCES += music/bemidi.cpp
   727 CFLAGS += -I.
       
   728 endif
   738 endif
   729 
   739 
   730 ifdef WIN32
   740 ifdef WIN32
   731 # Resource file
   741 # Resource file
   732 OBJS += winres.o
   742 OBJS += winres.o
   733 endif
   743 endif
   734 
   744 
   735 ifdef WITH_DIRECTMUSIC
   745 ifdef WITH_DIRECTMUSIC
   736 CXX_SOURCES += w32dm2.cpp
   746 C_SOURCES += music/dmusic.c
       
   747 CXX_SOURCES += music/dmusic2.cpp
   737 endif
   748 endif
   738 
   749 
   739 DEPS = $(OBJS:%.o=.deps/%.d)
   750 DEPS = $(OBJS:%.o=.deps/%.d)
   740 
   751 
   741 LANG_TXT = $(filter-out %.unfinished.txt,$(wildcard lang/*.txt))
   752 LANG_TXT = $(filter-out %.unfinished.txt,$(wildcard lang/*.txt))
  1020 
  1031 
  1021 
  1032 
  1022 ### Internal build rules
  1033 ### Internal build rules
  1023 
  1034 
  1024 # This makes sure the .deps dir is always around.
  1035 # This makes sure the .deps dir is always around.
  1025 DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
  1036 DEPS_MAGIC := $(shell mkdir -p .deps .deps/music .deps/sound .deps/video)
  1026 
  1037 
  1027 # Introduce the dependencies
  1038 # Introduce the dependencies
  1028 -include $(DEPS)
  1039 -include $(DEPS)
  1029 
  1040 
  1030 # This compiles the object file as well as silently updating its dependencies
  1041 # This compiles the object file as well as silently updating its dependencies