Changeset 748 for trunk/src


Ignore:
Timestamp:
Sep 29, 2003, 4:28:38 PM (22 years ago)
Author:
bird
Message:

It shouldn't be required to build the tools anylonger, but if we do, we should use them.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/emx/Makefile

    • Property cvs2svn:cvs-rev changed from 1.35 to 1.36
    r747 r748  
    7373A = .$(if $(findstring omf,$(.TKIND)),lib,a)
    7474
     75# Use the tool we built.
     76GETTOOL ?= $.$(TOOLFMT)/$1$E
     77# Use the tool we built if present
     78GETTOOL2 ?= `test -f '$.$(TOOLFMT)/$1$E' && echo '$.$(TOOLFMT)/'`$1$E
     79
    7580# The C compiler
    7681CC = gcc -c -Zmt
    7782# The C compiler flags
    78 CFLAGS.INC  += -Iinclude -Isrc/include
     83ifndef NO_LOCAL_HEADERS
     84CFLAGS.INC  += -Iinclude
     85endif
     86CFLAGS.INC  += -Isrc/include
    7987CFLAGS      = -Wall -Wmissing-prototypes -mstack-arg-probe $(CFLAGS.INC) $(CFLAGS.$(MODE)) $(CFLAGS.KIND)
    8088# The additional C compiler flags for different build modes
     
    126134
    127135# emxbind tool
    128 EMXBIND = $.$(TOOLFMT)/emxbind$E
     136EMXBIND = $(call GETTOOL,emxbind)
    129137# emxbind flags
    130138EMXBINDFLAGS = -bq $(EMXBINDFLAGS.$(MODE))
     
    146154
    147155# The tool to create an archive
    148 AR = $(if $(findstring .lib,$@),emxomf)ar
     156AR = $(if $(findstring .lib,$@), $(call GETTOOL2,emxomfar),ar)
    149157ARFLAGS = crs
    150158DO.LIBRARY = $(call RM,$@); $(AR) $(ARFLAGS)$1 $@ $(^O)
     
    153161# removing unused stuff (like empty lines and comments)
    154162# and sorting alphabetically (looks nicer).
    155 EMXEXP = $.$(TOOLFMT)/emxexp$E
     163EMXEXP = $(call GETTOOL,emxexp)
    156164EMXEXPFLAGS = -u
    157165DO.EMXEXP = $(EMXEXP) $(strip $(EMXEXPFLAGS) $1) | sed -e "/^$$/d" -e "/^ *;/d" | sort -d >>$2
    158166
    159167# The tool to create import libraries
    160 IMPLIB = $.$(TOOLFMT)/emximp$E
     168IMPLIB = $(call GETTOOL,emximp)
    161169IMPLIBFLAGS.prof = -m
    162170IMPLIBFLAGS.KIND = $(foreach x,$(subst -, ,$(firstword $(subst /, ,$(subst $.,,$@)))),$(IMPLIBFLAGS.$x))
     
    174182#   or not. Unfortunately make isn't up to the job of figuring this out, so we
    175183#       must use the shell.
    176 EMXOMF = `test -f '$.$(TOOLFMT)/emxomf$E' && echo '$.$(TOOLFMT)/'`emxomf$E
     184EMXOMF = $(call GETTOOL2,emxomf)
    177185DO.EMXOMF = $(EMXOMF) $(strip $1 -o) $@ $(if $<,$<, $(subst /omf/,/aout/,$(@:.obj=.o)) )
    178186
Note: See TracChangeset for help on using the changeset viewer.