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