summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorbjarni <bjarni@openttd.org>2005-07-24 20:47:42 +0000
committerbjarni <bjarni@openttd.org>2005-07-24 20:47:42 +0000
commitcb3c325e5f8bcb09f390ef7a1af0ef0442fe9462 (patch)
treea76a3caff196b9a4ee538b858977e8393b1f4d44 /Makefile
parent238e47cd42c009f2ab1359428788a65a26fafebb (diff)
downloadopenttd-cb3c325e5f8bcb09f390ef7a1af0ef0442fe9462.tar.xz
(svn r2703) - Feature: [OSX] Added a native alert window to show whatever error() needs to print (Tobin made this, while I fixed some issued in it)
- As a bonus, we now have an objective C file (os/macosx/macos.m) to use the functions Apple made to interact with OS stuff
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile17
1 files changed, 15 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 459fe810c..cea5a31a5 100644
--- a/Makefile
+++ b/Makefile
@@ -718,6 +718,8 @@ C_SOURCES += video/null_v.c
CXX_SOURCES =
+OBJC_SOURCES =
+
ifdef WITH_SDL
C_SOURCES += sdl.c
C_SOURCES += sound/sdl_s.c
@@ -734,7 +736,11 @@ C_SOURCES += unix.c
C_SOURCES += music/extmidi.c
endif
-OBJS = $(C_SOURCES:%.c=%.o) $(CXX_SOURCES:%.cpp=%.o)
+ifdef OSX
+OBJC_SOURCES += os/macosx/macos.m
+endif
+
+OBJS = $(C_SOURCES:%.c=%.o) $(CXX_SOURCES:%.cpp=%.o) $(OBJC_SOURCES:%.m=%.o)
ifdef BEOS
CXX_SOURCES += music/bemidi.cpp
@@ -795,6 +801,9 @@ quiet_cmd_c_compile = '===> Compiling $<'
quiet_cmd_cxx_compile = '===> Compiling $<'
cmd_cxx_compile = $(CXX) $(COMPILE_PARAMS)
+quiet_cmd_objc_compile = '===> Compiling $<'
+ cmd_objc_compile = $(CC) $(COMPILE_PARAMS)
+
##############################################################################
#
@@ -1036,7 +1045,7 @@ upgradeconf: $(MAKE_CONFIG)
### Internal build rules
# This makes sure the .deps dir is always around.
-DEPS_MAGIC := $(shell mkdir -p .deps .deps/music .deps/sound .deps/video)
+DEPS_MAGIC := $(shell mkdir -p .deps .deps/music .deps/sound .deps/video .deps/os .deps/os/macosx)
# Introduce the dependencies
-include $(DEPS)
@@ -1054,6 +1063,10 @@ DEPS_MAGIC := $(shell mkdir -p .deps .deps/music .deps/sound .deps/video)
$(call cmd,cxx_compile)
@mv $(<:%.cpp=%.d) $(<:%.cpp=.deps/%.d)
+%.o: %.m $(MAKE_CONFIG) endian_target.h table/strings.h
+ $(call cmd,objc_compile)
+ @mv $(<:%.m=%.d) $(<:%.m=.deps/%.d)
+
# Silence stale header dependencies
%.h:
@true