| [25] | 1 | # $Id: Makefile 132 2003-05-12 18:17:23Z bird $
 | 
|---|
 | 2 | #
 | 
|---|
 | 3 | # Top level makefile.
 | 
|---|
 | 4 | #
 | 
|---|
 | 5 | # InnoTek Systemberatung GmbHconfidential
 | 
|---|
 | 6 | #
 | 
|---|
 | 7 | # Copyright (c) 2003 InnoTek Systemberatung GmbH
 | 
|---|
 | 8 | # Author: knut st. osmundsen <bird@anduin.net>
 | 
|---|
 | 9 | #
 | 
|---|
 | 10 | # All Rights Reserved
 | 
|---|
 | 11 | #
 | 
|---|
 | 12 | 
 | 
|---|
| [34] | 13 |                         
 | 
|---|
 | 14 | ###############################################################################
 | 
|---|
 | 15 | ##   Global Variables
 | 
|---|
| [73] | 16 | ##   (D = no drive)
 | 
|---|
| [34] | 17 | ###############################################################################
 | 
|---|
| [69] | 18 | PWD            := $(shell pwd)
 | 
|---|
 | 19 | PWDD           := $(shell pwd|sed 's/^[a-zA-Z]://')
 | 
|---|
 | 20 | MAKEFILE                = $(PWD)/Makefile
 | 
|---|
| [34] | 21 | 
 | 
|---|
| [111] | 22 | ifndef BUILD_MODE
 | 
|---|
| [34] | 23 | export BUILD_MODE=DEBUG
 | 
|---|
| [25] | 24 | endif
 | 
|---|
| [34] | 25 | 
 | 
|---|
| [69] | 26 | ifndef PATH_TOP
 | 
|---|
 | 27 | export PATH_TOP  := $(PWD)
 | 
|---|
| [76] | 28 | endif
 | 
|---|
 | 29 | ifndef PATH_TOPD
 | 
|---|
| [69] | 30 | export PATH_TOPD := $(PWDD)
 | 
|---|
 | 31 | endif
 | 
|---|
 | 32 | 
 | 
|---|
 | 33 | 
 | 
|---|
 | 34 | export PATH_BIN        = $(PATH_TOP)/bin/$(BUILD_PLATFORM)/$(BUILD_MODE)
 | 
|---|
 | 35 | export PATH_BIND       = $(PATH_TOPD)/bin/$(BUILD_PLATFORM)/$(BUILD_MODE)
 | 
|---|
 | 36 | export PATH_OBJ        = $(PATH_TOP)/obj/$(BUILD_PLATFORM)/$(BUILD_MODE)
 | 
|---|
 | 37 | export PATH_OBJD       = $(PATH_TOPD)/obj/$(BUILD_PLATFORM)/$(BUILD_MODE)
 | 
|---|
 | 38 | export PATH_BUILTTOOLS = $(PATH_OBJ)/builttools
 | 
|---|
 | 39 | export PATH_BUILTTOOLSD= $(PATH_OBJD)/builttools
 | 
|---|
| [34] | 40 | 
 | 
|---|
| [69] | 41 | # Debug info or not (when ever we feel like passing down such options).
 | 
|---|
| [122] | 42 | # Several ways to do this it seems.
 | 
|---|
| [69] | 43 | ifeq "$(BUILD_MODE)" "RELEASE"
 | 
|---|
 | 44 | BUILD_DEBUGINFO = -s
 | 
|---|
| [122] | 45 | BUILD_ENABLE_SYMBOLS = --disable-symbols
 | 
|---|
| [69] | 46 | else
 | 
|---|
 | 47 | BUILD_DEBUGINFO = -g
 | 
|---|
| [122] | 48 | BUILD_ENABLE_SYMBOLS = --enable-symbols
 | 
|---|
| [69] | 49 | endif   
 | 
|---|
 | 50 | 
 | 
|---|
| [76] | 51 | 
 | 
|---|
| [109] | 52 | # Version and CVS defines
 | 
|---|
 | 53 | export GCC_VERSION              ?= 3.2.2
 | 
|---|
 | 54 | export GCC_VERSION_SHORT        ?= 3022
 | 
|---|
 | 55 | export GCC_CVS_VENDOR                   ?= GNU
 | 
|---|
 | 56 | export GCC_CVS_REL                              ?= GCC_3-2-2
 | 
|---|
 | 57 | export BINUTILS_VERSION                 ?= 2.11.2
 | 
|---|
 | 58 | export BINUTILS_VERSION_SHORT   ?= 2112
 | 
|---|
 | 59 | export BINUTILS_CVS_VENDOR              ?= GNU
 | 
|---|
 | 60 | export BINUTILS_CVS_REL                 ?= BINUTILS_2-11-2
 | 
|---|
 | 61 | export EMX_VERSION                              ?= 0.9d-fix04
 | 
|---|
 | 62 | export EMX_VERSION_SHORT        ?= 9d04
 | 
|---|
 | 63 | export EMX_CVS_VENDOR                   ?= EMX
 | 
|---|
 | 64 | export EMX_CVS_REL                              ?= EMX_0-9D-FIX04
 | 
|---|
 | 65 | 
 | 
|---|
| [111] | 66 | # innotek version and timestamp
 | 
|---|
 | 67 | export INNOTEK_VERSION                  ?= (Innotek Build $(shell date '+%Y-%m-%d %H:%M'))
 | 
|---|
 | 68 | 
 | 
|---|
| [109] | 69 |                         
 | 
|---|
| [76] | 70 | #                       
 | 
|---|
| [69] | 71 | # For builds on Linux Host builds we do the environment setup here.
 | 
|---|
 | 72 | # This is essentially a mimicking of what we do on OS/2.
 | 
|---|
 | 73 | #
 | 
|---|
 | 74 | ifndef BUILD_PLATFORM
 | 
|---|
 | 75 | ifeq "$(shell uname -s)" "Linux"
 | 
|---|
 | 76 | export BUILD_PLATFORM       ?= LINUX
 | 
|---|
 | 77 | export BUILD_PROJECT        ?= GCCOS2
 | 
|---|
 | 78 | export SH                   ?= /bin/sh
 | 
|---|
 | 79 | export ASH                  ?= /bin/ash
 | 
|---|
 | 80 | export BASH                 ?= /bin/bash
 | 
|---|
 | 81 | export AWK                  ?= /bin/gawk
 | 
|---|
 | 82 | export GAWK                 ?= /bin/gawk
 | 
|---|
 | 83 | export CONFIG_SHELL         ?= $(SH)
 | 
|---|
 | 84 | export MAKESHELL            ?= $(SH)
 | 
|---|
 | 85 | export PATH_EMX             ?= /usr
 | 
|---|
 | 86 | export PATH_EMXPGCC         ?= /usr
 | 
|---|
 | 87 | export TMP                  ?= /tmp
 | 
|---|
 | 88 | export TMPDIR               ?= /tmp
 | 
|---|
| [25] | 89 | endif
 | 
|---|
| [69] | 90 | endif
 | 
|---|
| [25] | 91 | 
 | 
|---|
 | 92 | 
 | 
|---|
| [109] | 93 | 
 | 
|---|
 | 94 | # Misc Helpers
 | 
|---|
 | 95 | ALL_PREFIX                  = $(PATH_BIND)/$(GCC_VERSION)/usr
 | 
|---|
 | 96 | TOOL_CVS_DIFF_TREE          = -cvs diff -R -N -w -u -r
 | 
|---|
 | 97 | 
 | 
|---|
 | 98 |                                                         
 | 
|---|
 | 99 |                                                         
 | 
|---|
 | 100 | 
 | 
|---|
 | 101 | 
 | 
|---|
| [34] | 102 | ###############################################################################
 | 
|---|
 | 103 | ###############################################################################
 | 
|---|
 | 104 | ###############################################################################
 | 
|---|
 | 105 | ###############################################################################
 | 
|---|
 | 106 | #
 | 
|---|
 | 107 | #    M a i n   R u l e z
 | 
|---|
 | 108 | #
 | 
|---|
 | 109 | ###############################################################################
 | 
|---|
 | 110 | ###############################################################################
 | 
|---|
 | 111 | ###############################################################################
 | 
|---|
 | 112 | ###############################################################################
 | 
|---|
 | 113 | all:    
 | 
|---|
 | 114 |         mkdir -p $(PATH_OBJ)
 | 
|---|
| [69] | 115 |         $(MAKE) -C . all-logged 2>&1 | $(UNIXROOT)/usr/bin/tee $(PATH_OBJ)/build-`date +"%Y%m%d-%H%M%S"`.log
 | 
|---|
| [34] | 116 | 
 | 
|---|
 | 117 | all-logged:     \
 | 
|---|
| [120] | 118 |         all-banner-start \
 | 
|---|
| [25] | 119 |                 all-env \
 | 
|---|
 | 120 |                 all-sanity \
 | 
|---|
| [34] | 121 |                 all-preload \
 | 
|---|
| [120] | 122 |                 all-versionstamps \
 | 
|---|
| [89] | 123 |                 all-symlinks \
 | 
|---|
| [25] | 124 |                 \
 | 
|---|
| [120] | 125 |         all-stage1 \
 | 
|---|
 | 126 |         all-stage2 \
 | 
|---|
| [25] | 127 |                 \
 | 
|---|
| [76] | 128 |                 all-install \
 | 
|---|
 | 129 |                 \
 | 
|---|
| [120] | 130 |                 all-symlinks-unlink
 | 
|---|
 | 131 |         @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
 | 
|---|
 | 132 |         @echo "+ Make Ended Successfully: $(shell date)"
 | 
|---|
 | 133 |         @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
 | 
|---|
| [34] | 134 | 
 | 
|---|
| [120] | 135 | #
 | 
|---|
 | 136 | # banners
 | 
|---|
 | 137 | #
 | 
|---|
| [34] | 138 |                 
 | 
|---|
| [120] | 139 | all-banner-start:
 | 
|---|
| [25] | 140 |         @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
 | 
|---|
 | 141 |         @echo "+ Make started: $(shell date)"
 | 
|---|
 | 142 |         @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
 | 
|---|
| [120] | 143 |                 
 | 
|---|
 | 144 | all-banner-stage1:
 | 
|---|
 | 145 |         @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
 | 
|---|
 | 146 |         @echo "+ Stage 1 - starting: $(shell date)"
 | 
|---|
 | 147 |         @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
 | 
|---|
 | 148 | 
 | 
|---|
 | 149 | all-banner-stage2:
 | 
|---|
 | 150 |         @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
 | 
|---|
 | 151 |         @echo "+ Stage 2 - starting: $(shell date)"
 | 
|---|
 | 152 |         @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
 | 
|---|
| [25] | 153 |         
 | 
|---|
| [120] | 154 | all-banner-builttools-initial:
 | 
|---|
| [25] | 155 |         @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
 | 
|---|
| [120] | 156 |         @echo "+ Initializing builttools tree"
 | 
|---|
| [25] | 157 |         @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
 | 
|---|
| [120] | 158 |                 
 | 
|---|
 | 159 | all-banner-builttools-stage2:
 | 
|---|
 | 160 |         @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
 | 
|---|
 | 161 |         @echo "+ Copying stage2 builttools"
 | 
|---|
 | 162 |         @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
 | 
|---|
 | 163 | 
 | 
|---|
 | 164 | all-banner-install:
 | 
|---|
 | 165 |         @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
 | 
|---|
 | 166 |         @echo "+ Install - starting: $(shell date)"
 | 
|---|
 | 167 |         @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
 | 
|---|
| [25] | 168 |         
 | 
|---|
| [120] | 169 | all-banner-install-done:
 | 
|---|
 | 170 |         @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
 | 
|---|
 | 171 |         @echo "+ Install - done: $(shell date)"
 | 
|---|
 | 172 |         @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
 | 
|---|
 | 173 | 
 | 
|---|
 | 174 |                 
 | 
|---|
 | 175 | #
 | 
|---|
 | 176 | # Sanity and environment dumps - to make it easier to figure out make bugs.
 | 
|---|
 | 177 | #
 | 
|---|
 | 178 |         
 | 
|---|
| [25] | 179 | all-env:        
 | 
|---|
 | 180 |         @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
 | 
|---|
 | 181 |         @echo "Variables:"
 | 
|---|
| [34] | 182 |         @echo "    PWD                  = $(PWD)"
 | 
|---|
| [69] | 183 |         @echo "    PWDD                 = $(PWDD)"
 | 
|---|
| [34] | 184 |         @echo "    PATH_TOP             = $(PATH_TOP)"
 | 
|---|
| [69] | 185 |         @echo "    PATH_TOPD            = $(PATH_TOPD)"
 | 
|---|
| [34] | 186 |         @echo "    PATH_OBJ             = $(PATH_OBJ)"
 | 
|---|
| [69] | 187 |         @echo "    PATH_OBJD            = $(PATH_OBJD)"
 | 
|---|
 | 188 |         @echo "    PATH_BIN             = $(PATH_BIN)"
 | 
|---|
 | 189 |         @echo "    PATH_BIND            = $(PATH_BIND)"
 | 
|---|
| [111] | 190 |         @echo "    ALL_PREFIX           = $(ALL_PREFIX)"
 | 
|---|
| [34] | 191 |         @echo "    PATH_EMXPGCC         = $(PATH_EMXPGCC)"
 | 
|---|
 | 192 |         @echo "    PATH_EMX             = $(PATH_EMX)"
 | 
|---|
 | 193 |         @echo "    BUILD_MODE           = $(BUILD_MODE)"
 | 
|---|
 | 194 |         @echo "    BUILD_PLATFORM       = $(BUILD_PLATFORM)"
 | 
|---|
 | 195 |         @echo "    BUILD_PROJECT        = $(BUILD_PROJECT)"
 | 
|---|
| [111] | 196 |         @echo "    GCC_VERSION          = $(GCC_VERSION)"
 | 
|---|
 | 197 |         @echo "    GCC_VERSION_SHORT    = $(GCC_VERSION_SHORT)"
 | 
|---|
 | 198 |         @echo "    GCC_CVS_VENDOR       = $(GCC_CVS_VENDOR)"
 | 
|---|
 | 199 |         @echo "    GCC_CVS_REL          = $(GCC_CVS_REL)"
 | 
|---|
 | 200 |         @echo "    BINUTILS_VERSION     = $(BINUTILS_VERSION)"
 | 
|---|
 | 201 |         @echo "    BINUTILS_VERSION_SHORT = $(BINUTILS_VERSION_SHORT)"
 | 
|---|
 | 202 |         @echo "    BINUTILS_CVS_VENDOR  = $(BINUTILS_CVS_VENDOR)"
 | 
|---|
 | 203 |         @echo "    BINUTILS_CVS_REL     = $(BINUTILS_CVS_REL)"
 | 
|---|
 | 204 |         @echo "    EMX_VERSION          = $(EMX_VERSION)"
 | 
|---|
 | 205 |         @echo "    EMX_VERSION_SHORT    = $(EMX_VERSION_SHORT)"
 | 
|---|
 | 206 |         @echo "    EMX_CVS_VENDOR       = $(EMX_CVS_VENDOR)"
 | 
|---|
 | 207 |         @echo "    EMX_CVS_REL          = $(EMX_CVS_REL)"
 | 
|---|
| [34] | 208 |         @echo "    MAKEFILE             = $(MAKEFILE)"
 | 
|---|
 | 209 |         @echo "    UNIXROOT             = $(UNIXROOT)"
 | 
|---|
 | 210 |         @echo "    AC_PREFIX            = $(AC_PREFIX)"
 | 
|---|
 | 211 |         @echo "    AC_MACRODIR          = $(AC_MACRODIR)"
 | 
|---|
 | 212 |         @echo "    HOSTNAME             = $(HOSTNAME)"
 | 
|---|
 | 213 |         @echo "    USER                 = $(USER)"
 | 
|---|
 | 214 |         @echo "    LOGNAME              = $(LOGNAME)"
 | 
|---|
 | 215 |         @echo "    TMP                  = $(TMP)"
 | 
|---|
 | 216 |         @echo "    TMPDIR               = $(TMPDIR)"
 | 
|---|
 | 217 |         @echo "    USER                 = $(USER)"
 | 
|---|
 | 218 |         @echo "    AWK                  = $(AWK)"
 | 
|---|
 | 219 |         @echo "    GAWK                 = $(GAWK)"
 | 
|---|
 | 220 |         @echo "    SH                   = $(SH)"
 | 
|---|
 | 221 |         @echo "    ASH                  = $(ASH)"
 | 
|---|
 | 222 |         @echo "    BASH                 = $(BASH)"
 | 
|---|
 | 223 |         @echo "    CONFIG_SHELL         = $(CONFIG_SHELL)"
 | 
|---|
 | 224 |         @echo "    MAKESHELL            = $(MAKESHELL)"
 | 
|---|
 | 225 |         @echo "    EMXSHELL             = $(EMXSHELL)"
 | 
|---|
 | 226 |         @echo "    SHELL                = $(SHELL)"
 | 
|---|
 | 227 |         @echo "    MAKE                 = $(MAKE)"
 | 
|---|
 | 228 |         @echo "    PATH                 = $(PATH)"
 | 
|---|
| [25] | 229 |         @echo "    C_INCLUDE_PATH       = $(C_INCLUDE_PATH)"
 | 
|---|
 | 230 |         @echo "    CPLUS_INCLUDE_PATH   = $(CPLUS_INCLUDE_PATH)"
 | 
|---|
 | 231 |         @echo "    OBJC_INCLUDE_PATH    = $(OBJC_INCLUDE_PATH)"
 | 
|---|
 | 232 |         @echo "    LIBRARY_PATH         = $(LIBRARY_PATH)"
 | 
|---|
 | 233 |         @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
 | 
|---|
| [120] | 234 |         @echo "Content of PATH_OBJ:"
 | 
|---|
 | 235 |         -ls -la $(PATH_OBJ)/
 | 
|---|
 | 236 |         @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
 | 
|---|
 | 237 |         @echo "Content of PATH_BIN:"
 | 
|---|
 | 238 |         -ls -la $(PATH_BIN)/
 | 
|---|
 | 239 |         @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
 | 
|---|
| [25] | 240 |         
 | 
|---|
| [120] | 241 |         
 | 
|---|
| [25] | 242 | all-sanity:
 | 
|---|
| [68] | 243 |         @echo -n "Checking build environment sanity... "
 | 
|---|
 | 244 |         @if [ "x$(BUILD_PROJECT)" != "xGCCOS2" ]; then \
 | 
|---|
 | 245 |                 echo ""; echo "Error: BUILD_PROJECT is wrong or isn't defined!"; \
 | 
|---|
 | 246 |                 exit 8; \
 | 
|---|
 | 247 |         fi
 | 
|---|
| [69] | 248 |         @if [ "x$(BUILD_PLATFORM)" != "xOS2" -a "x$(BUILD_PLATFORM)" != "xLINUX" ]; then \
 | 
|---|
| [68] | 249 |                 echo ""; echo "Error: BUILD_PLATFORM is wrong or isn't defined!"; \
 | 
|---|
 | 250 |                 exit 8; \
 | 
|---|
 | 251 |         fi
 | 
|---|
| [69] | 252 |         @if [ "x$(BUILD_PLATFORM)" = "xOS2" -a "x$(UNIXROOT)" = "x" ]; then \
 | 
|---|
 | 253 |                 echo ""; echo "Error: UNIXROOT isn't defined!"; \
 | 
|---|
 | 254 |                 exit 8; \
 | 
|---|
 | 255 |         fi
 | 
|---|
 | 256 |         @if [ "x$(BUILD_PLATFORM)" != "xOS2" -a "x$(UNIXROOT)" != "x" ]; then \
 | 
|---|
 | 257 |                 echo ""; echo "Error: UNIXROOT is defined!"; \
 | 
|---|
 | 258 |                 exit 8; \
 | 
|---|
 | 259 |         fi
 | 
|---|
 | 260 | ifeq "$(BUILD_PLATFORM)" "OS2"
 | 
|---|
 | 261 |         @if gcc --version | grep -qe ".*[3]\.[2-9]\.[0-9]"; then \
 | 
|---|
 | 262 |                 true; \
 | 
|---|
 | 263 |         else \
 | 
|---|
 | 264 |                 echo ""; echo "Warning: GCC v3.2.x or higher is recommended!"; \
 | 
|---|
 | 265 |         fi
 | 
|---|
 | 266 |         @if ar --version | grep -qe ".*2\.11\.[2-9]" -e ".*[2]\.1[2-9]\.[0-9]*"; then \
 | 
|---|
 | 267 |                 true; \
 | 
|---|
 | 268 |         else \
 | 
|---|
 | 269 |                 echo ""; echo "Warning: AR v2.11.2 or higher is recommended!"; \
 | 
|---|
 | 270 |         fi
 | 
|---|
 | 271 | endif
 | 
|---|
| [68] | 272 |         @echo "ok"
 | 
|---|
 | 273 |         
 | 
|---|
| [120] | 274 | 
 | 
|---|
 | 275 | #
 | 
|---|
 | 276 | # Preload tools we commonly use this speeds up stuff.
 | 
|---|
 | 277 | #                                                                       
 | 
|---|
| [34] | 278 | PRELOADED_TOOLS = bin/sh.exe bin/echo.exe bin/true.exe usr/bin/test.exe usr/bin/expr.exe \
 | 
|---|
 | 279 |      usr/bin/gawk.exe usr/bin/sed.exe bin/rm.exe bin/cat.exe bin/cp.exe
 | 
|---|
| [76] | 280 |         
 | 
|---|
| [34] | 281 | all-preload:
 | 
|---|
 | 282 |         @echo "Preloading tools:"
 | 
|---|
| [69] | 283 | ifeq "$(BUILD_PLATFORM)" "OS2"
 | 
|---|
| [34] | 284 |         @for tool in $(PRELOADED_TOOLS); do \
 | 
|---|
 | 285 |             echo -n " $$tool";  \
 | 
|---|
 | 286 |                 emxload -e $(UNIXROOT)/$$tool;  \
 | 
|---|
 | 287 |         done
 | 
|---|
| [120] | 288 |         emxload -e gcc.exe g++.exe ld.exe cc1.exe as.exe cc1plus.exe ar.exe cpp0.exe ld.exe
 | 
|---|
| [69] | 289 | endif
 | 
|---|
| [34] | 290 |         @echo ""
 | 
|---|
| [121] | 291 |         
 | 
|---|
 | 292 | all-preload-unload-obj:
 | 
|---|
 | 293 | ifeq "$(BUILD_PLATFORM)" "OS2"
 | 
|---|
 | 294 |         -for prog in `emxload -l | sed -e 's/\\/\//g' -e 's/.*³[\t ]*//' | grep '$(PATH_OBJD)'`; \
 | 
|---|
 | 295 |         do \
 | 
|---|
 | 296 |                 emxload -u $$prog; \
 | 
|---|
 | 297 |         done
 | 
|---|
 | 298 | endif
 | 
|---|
 | 299 |         
 | 
|---|
| [34] | 300 | 
 | 
|---|
| [111] | 301 | #
 | 
|---|
| [120] | 302 | # Version stamping/branding.
 | 
|---|
 | 303 | #       Update various version strings which are printed from the tools to tell
 | 
|---|
 | 304 | #       the build date and that's our built. This helps us tell releases apart.
 | 
|---|
 | 305 | #
 | 
|---|
| [111] | 306 | # IMPORTANT! Take care not to commit the changed files
 | 
|---|
 | 307 | # (TODO! Try make these changes to non-cvs backed files. (long-term-goal))
 | 
|---|
 | 308 | .PHONY: all-versionstamps
 | 
|---|
 | 309 | all-versionstamps: $(PATH_OBJ)/.ts.versionstamped
 | 
|---|
 | 310 | $(PATH_OBJ)/.ts.versionstamped: 
 | 
|---|
 | 311 |         $(MAKE) -f $(MAKEFILE) "INNOTEK_VERSION=$(INNOTEK_VERSION)" gcc-versionstamps binutils-versionstamps emx-versionstamps
 | 
|---|
 | 312 |         mkdir -p $(@D)
 | 
|---|
 | 313 |         touch $@
 | 
|---|
 | 314 | 
 | 
|---|
 | 315 | 
 | 
|---|
| [120] | 316 | #
 | 
|---|
 | 317 | # Stages
 | 
|---|
 | 318 | #       A rebuild with the new toolsuite is usually required when there is ABI
 | 
|---|
 | 319 | #       changes and other vital changes done to the tools.
 | 
|---|
 | 320 | #       
 | 
|---|
 | 321 |                                                 
 | 
|---|
 | 322 | all-stage1: $(PATH_OBJ)/.all-stage1
 | 
|---|
 | 323 | $(PATH_OBJ)/.all-stage1:
 | 
|---|
 | 324 |         $(MAKE) -f $(MAKEFILE) all-stage1-it
 | 
|---|
 | 325 |         echo "$(@F)" > $(PATH_OBJ)/.last-stage
 | 
|---|
 | 326 |         touch $@
 | 
|---|
 | 327 |         @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
 | 
|---|
 | 328 |         @echo "+ Stage 1 - done: $(shell date)"
 | 
|---|
 | 329 |         @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
 | 
|---|
| [111] | 330 | 
 | 
|---|
| [121] | 331 | all-stage1-it: \
 | 
|---|
| [120] | 332 |                 all-banner-stage1 \
 | 
|---|
 | 333 |                 all-builttools-initial \
 | 
|---|
 | 334 |         all-emx \
 | 
|---|
 | 335 |         all-binutils \
 | 
|---|
 | 336 |                 all-gcc
 | 
|---|
 | 337 |                 
 | 
|---|
| [76] | 338 | 
 | 
|---|
| [120] | 339 | all-stage2: $(PATH_OBJ)/.all-stage2
 | 
|---|
 | 340 | $(PATH_OBJ)/.all-stage2: \
 | 
|---|
 | 341 |                 $(PATH_OBJ)/.all-stage2.save-stage1
 | 
|---|
 | 342 |         $(MAKE) -f $(MAKEFILE) all-stage2-it
 | 
|---|
 | 343 |         echo "$(@F)" > $(PATH_OBJ)/.last-stage
 | 
|---|
 | 344 |         touch $@
 | 
|---|
 | 345 |         @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
 | 
|---|
 | 346 |         @echo "+ Stage 2 - done: $(shell date)"
 | 
|---|
 | 347 |         @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
 | 
|---|
 | 348 | 
 | 
|---|
 | 349 | $(PATH_OBJ)/.all-stage2.save-stage1:
 | 
|---|
 | 350 |         @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
 | 
|---|
 | 351 |         @echo "+ Saving Stage 1 - Starting: $(shell date)"
 | 
|---|
 | 352 |         @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
 | 
|---|
| [121] | 353 |         $(MAKE) -f $(MAKEFILE) all-preload-unload-obj
 | 
|---|
| [120] | 354 |         $(MAKE) -f $(MAKEFILE) all-builttools-stage2
 | 
|---|
 | 355 |         rm -Rf $(PATH_OBJ)/stage1
 | 
|---|
 | 356 |         mkdir -p $(PATH_OBJ)/stage1
 | 
|---|
 | 357 |         if [ -d $(PATH_OBJ)/gcc ] ; then mv $(PATH_OBJ)/gcc $(PATH_OBJ)/stage1/gcc; fi
 | 
|---|
 | 358 |         if [ -d $(PATH_OBJ)/emx ] ; then mv $(PATH_OBJ)/emx $(PATH_OBJ)/stage1/emx; fi
 | 
|---|
 | 359 |         $(MAKE) -f $(MAKEFILE) all-preload
 | 
|---|
 | 360 |         touch $@
 | 
|---|
 | 361 |         @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
 | 
|---|
 | 362 |         @echo "+ Saving Stage 1 - done: $(shell date)"
 | 
|---|
 | 363 |         @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
 | 
|---|
| [25] | 364 |         
 | 
|---|
| [120] | 365 | all-stage2-it: \
 | 
|---|
 | 366 |                 all-banner-stage2 \
 | 
|---|
 | 367 |         all-emx \
 | 
|---|
 | 368 |         all-binutils \
 | 
|---|
 | 369 |                 all-gcc
 | 
|---|
 | 370 | 
 | 
|---|
 | 371 | 
 | 
|---|
 | 372 | #
 | 
|---|
 | 373 | # Install to bin tree makeing it ready for packing.
 | 
|---|
 | 374 | #
 | 
|---|
 | 375 | all-install: \
 | 
|---|
 | 376 |         all-banner-install \
 | 
|---|
 | 377 |         gcc-install     \
 | 
|---|
 | 378 |         emx-install \
 | 
|---|
 | 379 |         all-banner-install-done \
 | 
|---|
 | 380 | 
 | 
|---|
 | 381 |         
 | 
|---|
 | 382 | #
 | 
|---|
 | 383 | # Generate all the diffs we have to supply.
 | 
|---|
 | 384 | #
 | 
|---|
| [109] | 385 | all-diff: \
 | 
|---|
 | 386 |         gcc-diff \
 | 
|---|
 | 387 |         binutils-diff \
 | 
|---|
 | 388 |         emx-diff \
 | 
|---|
| [34] | 389 |         
 | 
|---|
| [109] | 390 |         
 | 
|---|
| [120] | 391 |         
 | 
|---|
 | 392 |         
 | 
|---|
 | 393 |         
 | 
|---|
 | 394 |         
 | 
|---|
| [25] | 395 | ###############################################################################
 | 
|---|
 | 396 | ###############################################################################
 | 
|---|
 | 397 | ###############################################################################
 | 
|---|
| [34] | 398 | #
 | 
|---|
 | 399 | #    B u i l t   T o o l s
 | 
|---|
 | 400 | #
 | 
|---|
| [25] | 401 | ###############################################################################
 | 
|---|
 | 402 | ###############################################################################
 | 
|---|
 | 403 | ###############################################################################
 | 
|---|
| [120] | 404 | .PHONY: all-builttools-initial all-builttools-dirs all-builttools-clean all-builttools-stage2
 | 
|---|
 | 405 |                 
 | 
|---|
| [34] | 406 | all-builttools-initial: \
 | 
|---|
| [120] | 407 |                 all-banner-builttools-initial \
 | 
|---|
 | 408 |                 all-builttools-clean \
 | 
|---|
| [34] | 409 |         all-builttools-dirs \
 | 
|---|
| [111] | 410 |                 $(PATH_BUILTTOOLS)/bin/dllar.cmd \
 | 
|---|
| [34] | 411 |                 
 | 
|---|
| [121] | 412 | all-builttools-clean: \
 | 
|---|
 | 413 |                 all-preload-unload-obj
 | 
|---|
| [120] | 414 |         rm -Rf $(PATH_BUILTTOOLS)
 | 
|---|
 | 415 |         
 | 
|---|
| [34] | 416 | all-builttools-dirs:
 | 
|---|
| [111] | 417 |         mkdir -p $(PATH_BUILTTOOLS)/bin $(PATH_BUILTTOOLS)/lib $(PATH_BUILTTOOLS)/include
 | 
|---|
| [34] | 418 |         
 | 
|---|
| [111] | 419 | $(PATH_BUILTTOOLS)/bin/dllar.cmd: $(PATH_TOP)/src/misc/dllar.cmd
 | 
|---|
| [34] | 420 |         cp $< $@
 | 
|---|
 | 421 | 
 | 
|---|
| [120] | 422 | all-builttools-stage2: \
 | 
|---|
 | 423 |                 all-banner-builttools-stage2 \
 | 
|---|
 | 424 |                 $(PATH_BUILTTOOLS)/bin/dllar.cmd \
 | 
|---|
 | 425 |                 gcc-builttools-stage2 \
 | 
|---|
 | 426 |                 emx-builttools-stage2 \
 | 
|---|
 | 427 |                 all-builttools-stage2-libs
 | 
|---|
 | 428 |                 
 | 
|---|
 | 429 | all-builttools-stage2-libs:
 | 
|---|
 | 430 |         -for aoutlib in `find $(PATH_BUILTTOOLS) -name "*.a" | sed -e 's/\.a$$//' `; \
 | 
|---|
 | 431 |         do \
 | 
|---|
 | 432 |                 if [ ! -f $(aoutlib).lib ]; then \
 | 
|---|
 | 433 |                         echo "  $${aoutlib}"; \
 | 
|---|
 | 434 |                         $(PATH_BUILTTOOLS)/bin/emxomf.exe $${aoutlib}.a; \
 | 
|---|
 | 435 |                 fi;\
 | 
|---|
 | 436 |         done
 | 
|---|
| [34] | 437 | 
 | 
|---|
 | 438 | 
 | 
|---|
| [89] | 439 | ###############################################################################
 | 
|---|
 | 440 | ###############################################################################
 | 
|---|
 | 441 | ###############################################################################
 | 
|---|
 | 442 | #
 | 
|---|
 | 443 | #    S y m l i n k s
 | 
|---|
 | 444 | #
 | 
|---|
 | 445 | #
 | 
|---|
 | 446 | #               We use symlinking of binutils stuff into the gcc tree so we can
 | 
|---|
 | 447 | #               build everything in one go and take advantage of the gcc
 | 
|---|
 | 448 | #               makesystem which will use the binutils we built when doing the
 | 
|---|
 | 449 | #               gcc libraries and such.
 | 
|---|
 | 450 | #
 | 
|---|
 | 451 | #               On OS/2 symlinks doesn't exist so, we'll copy the source trees.
 | 
|---|
 | 452 | #               Copy because this will for directories work ok with cvs, moving
 | 
|---|
 | 453 | #               directories would cause 'cvs update -d' to refetch stuff.
 | 
|---|
 | 454 | #
 | 
|---|
| [109] | 455 | #               IMPORTANT! Take care, the 'symlined' stuff will be removed at the
 | 
|---|
 | 456 | #               end of the build. Remeber to do all-symlinks-unlink before a fresh
 | 
|---|
 | 457 | #               build is started as the duplicated binutils things doesn't get
 | 
|---|
 | 458 | #               updated by cvs.
 | 
|---|
| [89] | 459 | #
 | 
|---|
| [109] | 460 | #
 | 
|---|
| [89] | 461 | #w##############################################################################
 | 
|---|
 | 462 | ###############################################################################
 | 
|---|
 | 463 | ###############################################################################
 | 
|---|
| [102] | 464 | all-symlinks: \
 | 
|---|
 | 465 |                 all-symlinks-binutils
 | 
|---|
| [34] | 466 | 
 | 
|---|
| [109] | 467 | all-symlinks-unlink: \
 | 
|---|
 | 468 |                 all-symlinks-unlink-binutils
 | 
|---|
 | 469 |                 
 | 
|---|
 | 470 |                 
 | 
|---|
| [89] | 471 | ifeq "$(BUILD_PLATFORM)" "OS2"
 | 
|---|
 | 472 | TOOL_SYMLINK_FILE   = cp
 | 
|---|
 | 473 | TOOL_SYMLINK_DIR    = cp -Rf
 | 
|---|
 | 474 | TOOL_SYMLINK_MKDIR  = mkdir
 | 
|---|
 | 475 | TOOL_UNSYMLINK_DIR  = rm -Rf
 | 
|---|
 | 476 | else
 | 
|---|
 | 477 | TOOL_SYMLINK_FILE   = ln -s
 | 
|---|
 | 478 | TOOL_SYMLINK_DIR    = ln -s
 | 
|---|
 | 479 | TOOL_SYMLINK_MKDIR  = true
 | 
|---|
 | 480 | TOOL_UNSYMLINK_DIR  = rm
 | 
|---|
 | 481 | endif
 | 
|---|
| [102] | 482 | 
 | 
|---|
 | 483 | # ld is broken, so don't use it!        
 | 
|---|
 | 484 | # ld \
 | 
|---|
 | 485 | 
 | 
|---|
| [89] | 486 | SYMLINKS_BINUTILS_TO_GCC_DIRS = \
 | 
|---|
 | 487 | bfd \
 | 
|---|
 | 488 | binutils \
 | 
|---|
 | 489 | etc \
 | 
|---|
 | 490 | gas \
 | 
|---|
 | 491 | gprof \
 | 
|---|
 | 492 | intl \
 | 
|---|
 | 493 | opcodes \
 | 
|---|
 | 494 | texinfo \
 | 
|---|
 | 495 | include/aout \
 | 
|---|
 | 496 | include/coff \
 | 
|---|
 | 497 | include/elf     \
 | 
|---|
 | 498 | include/nlm     \
 | 
|---|
 | 499 | include/opcode \
 | 
|---|
 | 500 | include/regs \
 | 
|---|
| [34] | 501 | 
 | 
|---|
| [89] | 502 | SYMLINKS_BINUTILS_TO_GCC_FILES = \
 | 
|---|
 | 503 | include/alloca-conf.h \
 | 
|---|
 | 504 | include/ansidecl.h \
 | 
|---|
 | 505 | include/bfdlink.h \
 | 
|---|
 | 506 | include/bin-bugs.h \
 | 
|---|
 | 507 | include/bout.h \
 | 
|---|
 | 508 | include/callback.h \
 | 
|---|
 | 509 | include/ChangeLog \
 | 
|---|
 | 510 | include/COPYING \
 | 
|---|
 | 511 | include/demangle.h \
 | 
|---|
 | 512 | include/dis-asm.h \
 | 
|---|
 | 513 | include/dyn-string.h \
 | 
|---|
 | 514 | include/filenames.h \
 | 
|---|
 | 515 | include/floatformat.h \
 | 
|---|
 | 516 | include/fnmatch.h \
 | 
|---|
 | 517 | include/fopen-bin.h \
 | 
|---|
 | 518 | include/fopen-same.h \
 | 
|---|
 | 519 | include/fopen-vms.h \
 | 
|---|
 | 520 | include/gdbm.h \
 | 
|---|
 | 521 | include/getopt.h \
 | 
|---|
 | 522 | include/hashtab.h \
 | 
|---|
 | 523 | include/hp-symtab.h \
 | 
|---|
 | 524 | include/ieee.h \
 | 
|---|
 | 525 | include/libiberty.h \
 | 
|---|
 | 526 | include/MAINTAINERS \
 | 
|---|
 | 527 | include/md5.h \
 | 
|---|
 | 528 | include/oasys.h \
 | 
|---|
 | 529 | include/objalloc.h \
 | 
|---|
 | 530 | include/obstack.h \
 | 
|---|
 | 531 | include/os9k.h \
 | 
|---|
 | 532 | include/partition.h \
 | 
|---|
 | 533 | include/progress.h \
 | 
|---|
 | 534 | include/remote-sim.h \
 | 
|---|
 | 535 | include/safe-ctype.h \
 | 
|---|
 | 536 | include/sim-d10v.h \
 | 
|---|
 | 537 | include/sort.h \
 | 
|---|
 | 538 | include/splay-tree.h \
 | 
|---|
 | 539 | include/symcat.h \
 | 
|---|
 | 540 |         
 | 
|---|
 | 541 | # Symlink binutils stuff to gcc.
 | 
|---|
 | 542 | #       Note the test should've been "! -e", but that doesn' work in ash... :/
 | 
|---|
 | 543 | all-symlinks-binutils:
 | 
|---|
 | 544 |         for file in $(SYMLINKS_BINUTILS_TO_GCC_FILES); do \
 | 
|---|
 | 545 |                 if [ ! -f "$(PATH_TOP)/src/gcc/$$file" ]; then  \
 | 
|---|
 | 546 |                         $(TOOL_SYMLINK_FILE)  $(PATH_TOP)/src/binutils/$$file $(PATH_TOP)/src/gcc/$$file && \
 | 
|---|
| [102] | 547 |                         touch                 $(PATH_TOP)/src/gcc/.symlinked.`echo $${file} | sed -e 's@/@_@g'`; \
 | 
|---|
| [89] | 548 |                 fi ; \
 | 
|---|
 | 549 |         done
 | 
|---|
 | 550 |         for dir in $(SYMLINKS_BINUTILS_TO_GCC_DIRS) ; do \
 | 
|---|
 | 551 |                 if [ ! -d "$(PATH_TOP)/src/gcc/$$dir" ] ; then  \
 | 
|---|
 | 552 |                         $(TOOL_SYMLINK_MKDIR) $(PATH_TOP)/src/gcc/$$dir && \
 | 
|---|
| [102] | 553 |                         touch                 $(PATH_TOP)/src/gcc/.symlinked.`echo $${dir} | sed -e 's@/@_@g'` && \
 | 
|---|
 | 554 |                         $(TOOL_SYMLINK_DIR)   $(PATH_TOP)/src/binutils/$$dir $(PATH_TOP)/src/gcc/`echo $${dir}| sed -e '/\//!d' -e 's@\([a-zA-z0-9]*\)/.*@\1/@'` ; \
 | 
|---|
| [89] | 555 |                 fi ; \
 | 
|---|
 | 556 |         done
 | 
|---|
| [109] | 557 |         -ls -a1 src/gcc/.sym*
 | 
|---|
| [89] | 558 | 
 | 
|---|
 | 559 | all-symlinks-unlink-binutils:
 | 
|---|
 | 560 |         for file in $(SYMLINKS_BINUTILS_TO_GCC_FILES); do \
 | 
|---|
| [102] | 561 |                 if [ -f "$(PATH_TOP)/src/gcc/.symlinked.`echo $${file} | sed -e 's@/@_@g'`" ]; then  \
 | 
|---|
| [89] | 562 |                         rm  $(PATH_TOP)/src/gcc/$${file} && \
 | 
|---|
| [102] | 563 |                         rm  $(PATH_TOP)/src/gcc/.symlinked.`echo $${file} | sed -e 's@/@_@g'` ; \
 | 
|---|
| [89] | 564 |                 fi ; \
 | 
|---|
 | 565 |         done
 | 
|---|
 | 566 |         for dir in $(SYMLINKS_BINUTILS_TO_GCC_DIRS) ; do \
 | 
|---|
| [102] | 567 |                 if [ -f "$(PATH_TOP)/src/gcc/.symlinked.`echo $${dir} | sed -e 's@/@_@g'`" ] ; then  \
 | 
|---|
| [89] | 568 |                         $(TOOL_UNSYMLINK_DIR) $(PATH_TOP)/src/gcc/$${dir} && \
 | 
|---|
| [102] | 569 |                         rm                    $(PATH_TOP)/src/gcc/.symlinked.`echo $${dir} | sed -e 's@/@_@g'`; \
 | 
|---|
| [89] | 570 |                 fi ; \
 | 
|---|
 | 571 |         done
 | 
|---|
| [109] | 572 |         -ls -a1 src/gcc/.sym*
 | 
|---|
| [89] | 573 |                                                 
 | 
|---|
 | 574 | 
 | 
|---|
| [34] | 575 | ###############################################################################
 | 
|---|
 | 576 | ###############################################################################
 | 
|---|
 | 577 | ###############################################################################
 | 
|---|
 | 578 | #
 | 
|---|
 | 579 | #    G C C
 | 
|---|
 | 580 | #
 | 
|---|
 | 581 | ###############################################################################
 | 
|---|
 | 582 | ###############################################################################
 | 
|---|
 | 583 | ###############################################################################
 | 
|---|
| [25] | 584 | all-gcc       gcc:      \
 | 
|---|
 | 585 |         gcc-autoconf-refresh \
 | 
|---|
 | 586 |         gcc-build
 | 
|---|
| [34] | 587 |         echo "Successfully build GCC."
 | 
|---|
| [25] | 588 | 
 | 
|---|
 | 589 | 
 | 
|---|
 | 590 | 
 | 
|---|
 | 591 | GCC_DIRS = \
 | 
|---|
| [34] | 592 | gcc/libiberty \
 | 
|---|
| [41] | 593 | gcc/zlib \
 | 
|---|
| [25] | 594 | gcc/gcc \
 | 
|---|
| [41] | 595 | gcc/libstdc++-v3 \
 | 
|---|
 | 596 | gcc/boehm-gc \
 | 
|---|
 | 597 | gcc/fastjar \
 | 
|---|
 | 598 | gcc/libf2c \
 | 
|---|
 | 599 | gcc/libf2c/libF77 \
 | 
|---|
 | 600 | gcc/libf2c/libI77 \
 | 
|---|
 | 601 | gcc/libf2c/libU77 \
 | 
|---|
 | 602 | gcc/libffi \
 | 
|---|
 | 603 | gcc/libjava \
 | 
|---|
 | 604 | gcc/libjava/libltdl \
 | 
|---|
 | 605 | gcc/libobjc \
 | 
|---|
| [90] | 606 | 
 | 
|---|
| [120] | 607 | # Here is a problem, we can't regenerate binutils makefiles when symlinked into
 | 
|---|
 | 608 | # gcc. At least not yet. The result is messed up severely.
 | 
|---|
| [90] | 609 | not_yet =\
 | 
|---|
| [89] | 610 | gcc/bfd \
 | 
|---|
 | 611 | gcc/binutils \
 | 
|---|
 | 612 | gcc/gas \
 | 
|---|
 | 613 | gcc/gprof \
 | 
|---|
 | 614 | gcc/intl \
 | 
|---|
 | 615 | gcc/ld \
 | 
|---|
 | 616 | gcc/libiberty \
 | 
|---|
 | 617 | gcc/opcodes \
 | 
|---|
| [25] | 618 | 
 | 
|---|
 | 619 | GCC_CONFIGURE_DIRS = $(GCC_DIRS)
 | 
|---|
 | 620 | 
 | 
|---|
 | 621 | 
 | 
|---|
 | 622 | # configure.in/configure
 | 
|---|
 | 623 | .PHONY: gcc-autoconf-refresh gcc-autoconf-rerun gcc-autoconf-clean gcc-autoconf-remove
 | 
|---|
| [34] | 624 | gcc-autoconf-refresh gcc-autoconf-rerun gcc-autoconf-clean gcc-autoconf-remove:
 | 
|---|
| [84] | 625 | ifeq "$(BUILD_PLATFORM)" "LINUX"
 | 
|---|
 | 626 |         -$(SH) $(PATH_TOP)/xfix.sh
 | 
|---|
 | 627 | endif
 | 
|---|
| [25] | 628 |         for dir in $(GCC_CONFIGURE_DIRS); do \
 | 
|---|
| [96] | 629 |                 if $(MAKE) $(@:gcc-autoconf-%=%) -f $(PWD)/config.gmk -C src/$$dir ; then \
 | 
|---|
 | 630 |                         true; \
 | 
|---|
 | 631 |                 else \
 | 
|---|
 | 632 |                         exit 8; \
 | 
|---|
 | 633 |                 fi \
 | 
|---|
| [25] | 634 |         done
 | 
|---|
 | 635 | 
 | 
|---|
 | 636 |         
 | 
|---|
 | 637 | # build the components.
 | 
|---|
| [76] | 638 | .PHONY: gcc-build gcc-install gcc-configure
 | 
|---|
 | 639 | gcc-build gcc-install gcc-configure:
 | 
|---|
| [41] | 640 |         mkdir -p $(PATH_OBJ)/gcc
 | 
|---|
 | 641 |         $(MAKE) -C $(PATH_OBJ)/gcc -f $(MAKEFILE) $@-it
 | 
|---|
 | 642 | 
 | 
|---|
| [69] | 643 | 
 | 
|---|
 | 644 | # When changed directory
 | 
|---|
| [76] | 645 | #   We pass down BOOT_ flags for stage2+.
 | 
|---|
 | 646 | #   Because strip is broken on OS/2 we pass -s for release build and -g for
 | 
|---|
 | 647 | #   non release builds - This overrides some stuff in src/gcc/gcc/config/i386/t-emx!
 | 
|---|
| [41] | 648 | gcc-build-it: \
 | 
|---|
 | 649 |                 $(PATH_OBJ)/gcc/.ts.configured
 | 
|---|
| [69] | 650 | ifeq "$(BUILD_PLATFORM)" "OS2"          
 | 
|---|
| [96] | 651 |         unset GCCLOAD ; $(MAKE) -C $(PATH_OBJ)/gcc \
 | 
|---|
| [69] | 652 |                 LIBGCC2_DEBUG_CFLAGS="$(BUILD_DEBUGINFO)" \
 | 
|---|
 | 653 |                 BOOT_CFLAGS="$(BUILD_DEBUGINFO) -O2 -mcpu=pentium -mpreferred-stack-boundary=2 -malign-strings=0 -falign-loops=2 -falign-jumps=2 -falign-functions=2" \
 | 
|---|
 | 654 |                 BOOT_LDFLAGS="$(BUILD_DEBUGINFO) -Zexe -Zcrtdll" \
 | 
|---|
| [76] | 655 |                 LIBGCC2_DEBUG_CFLAG="$(BUILD_DEBUGINFO)" \
 | 
|---|
| [69] | 656 |                 bootstrap
 | 
|---|
 | 657 | else
 | 
|---|
 | 658 |         $(MAKE) -C $(PATH_OBJ)/gcc bootstrap
 | 
|---|
 | 659 | endif   
 | 
|---|
 | 660 |                 
 | 
|---|
 | 661 | # configure it (invoked after directory change).
 | 
|---|
 | 662 | #       We set CC to help configure finding it.
 | 
|---|
| [76] | 663 | gcc-configure-it $(PATH_OBJ)/gcc/.ts.configured: $(PATH_TOP)/src/gcc/configure
 | 
|---|
| [69] | 664 | ifeq "$(BUILD_PLATFORM)" "OS2"
 | 
|---|
 | 665 |         $(ASH) -c " \
 | 
|---|
 | 666 |                 export CC=\"gcc.exe\" ; \
 | 
|---|
| [41] | 667 |                 $< \
 | 
|---|
| [68] | 668 |                 --enable-clh \
 | 
|---|
| [41] | 669 |                 --enable-threads=os2 \
 | 
|---|
| [68] | 670 |                 --enable-shared=libgcc \
 | 
|---|
| [41] | 671 |                 --enable-nls \
 | 
|---|
 | 672 |                 --without-included-gettext \
 | 
|---|
 | 673 |                 --with-local-prefix=$(subst \,/,$(PATH_EMXPGCC)) \
 | 
|---|
| [109] | 674 |                 --prefix=$(ALL_PREFIX) \
 | 
|---|
| [41] | 675 |                 --with-gnu-ld \
 | 
|---|
 | 676 |                 --with-gnu-as \
 | 
|---|
 | 677 |                 --disable-libgcj \
 | 
|---|
 | 678 |                 --enable-languages=c,c++ "
 | 
|---|
| [69] | 679 | else
 | 
|---|
 | 680 |         $(ASH) -c "$< \
 | 
|---|
| [103] | 681 |                 --disable-clh \
 | 
|---|
| [69] | 682 |                 --enable-shared=libgcc \
 | 
|---|
 | 683 |                 --enable-nls \
 | 
|---|
 | 684 |                 --without-included-gettext \
 | 
|---|
 | 685 |                 --with-local-prefix=$(subst \,/,$(PATH_EMXPGCC)) \
 | 
|---|
| [109] | 686 |                 --prefix=$(ALL_PREFIX) \
 | 
|---|
| [69] | 687 |                 --with-gnu-ld \
 | 
|---|
 | 688 |                 --with-gnu-as \
 | 
|---|
 | 689 |                 --disable-libgcj \
 | 
|---|
 | 690 |                 --enable-languages=c,c++ "
 | 
|---|
 | 691 | endif
 | 
|---|
| [41] | 692 |         touch $(PATH_OBJ)/gcc/.ts.configured
 | 
|---|
| [103] | 693 | # TODO: Andy, on Linux --enable-clh result in linking errors.
 | 
|---|
 | 694 | 
 | 
|---|
| [76] | 695 | # Install the GCC build
 | 
|---|
 | 696 | #       Repeating the prefix doesn't hurt anybody.
 | 
|---|
 | 697 | gcc-install-it:
 | 
|---|
| [109] | 698 |         $(MAKE) prefix=$(PATH_BIND)/usr install
 | 
|---|
| [25] | 699 | 
 | 
|---|
| [120] | 700 | 
 | 
|---|
 | 701 | 
 | 
|---|
| [111] | 702 | # easy, update src/gcc/gcc/version.c
 | 
|---|
 | 703 | gcc-versionstamps:
 | 
|---|
 | 704 |         @echo "Version stamping gcc..."
 | 
|---|
 | 705 |         mv -f $(PATH_TOP)/src/gcc/gcc/version.c $(PATH_TOP)/src/gcc/gcc/version.tmp.c
 | 
|---|
 | 706 |         sed -e '/version_string/s/\([0-9]\.[0-9]*\.[0-9]*\).*/\1 $(INNOTEK_VERSION)";/' \
 | 
|---|
 | 707 |                 $(PATH_TOP)/src/gcc/gcc/version.tmp.c > $(PATH_TOP)/src/gcc/gcc/version.c
 | 
|---|
 | 708 |         rm -f $(PATH_TOP)/src/gcc/gcc/version.tmp.c
 | 
|---|
 | 709 | 
 | 
|---|
 | 710 | 
 | 
|---|
| [120] | 711 | # Install to builttools directory.      
 | 
|---|
 | 712 | gcc-builttools-stage2:
 | 
|---|
 | 713 |         $(MAKE) -C $(PATH_OBJ)/gcc prefix=$(PATH_BUILTTOOLSD) install
 | 
|---|
 | 714 | 
 | 
|---|
| [111] | 715 |                 
 | 
|---|
| [55] | 716 | # Generate diffs for GCC (v3.2.2) - part of packing a release.
 | 
|---|
| [109] | 717 | .PHONY: gcc-diff $(ALL_PREFIX)/src/diffs/gcc-$(GCC_VERSION).diff
 | 
|---|
 | 718 | gcc-diff: $(ALL_PREFIX)/src/diffs/gcc-$(GCC_VERSION).diff
 | 
|---|
 | 719 | $(ALL_PREFIX)/src/diffs/gcc-$(GCC_VERSION).diff:
 | 
|---|
| [55] | 720 |         mkdir -p $(@D)
 | 
|---|
| [109] | 721 |         $(TOOL_CVS_DIFF_TREE) $(GCC_CVS_REL) src/gcc > $@
 | 
|---|
| [25] | 722 | 
 | 
|---|
| [102] | 723 |                 
 | 
|---|
 | 724 |                 
 | 
|---|
 | 725 |                 
 | 
|---|
 | 726 |                 
 | 
|---|
 | 727 |                 
 | 
|---|
 | 728 |                 
 | 
|---|
| [55] | 729 | 
 | 
|---|
| [25] | 730 | ###############################################################################
 | 
|---|
 | 731 | ###############################################################################
 | 
|---|
 | 732 | ###############################################################################
 | 
|---|
| [34] | 733 | #
 | 
|---|
| [25] | 734 | #    B i n U t i l s
 | 
|---|
| [34] | 735 | #
 | 
|---|
| [25] | 736 | ###############################################################################
 | 
|---|
 | 737 | ###############################################################################
 | 
|---|
 | 738 | ###############################################################################
 | 
|---|
| [96] | 739 | 
 | 
|---|
 | 740 | BINUTILS_DIRS = \
 | 
|---|
 | 741 | binutils/bfd \
 | 
|---|
 | 742 | binutils/opcodes \
 | 
|---|
 | 743 | binutils/gas \
 | 
|---|
 | 744 | binutils/gprof \
 | 
|---|
 | 745 | binutils/binutils \
 | 
|---|
 | 746 | binutils/ld \
 | 
|---|
 | 747 | 
 | 
|---|
 | 748 | BINUTILS_NOT_DIRS =\
 | 
|---|
 | 749 | binutils/etc \
 | 
|---|
 | 750 | binutils/libiberty \
 | 
|---|
 | 751 | binutils/intl \
 | 
|---|
 | 752 | 
 | 
|---|
 | 753 | 
 | 
|---|
 | 754 | BINUTILS_CONFIGURE_DIRS = $(BINUTILS_DIRS) $(BINUTILS_NOT_DIRS)
 | 
|---|
 | 755 | 
 | 
|---|
| [25] | 756 | all-binutils  binutils:
 | 
|---|
| [89] | 757 |         echo "Binutils are build together with the other GNU Tools in GCC."
 | 
|---|
 | 758 |         echo "Separate building of binutils is not configured."
 | 
|---|
| [25] | 759 | 
 | 
|---|
 | 760 | 
 | 
|---|
 | 761 | 
 | 
|---|
| [96] | 762 | # configure.in/configure
 | 
|---|
 | 763 | .PHONY: binutils-autoconf-refresh binutils-autoconf-rerun binutils-autoconf-clean binutils-autoconf-remove
 | 
|---|
 | 764 | binutils-autoconf-refresh binutils-autoconf-rerun binutils-autoconf-clean binutils-autoconf-remove:
 | 
|---|
 | 765 | ifeq "$(BUILD_PLATFORM)" "LINUX"
 | 
|---|
 | 766 |         -$(SH) $(PATH_TOP)/xfix.sh
 | 
|---|
 | 767 | endif
 | 
|---|
 | 768 |         for dir in $(BINUTILS_CONFIGURE_DIRS); do \
 | 
|---|
 | 769 |                 if $(MAKE) $(@:binutils-autoconf-%=%) -f $(PWD)/config.gmk -C src/$$dir ; then \
 | 
|---|
 | 770 |                         true; \
 | 
|---|
 | 771 |                 else \
 | 
|---|
 | 772 |                         exit 8; \
 | 
|---|
 | 773 |                 fi \
 | 
|---|
 | 774 |         done
 | 
|---|
 | 775 | 
 | 
|---|
 | 776 | 
 | 
|---|
 | 777 | # build the components.
 | 
|---|
 | 778 | .PHONY: binutils-build binutils-install binutils-configure
 | 
|---|
 | 779 | binutils-build binutils-install binutils-configure:
 | 
|---|
 | 780 |         mkdir -p $(PATH_OBJ)/binutils
 | 
|---|
 | 781 |         $(MAKE) -C $(PATH_OBJ)/binutils -f $(MAKEFILE) $@-it
 | 
|---|
 | 782 | 
 | 
|---|
 | 783 | 
 | 
|---|
 | 784 | # When changed directory
 | 
|---|
 | 785 | binutils-build-it: \
 | 
|---|
 | 786 |                 $(PATH_OBJ)/binutils/.ts.configured
 | 
|---|
 | 787 |         $(ASH) -c " unset GCCLOAD ; $(MAKE) -C $(PATH_OBJ)/binutils "
 | 
|---|
 | 788 |                 
 | 
|---|
 | 789 | # configure it (invoked after directory change).
 | 
|---|
 | 790 | #       We set CC to help configure finding it.
 | 
|---|
| [98] | 791 | #       And we reconfigure libiberty to the gcc one.
 | 
|---|
| [96] | 792 | binutils-configure-it $(PATH_OBJ)/binutils/.ts.configured: $(PATH_TOP)/src/binutils/configure
 | 
|---|
 | 793 |         $(ASH) -c " \
 | 
|---|
 | 794 |                 export CC=\"gcc.exe\" ; \
 | 
|---|
 | 795 |                 $< \
 | 
|---|
 | 796 |                 --enable-shared \
 | 
|---|
| [109] | 797 |                 --prefix=$(ALL_PREFIX) "
 | 
|---|
| [98] | 798 |         $(ASH) -c "cd libiberty && \
 | 
|---|
 | 799 |                 $(PATH_TOP)/src/gcc/libiberty/configure \
 | 
|---|
| [109] | 800 |                 --prefix=$(ALL_PREFIX) "
 | 
|---|
| [96] | 801 |         touch $(PATH_OBJ)/binutils/.ts.configured
 | 
|---|
 | 802 |         
 | 
|---|
 | 803 |         
 | 
|---|
 | 804 | # Install the Binutils build
 | 
|---|
 | 805 | #       Repeating the prefix doesn't hurt anybody.
 | 
|---|
 | 806 | binutils-install-it:
 | 
|---|
| [111] | 807 |         $(MAKE) prefix=$(ALL_PREFIX) install
 | 
|---|
| [96] | 808 | 
 | 
|---|
 | 809 | 
 | 
|---|
| [111] | 810 | # Not so easy, need to patch a few files.
 | 
|---|
 | 811 | binutils-versionstamps:
 | 
|---|
 | 812 |         @echo "Version stamping binutils..."
 | 
|---|
 | 813 |         cp -f $(PATH_TOP)/src/binutils/binutils/version.c  $(PATH_TOP)/src/binutils/binutils/version.tmp.c
 | 
|---|
 | 814 |         sed -e '/printf.*program_version/s/%s %s.*\\n/%s %s $(INNOTEK_VERSION)\\n/' \
 | 
|---|
 | 815 |                 $(PATH_TOP)/src/binutils/binutils/version.tmp.c > $(PATH_TOP)/src/binutils/binutils/version.c
 | 
|---|
 | 816 |         rm -f $(PATH_TOP)/src/binutils/binutils/version.tmp.c           
 | 
|---|
 | 817 |         if [ -f $(PATH_TOP)/src/gcc/binutils/version.c ]; then \
 | 
|---|
 | 818 |                 cp -f $(PATH_TOP)/src/gcc/binutils/version.c  $(PATH_TOP)/src/gcc/binutils/version.tmp.c && \
 | 
|---|
 | 819 |                 sed -e '/printf.*program_version/s/%s %s.*\\n/%s %s $(INNOTEK_VERSION)\\n/' \
 | 
|---|
 | 820 |                         $(PATH_TOP)/src/gcc/binutils/version.tmp.c > $(PATH_TOP)/src/gcc/binutils/version.c && \
 | 
|---|
 | 821 |                 rm -f $(PATH_TOP)/src/gcc/binutils/version.tmp.c ; \
 | 
|---|
 | 822 |         fi
 | 
|---|
 | 823 |         @echo "Version stamping gas..."
 | 
|---|
 | 824 |         cp -f $(PATH_TOP)/src/binutils/gas/as.c $(PATH_TOP)/src/binutils/gas/as.tmp.c
 | 
|---|
 | 825 |         sed -e '/printf.*GNU.*assembler/s/%s.*\\n/%s $(INNOTEK_VERSION)\\n/' \
 | 
|---|
 | 826 |             -e '/fprintf.*GNU.*assembler.*version.*BFD.*/s/using BFD version %s.*/using BFD version %s $(INNOTEK_VERSION)"),/ ' \
 | 
|---|
 | 827 |                 $(PATH_TOP)/src/binutils/gas/as.tmp.c > $(PATH_TOP)/src/binutils/gas/as.c
 | 
|---|
 | 828 |         rm -f $(PATH_TOP)/src/binutils/gas/as.tmp.c             
 | 
|---|
 | 829 |         if [ -f $(PATH_TOP)/src/gcc/gas/as.c ]; then \
 | 
|---|
 | 830 |                 cp -f $(PATH_TOP)/src/gcc/gas/as.c  $(PATH_TOP)/src/gcc/gas/as.tmp.c && \
 | 
|---|
 | 831 |                 sed -e '/printf.*GNU.*assembler/s/%s.*\\n/%s $(INNOTEK_VERSION)\\n/' \
 | 
|---|
 | 832 |                         -e '/fprintf.*GNU.*assembler.*version.*BFD.*/s/using BFD version %s.*/using BFD version %s $(INNOTEK_VERSION)"),/ ' \
 | 
|---|
 | 833 |                         $(PATH_TOP)/src/gcc/gas/as.tmp.c > $(PATH_TOP)/src/gcc/gas/as.c && \
 | 
|---|
 | 834 |                 rm -f $(PATH_TOP)/src/gcc/gas/as.tmp.c ; \
 | 
|---|
 | 835 |         fi
 | 
|---|
 | 836 |         @echo "Version stamping ld..."
 | 
|---|
 | 837 |         cp -f $(PATH_TOP)/src/binutils/ld/ldver.c $(PATH_TOP)/src/binutils/ld/ldver.tmp.c
 | 
|---|
 | 838 |         sed -e '/fprintf.*GNU.*ld.*version/s/(with BFD %s).*/(with BFD %s) $(INNOTEK_VERSION)\\n"),/' \
 | 
|---|
 | 839 |                 $(PATH_TOP)/src/binutils/ld/ldver.tmp.c > $(PATH_TOP)/src/binutils/ld/ldver.c
 | 
|---|
 | 840 |         rm -f $(PATH_TOP)/src/binutils/ld/ldver.tmp.c           
 | 
|---|
 | 841 |         if [ -f $(PATH_TOP)/src/gcc/ld/ldver.c ]; then \
 | 
|---|
 | 842 |                 cp -f $(PATH_TOP)/src/gcc/ld/ldver.c $(PATH_TOP)/src/gcc/ld/ldver.tmp.c && \
 | 
|---|
 | 843 |                 sed -e '/fprintf.*GNU.*ld.*version/s/(with BFD %s).*/(with BFD %s) $(INNOTEK_VERSION)\\n"),/' \
 | 
|---|
 | 844 |                         $(PATH_TOP)/src/gcc/ld/ldver.tmp.c > $(PATH_TOP)/src/gcc/ld/ldver.c && \
 | 
|---|
 | 845 |                 rm -f $(PATH_TOP)/src/gcc/ld/ldver.tmp.c ; \
 | 
|---|
 | 846 |         fi              
 | 
|---|
 | 847 |         
 | 
|---|
| [96] | 848 | 
 | 
|---|
| [111] | 849 |                                         
 | 
|---|
| [109] | 850 | # Generate diffs for Binutils (part of packing).
 | 
|---|
 | 851 | .PHONY: binutils-diff $(ALL_PREFIX)/src/diffs/binutils-$(BINUTILS_VERSION).diff
 | 
|---|
 | 852 | binutils-diff: $(ALL_PREFIX)/src/diffs/binutils-$(BINUTILS_VERSION).diff
 | 
|---|
 | 853 | $(ALL_PREFIX)/src/diffs/binutils-$(BINUTILS_VERSION).diff:
 | 
|---|
| [89] | 854 |         mkdir -p $(@D)
 | 
|---|
| [109] | 855 |         $(TOOL_CVS_DIFF_TREE) $(BINUTILS_CVS_REL) src/binutils > $@
 | 
|---|
| [98] | 856 | 
 | 
|---|
 | 857 | 
 | 
|---|
 | 858 | 
 | 
|---|
| [109] | 859 |                                                         
 | 
|---|
| [98] | 860 | 
 | 
|---|
| [89] | 861 |         
 | 
|---|
| [25] | 862 | 
 | 
|---|
| [96] | 863 | 
 | 
|---|
| [25] | 864 | ###############################################################################
 | 
|---|
 | 865 | ###############################################################################
 | 
|---|
 | 866 | ###############################################################################
 | 
|---|
| [34] | 867 | #
 | 
|---|
| [25] | 868 | #    E M X
 | 
|---|
| [34] | 869 | #
 | 
|---|
| [25] | 870 | ###############################################################################
 | 
|---|
 | 871 | ###############################################################################
 | 
|---|
 | 872 | ###############################################################################
 | 
|---|
| [120] | 873 | all-emx  emx: \
 | 
|---|
 | 874 |                 emx-build
 | 
|---|
 | 875 |         @echo "Successfully build EMX."
 | 
|---|
| [25] | 876 |         
 | 
|---|
| [120] | 877 | # Some helpers.         
 | 
|---|
 | 878 | # TODO: Change OUT and INS to the right ones. Currently not possible as
 | 
|---|
 | 879 | #       doing such breaks the rules generating.
 | 
|---|
 | 880 | EMX_MODE = dbg
 | 
|---|
 | 881 | ifeq "$(BUILD_MODE)" "RELEASE"
 | 
|---|
 | 882 | EMX_MODE = opt
 | 
|---|
 | 883 | endif
 | 
|---|
 | 884 | EMX_OUT  = out/
 | 
|---|
 | 885 | EMX_INS  = out/install/
 | 
|---|
 | 886 | EMX_MASM = $(PATH_TOP)/tools/x86.os2/masm/v6.0/binp/ml.exe
 | 
|---|
 | 887 | EMX_DEFINES = OUT=$(EMX_OUT) INS=$(EMX_INS) MODE=$(EMX_MODE) "ASM=$(EMX_MASM) -c"
 | 
|---|
| [109] | 888 |                                                                         
 | 
|---|
| [120] | 889 | # build the components. (directory changer rules)
 | 
|---|
 | 890 | .PHONY: emx-build emx-install emx-configure
 | 
|---|
 | 891 | emx-build emx-install emx-configure:
 | 
|---|
 | 892 |         mkdir -p $(PATH_OBJ)/emx
 | 
|---|
 | 893 |         $(MAKE) -C $(PATH_TOP)/src/emx -f $(MAKEFILE) $@-it
 | 
|---|
 | 894 | 
 | 
|---|
 | 895 | # This is the configure equivalent.     
 | 
|---|
 | 896 | emx-configure-it: $(PATH_TOP)/src/emx/out/genrules.smak
 | 
|---|
 | 897 | $(PATH_TOP)/src/emx/$(EMX_OUT)genrules.smak:
 | 
|---|
 | 898 |         rm -f $(PATH_TOP)/src/emx/out/genrules.smak
 | 
|---|
 | 899 |         $(MAKE) -C $(PATH_TOP)/src/emx $(EMX_DEFINES) $(EMX_OUT)genrules.smak
 | 
|---|
 | 900 |         
 | 
|---|
| [132] | 901 | # tricky thing here, need to make sure emxomf is made first.
 | 
|---|
| [120] | 902 | emx-build-it: \
 | 
|---|
 | 903 |                 $(PATH_TOP)/src/emx/$(EMX_OUT)genrules.smak
 | 
|---|
| [132] | 904 |         $(MAKE) -C $(PATH_TOP)/src/emx $(EMX_DEFINES) emxomf all
 | 
|---|
| [120] | 905 | 
 | 
|---|
 | 906 | emx-install-it: \
 | 
|---|
 | 907 |                 $(PATH_TOP)/src/emx/$(EMX_OUT)genrules.smak
 | 
|---|
 | 908 |         $(MAKE) -C $(PATH_TOP)/src/emx $(EMX_DEFINES) install
 | 
|---|
 | 909 | 
 | 
|---|
 | 910 |                                         
 | 
|---|
 | 911 | # easy, update same stuff in a bunch of files.
 | 
|---|
 | 912 | EMX_FILE_VER = \
 | 
|---|
 | 913 | emxbind/emxbind.h emxcat/emxcat.c emxdoc/emxdoc.c emxexp/emxexp.c emximp/emximp.c \
 | 
|---|
 | 914 | emxload/emxload.c emxomf/emxaout.c emxomf/emxomf.c emxomf/emxomfar.c emxomf/emxomfld.c \
 | 
|---|
 | 915 | emxomf/listomf.c emxstack/emxstack.c emxtsf/emxtsf.c os2/version.h
 | 
|---|
| [111] | 916 | emx-versionstamps:
 | 
|---|
| [120] | 917 |         @echo "Version stamping EMX..."
 | 
|---|
 | 918 |         @for file in $(EMX_FILE_VER); \
 | 
|---|
 | 919 |     do \
 | 
|---|
 | 920 |                 echo "   src/emx/src/$$file" && \
 | 
|---|
 | 921 |                 if (cp -f $(PATH_TOP)/src/emx/src/$$file $(PATH_TOP)/src/emx/src/$$file.tmp && \
 | 
|---|
 | 922 |                         sed -e '/#[\t ]*define[\t ]*VERSION[\t ]*/s/"0\.9d.*"/"0.9d $(INNOTEK_VERSION)"/' \
 | 
|---|
 | 923 |                                 $(PATH_TOP)/src/emx/src/$$file.tmp > $(PATH_TOP)/src/emx/src/$$file && \
 | 
|---|
 | 924 |                         rm -f $(PATH_TOP)/src/emx/src/$$file.tmp) ; \
 | 
|---|
 | 925 |                 then true; \
 | 
|---|
 | 926 |                 else exit 1; \
 | 
|---|
 | 927 |                 fi; \
 | 
|---|
 | 928 |         done
 | 
|---|
 | 929 | 
 | 
|---|
| [109] | 930 |                                                                         
 | 
|---|
| [120] | 931 | # Install the compiled emx stuff to builttools.
 | 
|---|
 | 932 | emx-builttools-stage2:  
 | 
|---|
 | 933 |         $(MAKE) -C $(PATH_TOP)/src/emx $(EMX_DEFINES) INS=$(PATH_BUILTTOOLS)/  install
 | 
|---|
 | 934 | 
 | 
|---|
 | 935 | 
 | 
|---|
| [109] | 936 | # Generate diffs for Binutils (part of packing).
 | 
|---|
 | 937 | .PHONY: binutils-diff $(ALL_PREFIX)/src/diffs/emx-$(EMX_VERSION).diff
 | 
|---|
 | 938 | emx-diff: $(ALL_PREFIX)/src/diffs/emx-$(EMX_VERSION).diff
 | 
|---|
 | 939 | $(ALL_PREFIX)/src/diffs/emx-$(EMX_VERSION).diff:
 | 
|---|
 | 940 |         mkdir -p $(@D)
 | 
|---|
 | 941 |         $(TOOL_CVS_DIFF_TREE) $(EMX_CVS_REL) src/emx > $@
 | 
|---|
| [111] | 942 | 
 | 
|---|
| [122] | 943 | 
 | 
|---|
 | 944 | 
 | 
|---|
 | 945 | ###############################################################################
 | 
|---|
 | 946 | ###############################################################################
 | 
|---|
 | 947 | ###############################################################################
 | 
|---|
 | 948 | #
 | 
|---|
 | 949 | #    M I S C
 | 
|---|
 | 950 | #
 | 
|---|
 | 951 | ###############################################################################
 | 
|---|
 | 952 | ###############################################################################
 | 
|---|
 | 953 | ###############################################################################
 | 
|---|
 | 954 | 
 | 
|---|
 | 955 | 
 | 
|---|
 | 956 | dejagnu:
 | 
|---|
 | 957 | # nothing to make at the moment, it's just a all install stuff it seems.
 | 
|---|
 | 958 | 
 | 
|---|
 | 959 | requires_autoconf_2_52_DEJAGNU_CONFIGURE_DIRS = \
 | 
|---|
 | 960 | src/misc/dejagnu \
 | 
|---|
 | 961 | src/misc/dejagnu/contrib/bluegnu2.0.3 \
 | 
|---|
 | 962 | src/misc/dejagnu/contrib/bluegnu2.0.3/doc \
 | 
|---|
 | 963 | src/misc/dejagnu/contrib/bluegnu2.0.3/example \
 | 
|---|
 | 964 | src/misc/dejagnu/contrib/bluegnu2.0.3/example/calc \
 | 
|---|
 | 965 | src/misc/dejagnu/contrib/bluegnu2.0.3/testsuite \
 | 
|---|
 | 966 | src/misc/dejagnu/example/calc \
 | 
|---|
 | 967 | src/misc/dejagnu/example/hello
 | 
|---|
 | 968 | 
 | 
|---|
 | 969 | .PHONY: dejagnu-autoconf-refresh dejagnu-autoconf-rerun dejagnu-autoconf-clean dejagnu-autoconf-remove
 | 
|---|
 | 970 | dejagnu-autoconf-refresh dejagnu-autoconf-rerun dejagnu-autoconf-clean dejagnu-autoconf-remove:
 | 
|---|
 | 971 | ifeq "$(BUILD_PLATFORM)" "LINUX"
 | 
|---|
 | 972 |         -$(SH) $(PATH_TOP)/xfix.sh
 | 
|---|
 | 973 | endif
 | 
|---|
 | 974 |         for dir in $(DEJAGNU_CONFIGURE_DIRS); do \
 | 
|---|
 | 975 |                 if $(MAKE) $(@:dejagnu-autoconf-%=%) -f $(PWD)/config.gmk -C $$dir ; then \
 | 
|---|
 | 976 |                         true; \
 | 
|---|
 | 977 |                 else \
 | 
|---|
 | 978 |                         exit 8; \
 | 
|---|
 | 979 |                 fi \
 | 
|---|
 | 980 |         done
 | 
|---|
 | 981 | 
 | 
|---|
 | 982 | 
 | 
|---|
 | 983 |         
 | 
|---|
 | 984 | #
 | 
|---|
 | 985 | # Expect
 | 
|---|
 | 986 | #
 | 
|---|
 | 987 | 
 | 
|---|
 | 988 | expect:
 | 
|---|
 | 989 | 
 | 
|---|
 | 990 | 
 | 
|---|
 | 991 | # build the components.
 | 
|---|
 | 992 | .PHONY: expect-build expect-install expect-configure
 | 
|---|
 | 993 | expect-build expect-install expect-configure:
 | 
|---|
 | 994 |         mkdir -p $(PATH_OBJ)/misc/expect
 | 
|---|
 | 995 |         $(MAKE) -C $(PATH_OBJ)/misc/expect -f $(MAKEFILE) $@-it
 | 
|---|
 | 996 | 
 | 
|---|
 | 997 | 
 | 
|---|
 | 998 | # When changed directory
 | 
|---|
 | 999 | expect-build-it: \
 | 
|---|
 | 1000 |                 $(PATH_OBJ)/misc/expect/.ts.configured
 | 
|---|
 | 1001 |         $(MAKE) -C $(PATH_OBJ)/misc/expect
 | 
|---|
 | 1002 |                 
 | 
|---|
 | 1003 | # configure it (invoked after directory change).
 | 
|---|
 | 1004 | #       We set CC to help configure finding it.
 | 
|---|
 | 1005 | #       And we reconfigure libiberty to the gcc one.
 | 
|---|
 | 1006 | expect-configure-it $(PATH_OBJ)/misc/expect/.ts.configured: $(PATH_TOP)/src/misc/expect/configure
 | 
|---|
 | 1007 | ifeq "$(BUILD_PLATFORM)" "OS2"
 | 
|---|
 | 1008 |         $(ASH) -c " \
 | 
|---|
 | 1009 |                 export CC=\"gcc.exe\" ; \
 | 
|---|
 | 1010 |                 $< \
 | 
|---|
 | 1011 |                 --disable-shared \
 | 
|---|
 | 1012 |                 --host=i386-pc-os2-emx \
 | 
|---|
 | 1013 |                 --with-tclconfig=$(UNIXROOT)/usr/lib \
 | 
|---|
 | 1014 |                 --with-tclinclude=$(UNIXROOT)/usr/lib/tcl8.0/include \
 | 
|---|
 | 1015 |                 --enable-gcc \
 | 
|---|
 | 1016 |                 $(BUILD_ENABLE_SYMBOLS) \
 | 
|---|
 | 1017 |                 --prefix=$(PATH_BUILTTOOLSD) "
 | 
|---|
 | 1018 | else
 | 
|---|
 | 1019 |         $(ASH) -c " \
 | 
|---|
 | 1020 |                 $< \
 | 
|---|
 | 1021 |                 --enable-gcc \
 | 
|---|
 | 1022 |                 $(BUILD_ENABLE_SYMBOLS) \
 | 
|---|
 | 1023 |                 --prefix=$(PATH_BUILTTOOLSD) "
 | 
|---|
 | 1024 | endif           
 | 
|---|
 | 1025 |         touch $(PATH_OBJ)/misc/expect/.ts.configured
 | 
|---|
 | 1026 |         
 | 
|---|
 | 1027 |         
 | 
|---|
 | 1028 | # install to builttools (if anywhere!)
 | 
|---|
 | 1029 | expect-install-it:
 | 
|---|
 | 1030 |         $(MAKE) prefix=$(PATH_BUILTTOOLSD) install
 | 
|---|
 | 1031 |         
 | 
|---|
 | 1032 | 
 | 
|---|
 | 1033 | 
 | 
|---|
 | 1034 | EXPECT_CONFIGURE_DIRS = \
 | 
|---|
 | 1035 | src/misc/expect
 | 
|---|
 | 1036 | # skipping testsuite for now as it requires some .m4 files we don't have.
 | 
|---|
 | 1037 | #src/misc/expect/testsuite
 | 
|---|
 | 1038 | 
 | 
|---|
 | 1039 | .PHONY: expect-autoconf-refresh expect-autoconf-rerun expect-autoconf-clean expect-autoconf-remove
 | 
|---|
 | 1040 | expect-autoconf-refresh expect-autoconf-rerun expect-autoconf-clean expect-autoconf-remove:
 | 
|---|
 | 1041 | ifeq "$(BUILD_PLATFORM)" "LINUX"
 | 
|---|
 | 1042 |         -$(SH) $(PATH_TOP)/xfix.sh
 | 
|---|
 | 1043 | endif
 | 
|---|
 | 1044 |         for dir in $(EXPECT_CONFIGURE_DIRS); do \
 | 
|---|
 | 1045 |                 if $(MAKE) $(@:expect-autoconf-%=%) -f $(PWD)/config.gmk -C $$dir ; then \
 | 
|---|
 | 1046 |                         true; \
 | 
|---|
 | 1047 |                 else \
 | 
|---|
 | 1048 |                         exit 8; \
 | 
|---|
 | 1049 |                 fi \
 | 
|---|
 | 1050 |         done
 | 
|---|
 | 1051 | 
 | 
|---|
 | 1052 | 
 | 
|---|
 | 1053 | 
 | 
|---|
| [132] | 1054 | # DO NOT DELETE
 | 
|---|