author | KUDr |
Tue, 27 Feb 2007 13:26:47 +0000 | |
branch | cpp_gui |
changeset 6263 | 19dab6a68886 |
parent 6230 | 06c91ff0af27 |
child 6268 | 4b5241e5dd10 |
child 6407 | 483c1328a349 |
permissions | -rw-r--r-- |
5726
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
1 |
# Auto-generated file -- DO NOT EDIT |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
2 |
|
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
3 |
CC_HOST = !!CC_HOST!! |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
4 |
CXX_HOST = !!CXX_HOST!! |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
5 |
CC_BUILD = !!CC_BUILD!! |
5838
9c3129cb019b
(svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
rubidium
parents:
5786
diff
changeset
|
6 |
CXX_BUILD = !!CXX_BUILD!! |
5726
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
7 |
WINDRES = !!WINDRES!! |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
8 |
STRIP = !!STRIP!! |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
9 |
CC_CFLAGS = !!CC_CFLAGS!! |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
10 |
CFLAGS = !!CFLAGS!! |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
11 |
CFLAGS_BUILD = !!CFLAGS_BUILD!! |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
12 |
LIBS = !!LIBS!! |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
13 |
LDFLAGS = !!LDFLAGS!! |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
14 |
BIN_DIR = !!BIN_DIR!! |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
15 |
LANG_DIR = !!LANG_DIR!! |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
16 |
SRC_OBJS_DIR = !!SRC_OBJS_DIR!! |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
17 |
LANG_OBJS_DIR= !!LANG_OBJS_DIR!! |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
18 |
SRC_DIR = !!SRC_DIR!! |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
19 |
MEDIA_DIR = !!MEDIA_DIR!! |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
20 |
TTD = !!TTD!! |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
21 |
STRGEN = !!STRGEN!! |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
22 |
ENDIAN_CHECK = !!ENDIAN_CHECK!! |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
23 |
ENDIAN_FORCE = !!ENDIAN_FORCE!! |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
24 |
OS = !!OS!! |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
25 |
STAGE = !!STAGE!! |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
26 |
MAKEDEPEND = !!MAKEDEPEND!! |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
27 |
CFLAGS_MAKEDEP= !!CFLAGS_MAKEDEP!! |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
28 |
SORT = !!SORT!! |
5786
9ba0c445e6fb
(svn r7866) -Fix (r7759): ./configure --revision=[revision] did not work as intended.
rubidium
parents:
5747
diff
changeset
|
29 |
REVISION = !!REVISION!! |
5726
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
30 |
CONFIG_CACHE_COMPILER = $(SRC_OBJS_DIR)/!!CONFIG_CACHE_COMPILER!! |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
31 |
CONFIG_CACHE_LINKER = $(SRC_OBJS_DIR)/!!CONFIG_CACHE_LINKER!! |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
32 |
CONFIG_CACHE_ENDIAN = $(SRC_OBJS_DIR)/!!CONFIG_CACHE_ENDIAN!! |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
33 |
CONFIG_CACHE_SOURCE = $(SRC_OBJS_DIR)/!!CONFIG_CACHE_SOURCE!! |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
34 |
CONFIG_CACHE_VERSION = $(SRC_OBJS_DIR)/!!CONFIG_CACHE_VERSION!! |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
35 |
|
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
36 |
OBJS_C := !!OBJS_C!! |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
37 |
OBJS_CPP := !!OBJS_CPP!! |
6192
c6adfc929c6b
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
5901
diff
changeset
|
38 |
OBJS_MM := !!OBJS_MM!! |
5726
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
39 |
OBJS_RC := !!OBJS_RC!! |
6192
c6adfc929c6b
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
5901
diff
changeset
|
40 |
OBJS := $(OBJS_C) $(OBJS_CPP) $(OBJS_MM) $(OBJS_RC) |
5726
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
41 |
SRCS := !!SRCS!! |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
42 |
|
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
43 |
# All C-files depend on those 3 files |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
44 |
FILE_DEP := $(CONFIG_CACHE_COMPILER) $(LANG_OBJS_DIR)/table/strings.h endian_target.h |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
45 |
# Create all dirs and subdirs |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
46 |
RES := $(shell mkdir -p $(BIN_DIR) $(sort $(dir $(OBJS)))) |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
47 |
|
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
48 |
# Make sure endian_target.h is reasable as if it was in the src/ dir |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
49 |
CFLAGS += -I $(SRC_OBJS_DIR) -I $(LANG_OBJS_DIR) |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
50 |
|
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
51 |
ENDIAN_TARGETS := endian_target.h $(ENDIAN_CHECK) |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
52 |
|
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
53 |
# Check if we want to show what we are doing |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
54 |
ifdef VERBOSE |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
55 |
Q = |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
56 |
E = @true |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
57 |
else |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
58 |
Q = @ |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
59 |
E = @echo |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
60 |
endif |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
61 |
|
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
62 |
# Our default target |
5861
11c77d9df7fb
(svn r8067) -Fix (r7759): if bin/$(TTD) was removed, it did not get placed back on make unless $(TTD) got relinked.
rubidium
parents:
5838
diff
changeset
|
63 |
all: $(BIN_DIR)/$(TTD) |
5726
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
64 |
|
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
65 |
# This are 2 rules that are pointing back to STRGEN stuff. |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
66 |
# There is not really a need to have them here, but in case |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
67 |
# some weirdo wants to run 'make' in the 'src' dir and expects |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
68 |
# the languages to be recompiled, this catches that case and |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
69 |
# takes care of it nicely. |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
70 |
$(LANG_OBJS_DIR)/$(STRGEN): |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
71 |
$(MAKE) -C $(LANG_OBJS_DIR) $(STRGEN) |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
72 |
|
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
73 |
$(LANG_OBJS_DIR)/table/strings.h: $(LANG_DIR)/english.txt $(LANG_OBJS_DIR)/$(STRGEN) |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
74 |
$(MAKE) -C $(LANG_OBJS_DIR) table/strings.h |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
75 |
|
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
76 |
# Make the revision number |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
77 |
ifdef REVISION |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
78 |
REV := $(REVISION) |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
79 |
else |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
80 |
# Are we a SVN dir? |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
81 |
ifeq ($(shell if test -d $(SRC_DIR)/.svn; then echo 1; fi), 1) |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
82 |
# Find if the local source if modified |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
83 |
REV_MODIFIED := $(shell svnversion $(SRC_DIR) | sed -n 's/.*\(M\).*/\1/p' ) |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
84 |
# Find the revision like: rXXXX-branch |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
85 |
REV := $(shell LC_ALL=C svn info $(SRC_DIR) | awk '/^URL:.*branch/ { split($$2, a, "/"); BRANCH="-"a[5] } /^Last Changed Rev:/ { REV="r"$$4"$(REV_MODIFIED)" } END { print REV BRANCH }') |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
86 |
endif |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
87 |
endif |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
88 |
# Make sure we have something in REV |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
89 |
ifeq ($(REV),) |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
90 |
REV := norev000 |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
91 |
endif |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
92 |
|
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
93 |
# This helps to recompile if flags change |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
94 |
RES := $(shell if [ "`cat $(CONFIG_CACHE_COMPILER) 2>/dev/null`" != "$(CC_CFLAGS) $(CFLAGS)" ]; then echo "$(CC_CFLAGS) $(CFLAGS)" > $(CONFIG_CACHE_COMPILER); fi ) |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
95 |
RES := $(shell if [ "`cat $(CONFIG_CACHE_LINKER) 2>/dev/null`" != "$(LDFLAGS) $(LIBS)" ]; then echo "$(LDFLAGS) $(LIBS)" > $(CONFIG_CACHE_LINKER); fi ) |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
96 |
RES := $(shell if [ "`cat $(CONFIG_CACHE_ENDIAN) 2>/dev/null`" != "$(ENDIAN_FORCE)" ]; then echo "$(ENDIAN_FORCE)" > $(CONFIG_CACHE_ENDIAN); fi ) |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
97 |
|
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
98 |
# If there is a change in the source-file-list, make sure we recheck the deps |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
99 |
RES := $(shell if [ "`cat $(CONFIG_CACHE_SOURCE) 2>/dev/null`" != "$(SRCS)" ]; then echo "$(SRCS)" > $(CONFIG_CACHE_SOURCE); fi ) |
5838
9c3129cb019b
(svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
rubidium
parents:
5786
diff
changeset
|
100 |
# If there is a change in the revision, make sure we recompile rev.cpp |
5726
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
101 |
RES := $(shell if [ "`cat $(CONFIG_CACHE_VERSION) 2>/dev/null`" != "$(REV)" ]; then echo "$(REV)" > $(CONFIG_CACHE_VERSION); fi ) |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
102 |
|
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
103 |
ifndef MAKEDEPEND |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
104 |
# The slow, but always correct, dep-check |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
105 |
DEP_MASK := %.d |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
106 |
DEPS := $(OBJS:%.o=%.d) |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
107 |
|
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
108 |
# Only include the deps if we are compiling everything |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
109 |
ifeq ($(filter $(ENDIAN_TARGETS) %.o clean mrproper, $(MAKECMDGOALS)),) |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
110 |
-include $(DEPS) |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
111 |
else |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
112 |
# In case we want to compile a single target, include the .d file for it |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
113 |
ifneq ($(filter %.o, $(MAKECMDGOALS)),) |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
114 |
SINGLE_DEP := $(filter %.o, $(MAKECMDGOALS)) |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
115 |
-include $(SINGLE_DEP:%.o=%.d) |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
116 |
endif |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
117 |
endif |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
118 |
|
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
119 |
# Find the deps via GCC. Rarely wrong, but a bit slow |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
120 |
|
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
121 |
$(OBJS_C:%.o=%.d): %.d: $(SRC_DIR)/%.c $(FILE_DEP) |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
122 |
$(E) '$(STAGE) DEP $(<:$(SRC_DIR)/%.c=%.c)' |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
123 |
$(Q)$(CC_HOST) $(CC_CFLAGS) $(CFLAGS) -MM $< | sed 's#^$(@F:%.d=%.o):#$@ $(@:%.d=%.o):#' > $@ |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
124 |
|
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
125 |
$(OBJS_CPP:%.o=%.d): %.d: $(SRC_DIR)/%.cpp $(FILE_DEP) |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
126 |
$(E) '$(STAGE) DEP $(<:$(SRC_DIR)/%.cpp=%.cpp)' |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
127 |
$(Q)$(CXX_HOST) $(CFLAGS) -MM $< | sed 's#^$(@F:%.d=%.o):#$@ $(@:%.d=%.o):#' > $@ |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
128 |
|
6192
c6adfc929c6b
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
5901
diff
changeset
|
129 |
$(OBJS_MM:%.o=%.d): %.d: $(SRC_DIR)/%.mm $(FILE_DEP) |
c6adfc929c6b
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
5901
diff
changeset
|
130 |
$(E) '$(STAGE) DEP $(<:$(SRC_DIR)/%.mm=%.mm)' |
c6adfc929c6b
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
5901
diff
changeset
|
131 |
$(Q)$(CC_HOST) $(CFLAGS) -MM $< | sed 's#^$(@F:%.d=%.o):#$@ $(@:%.d=%.o):#' > $@ |
5726
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
132 |
|
5729
2aea0a06ad5f
(svn r7762) [Configure] -Fix: .rc files were not ignored in old DEP system
truelight
parents:
5726
diff
changeset
|
133 |
$(OBJS_RC:%.o=%.d): %.d: $(SRC_DIR)/%.rc $(FILE_DEP) |
6192
c6adfc929c6b
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
5901
diff
changeset
|
134 |
$(E) '$(STAGE) DEP $(<:$(SRC_DIR)/%.mm=%.mm)' |
5729
2aea0a06ad5f
(svn r7762) [Configure] -Fix: .rc files were not ignored in old DEP system
truelight
parents:
5726
diff
changeset
|
135 |
$(Q)touch $@ |
2aea0a06ad5f
(svn r7762) [Configure] -Fix: .rc files were not ignored in old DEP system
truelight
parents:
5726
diff
changeset
|
136 |
|
5726
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
137 |
else |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
138 |
# The much faster, but can be wrong, dep-check |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
139 |
DEP_MASK := |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
140 |
DEPS := Makefile.dep |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
141 |
|
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
142 |
# Only include the deps if we are not cleaning |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
143 |
ifeq ($(filter $(ENDIAN_TARGETS) depend clean mrproper, $(MAKECMDGOALS)),) |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
144 |
-include Makefile.dep |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
145 |
endif |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
146 |
|
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
147 |
# Make sure that only 'make depend' ALWAYS triggers a recheck |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
148 |
ifeq ($(filter depend, $(MAKECMDGOALS)),) |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
149 |
Makefile.dep: $(FILE_DEP) $(SRCS:%=$(SRC_DIR)/%) $(CONFIG_CACHE_SOURCE) |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
150 |
else |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
151 |
Makefile.dep: FORCE |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
152 |
endif |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
153 |
$(E) '$(STAGE) DEP CHECK (all files)' |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
154 |
$(Q)rm -f Makefile.dep.tmp |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
155 |
$(Q)touch Makefile.dep.tmp |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
156 |
|
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
157 |
# Calculate the deps via makedepend |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
158 |
$(Q)$(MAKEDEPEND) -f$(SRC_OBJS_DIR)/Makefile.dep.tmp -o.o -Y -v -- $(CFLAGS_MAKEDEP) -- $(SRCS:%=$(SRC_DIR)/%) 2>/dev/null |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
159 |
|
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
160 |
# Convert x:/... paths to /x/... for mingw |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
161 |
ifeq ($(OS), MINGW) |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
162 |
@cat Makefile.dep.tmp | sed 's@\([a-zA-Z]\):/@/\1/@g' > Makefile.dep.tmp.mingw |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
163 |
@cp Makefile.dep.tmp.mingw Makefile.dep.tmp |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
164 |
@rm -f Makefile.dep.tmp.mingw |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
165 |
endif |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
166 |
|
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
167 |
# Remove all comments and includes that don't start with $(SRC_DIR) |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
168 |
# Remove $(SRC_DIR) from object-file-name |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
169 |
@awk ' \ |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
170 |
/^# DO NOT/ { print $$0 ; next} \ |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
171 |
/^#/ {next} \ |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
172 |
/:/ { \ |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
173 |
left = NF - 1; \ |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
174 |
for (n = 2; n <= NF; n++) { \ |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
175 |
if (match($$n, "^$(SRC_DIR)") == 0) { \ |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
176 |
$$n = ""; \ |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
177 |
left--; \ |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
178 |
} \ |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
179 |
} \ |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
180 |
gsub("$(SRC_DIR)/", "", $$1); \ |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
181 |
if (left > 0) { \ |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
182 |
print $$0; \ |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
183 |
$$1 = "Makefile.dep:"; \ |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
184 |
print $$0; \ |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
185 |
} \ |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
186 |
next \ |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
187 |
} \ |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
188 |
{ \ |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
189 |
print $$0 \ |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
190 |
} \ |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
191 |
' < Makefile.dep.tmp | sed 's/ */ /g;s/ $$//' | $(SORT) > Makefile.dep |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
192 |
|
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
193 |
$(Q)rm -f Makefile.dep.tmp Makefile.dep.tmp.bak |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
194 |
|
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
195 |
endif |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
196 |
|
5901
e2e5001f4390
(svn r8109) -Fix r5693: ignore .hpp to avoid problems with deps
glx
parents:
5861
diff
changeset
|
197 |
# Avoid problems with deps if a .h/.hpp file is deleted without the deps |
5726
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
198 |
# being updated. Now the Makefile continues, the deps are recreated |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
199 |
# and all will be fine. |
5901
e2e5001f4390
(svn r8109) -Fix r5693: ignore .hpp to avoid problems with deps
glx
parents:
5861
diff
changeset
|
200 |
%.h %.hpp: |
5726
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
201 |
@true |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
202 |
|
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
203 |
|
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
204 |
# Compile all the files according to the targets |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
205 |
|
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
206 |
$(OBJS_C): %.o: $(SRC_DIR)/%.c $(DEP_MASK) $(FILE_DEP) |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
207 |
$(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.c=%.c)' |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
208 |
$(Q)$(CC_HOST) $(CC_CFLAGS) $(CFLAGS) -c -o $@ $< |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
209 |
|
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
210 |
$(OBJS_CPP): %.o: $(SRC_DIR)/%.cpp $(DEP_MASK) $(FILE_DEP) |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
211 |
$(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)' |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
212 |
$(Q)$(CXX_HOST) $(CFLAGS) -c -o $@ $< |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
213 |
|
6192
c6adfc929c6b
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
5901
diff
changeset
|
214 |
$(OBJS_MM): %.o: $(SRC_DIR)/%.mm $(DEP_MASK) $(FILE_DEP) |
c6adfc929c6b
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
5901
diff
changeset
|
215 |
$(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.mm=%.mm)' |
c6adfc929c6b
(svn r8605) -Codechange: [OSX] changed all objective C to objective C++
bjarni
parents:
5901
diff
changeset
|
216 |
$(Q)$(CC_HOST) $(CFLAGS) -c -o $@ $< |
5726
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
217 |
|
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
218 |
$(OBJS_RC): %.o: $(SRC_DIR)/%.rc $(FILE_DEP) |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
219 |
$(E) '$(STAGE) Compiling resource $(<:$(SRC_DIR)/%.rc=%.rc)' |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
220 |
$(Q)$(WINDRES) -o $@ -I $(MEDIA_DIR) $< |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
221 |
|
5861
11c77d9df7fb
(svn r8067) -Fix (r7759): if bin/$(TTD) was removed, it did not get placed back on make unless $(TTD) got relinked.
rubidium
parents:
5838
diff
changeset
|
222 |
$(BIN_DIR)/$(TTD): $(TTD) |
11c77d9df7fb
(svn r8067) -Fix (r7759): if bin/$(TTD) was removed, it did not get placed back on make unless $(TTD) got relinked.
rubidium
parents:
5838
diff
changeset
|
223 |
$(Q)cp $< $@ |
11c77d9df7fb
(svn r8067) -Fix (r7759): if bin/$(TTD) was removed, it did not get placed back on make unless $(TTD) got relinked.
rubidium
parents:
5838
diff
changeset
|
224 |
|
5726
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
225 |
$(TTD): rev.o $(OBJS) $(CONFIG_CACHE_LINKER) |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
226 |
$(E) '$(STAGE) Linking $@' |
6230
06c91ff0af27
(svn r8678) [PSP] -Add: added LIBS and CFLAGS needed to compile PSP
truelight
parents:
6221
diff
changeset
|
227 |
ifeq ($(OS), PSP) |
06c91ff0af27
(svn r8678) [PSP] -Add: added LIBS and CFLAGS needed to compile PSP
truelight
parents:
6221
diff
changeset
|
228 |
$(Q)$(CC_HOST) $(LDFLAGS) rev.o $(OBJS) $(LIBS) -o $@ |
06c91ff0af27
(svn r8678) [PSP] -Add: added LIBS and CFLAGS needed to compile PSP
truelight
parents:
6221
diff
changeset
|
229 |
else |
5747
de8028eb52b4
(svn r7780) [Configure] -Fix: strip before copy, not copy before strip
truelight
parents:
5729
diff
changeset
|
230 |
$(Q)$(CXX_HOST) $(LDFLAGS) rev.o $(OBJS) $(LIBS) -o $@ |
6230
06c91ff0af27
(svn r8678) [PSP] -Add: added LIBS and CFLAGS needed to compile PSP
truelight
parents:
6221
diff
changeset
|
231 |
endif |
5726
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
232 |
ifdef STRIP |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
233 |
$(Q)$(STRIP) $@ |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
234 |
endif |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
235 |
|
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
236 |
# The targets to compile the endian-code |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
237 |
|
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
238 |
endian_target.h: $(ENDIAN_CHECK) $(CONFIG_CACHE_ENDIAN) |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
239 |
$(E) '$(STAGE) Testing endianness for target' |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
240 |
$(Q)./$(ENDIAN_CHECK) $(ENDIAN_FORCE) > $@ |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
241 |
|
5838
9c3129cb019b
(svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
rubidium
parents:
5786
diff
changeset
|
242 |
$(ENDIAN_CHECK): $(SRC_DIR)/endian_check.cpp |
5726
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
243 |
$(E) '$(STAGE) Compiling and Linking $@' |
5838
9c3129cb019b
(svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
rubidium
parents:
5786
diff
changeset
|
244 |
$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $< -o $@ |
5726
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
245 |
|
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
246 |
# Revision files |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
247 |
|
5838
9c3129cb019b
(svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
rubidium
parents:
5786
diff
changeset
|
248 |
rev.cpp: $(CONFIG_CACHE_VERSION) |
5726
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
249 |
# setting the revision number in a place, there the binary can read it |
5838
9c3129cb019b
(svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
rubidium
parents:
5786
diff
changeset
|
250 |
@echo 'extern const char _openttd_revision[] = "$(REV)";' > rev.cpp |
5726
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
251 |
# Some additions for MorphOS versions tag |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
252 |
ifeq ($(OS),MORPHOS) |
5838
9c3129cb019b
(svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
rubidium
parents:
5786
diff
changeset
|
253 |
@echo '#ifdef __MORPHOS__' >> rev.cpp |
9c3129cb019b
(svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
rubidium
parents:
5786
diff
changeset
|
254 |
@echo 'extern const char morphos_versions_tag[] = "\\0$$VER: OpenTTD $(REV) ('`date +%d.%m.%y`') (C) OpenTTD Team [MorphOS, PowerPC]";' >> rev.cpp |
9c3129cb019b
(svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
rubidium
parents:
5786
diff
changeset
|
255 |
@echo '#endif' >> rev.cpp |
5726
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
256 |
endif |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
257 |
|
5838
9c3129cb019b
(svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
rubidium
parents:
5786
diff
changeset
|
258 |
rev.o: rev.cpp $(FILE_DEP) |
9c3129cb019b
(svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
rubidium
parents:
5786
diff
changeset
|
259 |
$(E) '$(STAGE) Compiling $(<:$(SRC_DIR)/%.cpp=%.cpp)' |
9c3129cb019b
(svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
rubidium
parents:
5786
diff
changeset
|
260 |
$(Q)$(CXX_HOST) $(CFLAGS) -c -o $@ $< |
5726
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
261 |
|
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
262 |
FORCE: |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
263 |
|
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
264 |
depend: $(DEPS) |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
265 |
|
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
266 |
clean: |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
267 |
$(E) '$(STAGE) Cleaning up object files' |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
268 |
$(Q)rm -f $(DEPS) $(OBJS) $(TTD) $(TTD:%=$(BIN_DIR)/%) $(CONFIG_CACHE_COMPILER) $(CONFIG_CACHE_LINKER) $(CONFIG_CACHE_ENDIAN) $(CONFIG_CACHE_SOURCE) $(ENDIAN_TARGETS) rev.o |
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
269 |
|
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
270 |
mrproper: clean |
5838
9c3129cb019b
(svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
rubidium
parents:
5786
diff
changeset
|
271 |
$(Q)rm -f rev.cpp |
5726
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
272 |
|
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
273 |
%.o: |
6221
8c3234f2fd57
(svn r8658) -Fix r8605: missed an error message renaming from m to mm (objC to objC++)
bjarni
parents:
6192
diff
changeset
|
274 |
@echo '$(STAGE) No such source-file: $(@:%.o=%).[c|cpp|mm|rc]' |
5726
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
275 |
|
8f399788f6c9
(svn r7759) -Merge: makefile rewrite. This merge features:
rubidium
parents:
diff
changeset
|
276 |
.PHONY: all mrproper depend clean FORCE |