Changeset 213 for trunk/src/emx/Makefile


Ignore:
Timestamp:
May 21, 2003, 11:57:27 PM (22 years ago)
Author:
zap
Message:

o Added OS/2 Unicode API headers and import file.
o Modified most standard functions in .s files to use the _std_ prefix.
o Fixed c_alias.a build rules so that it uses the correct c.a file (either

debug or optimized depending on build mode).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/emx/Makefile

    • Property cvs2svn:cvs-rev changed from 1.11 to 1.12
    r212 r213  
    8282DO.LINK.dll = $(LD) $(strip $(LDFLAGS.DLL) $(filter-out -l%,$1)) -o $@ $(^O) $(^DEF) $(^LIB) $(filter -l%,$1)
    8383
    84 # emxbind tool - you can depend on EMXBIND.BUILT :-)
    85 EMXBIND = $(if $(wildcard $(EMXBIND.BUILT)),$(EMXBIND.BUILT),emxbind$E)
    86 EMXBIND.BUILT = $.$(TOOLFMT)/emxbind$E
     84# emxbind tool
     85EMXBIND = $(call FINDTOOL,emxbind)
    8786# emxbind flags
    8887EMXBINDFLAGS = -q $(EMXBINDFLAGS.$(MODE))
     
    103102DO.LIBRARY = $(call RM,$@); $(AR) $(ARFLAGS)$1 $@ $(^O)
    104103
    105 # The tool to extract exports from object files and archives
    106 EMXEXP = $(if $(wildcard $(EMXEXP.BUILT)),$(EMXEXP.BUILT),emxexp$E)
    107 EMXEXP.BUILT = $./$(TOOLFMT)/emxexp$E
     104# The tool to extract exports from object files and archives,
     105# removing unused stuff (like empty lines and comments)
     106# and sorting alphabetically (looks nicer).
     107EMXEXP = $(call FINDTOOL,emxexp)
     108EMXEXPFLAGS = -u
     109DO.EMXEXP = $(EMXEXP) $(strip $(EMXEXPFLAGS) $1) $^ | sed -e "/^$$/d" -e "/^ *;/d" | sort -d >>$@
    108110
    109111# The tool to create import libraries
    110 IMPLIB = $(if $(wildcard $(IMPLIB.BUILT)),$(IMPLIB.BUILT),emximp$E)
    111 IMPLIB.BUILT = $./$(TOOLFMT)/emximp$E
     112IMPLIB = $(call FINDTOOL,emximp)
    112113IMPLIBFLAGS.prof = -m
    113114IMPLIBFLAGS.KIND = $(foreach x,$(subst -, ,$(firstword $(subst /, ,$(subst $.,,$@)))),$(IMPLIBFLAGS.$x))
     
    122123
    123124# How to convert an a.out file to the OMF format
    124 EMXOMF = $(if $(wildcard $(EMXOMF.BUILT)),$(EMXOMF.BUILT),emxomf$E)
    125 EMXOMF.BUILT = $./$(TOOLFMT)/emxomf$E
    126 DO.AOUT2OMF = $(EMXOMF) $(strip $1 -o) $@ $<
     125EMXOMF = $(call FINDTOOL,emxomf)
     126DO.EMXOMF = $(EMXOMF) $(strip $1 -o) $@ $<
    127127
    128128# How to filter just the object files from $^
     
    134134# How to filter the libraries from $^
    135135^LIB = $(filter %.$(if $(findstring omf,$(.TKIND)),lib,a),$^)
     136# This function finds a tool: if it has been already built, prefer it
     137FINDTOOL = $(firstword $(wildcard $.$(TOOLFMT)/$1$E) $(wildcard $(OUT)dbg/aout/$1$E) $1)
    136138
    137139# A newline
     
    187189TARGDEPEND :=
    188190
    189 .PHONY: default help all clean install cleandep cleandepend dep depend depdone
     191.PHONY: default help all tools clean install cleandep cleandepend dep depend depdone
    190192.SUFFIXES:
    191193.SUFFIXES: .c .cpp .asm .s .o .exe .dll .a .lib .obj
     
    207209help:
    208210        @$(call ECHO,$(SEP))
    209         @$(call ECHO,Welcome to $(PACKAGE) build system!)
     211        @$(call ECHO,Welcome to $(PACKAGE) version $(VERSION) build system!)
    210212        @$(call ECHO,$(COPYRIGHT))
    211213        @$(call ECHO,To build something, type 'make {target} {vars}', where {target} is one of:)
    212214        @$(call ECHO,    all - build all available modules)
    213215        @$(call ECHO,    {module-name} - build just a particular module)
     216        @$(call ECHO,    tools - build just the tools)
    214217        @$(call ECHO,    clean - remove all generated files (remove all built files))
    215218        @$(call ECHO,    install - generate a installation tree in $(INS))
     
    247250# bird: add rule for forcibly re-generating the rules.
    248251rules:
    249         @$(call RM,$(OUT)genrules.smak)
    250         $(MAKE) $(OUT)genrules.smak
    251 
    252 $(OUT)genrules.smak: $(SUBMAK) # Makefile $(wildcard *.smak)
    253         @$(call MKDIR,$(OUT))
     252        @$(call RM,$.genrules.smak)
     253        $(MAKE) $.genrules.smak
     254
     255$.genrules.smak: $(SUBMAK) # Makefile $(wildcard *.smak)
     256        @$(call MKDIR,$.)
    254257        @$(call ECHO,Please wait, rebuilding make rules ...)
    255258        @$(call RM,$@)
     
    259262# The general a.out -> OMF conversion rule for object files
    260263$.omf/%.obj: $.aout/%.o
    261         $(call DO.AOUT2OMF)
     264        $(call DO.EMXOMF)
    262265
    263266# The general a.out -> OMF conversion rule for libraries
    264267$.omf%.lib: $.aout%.a
    265         $(call DO.AOUT2OMF)
    266 
    267 -include $(OUT)genrules.smak
     268        $(call DO.EMXOMF)
     269
     270-include $.genrules.smak
Note: See TracChangeset for help on using the changeset viewer.