Changeset 1133


Ignore:
Timestamp:
Aug 30, 2008, 6:27:29 AM (17 years ago)
Author:
Steven Levine
Message:

Optimize makefiles
Change from dllsyms to syms target for consistency
Avoid extra work for wmake -a dist
Pass FORTIFY options to subordinate makefiles

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/makefile

    r1054 r1133  
    2828# 03 Jul 07 SHL Change DEBUG semantics to ifdef/ifndef
    2929# 04 Jul 07 SHL Pass DEBUG settings to sub-make
    30 # 04 Jul 07 SHL Add missing .AUTODEPEND
     30# 04 Jul 07 SHL Add missing .autodepend
    3131# 06 Aug 07 SHL Tweak CFLAGS for DEBUG builds
    3232# 26 Aug 07 SHL Clean *.lrf
     
    4040# 05 May 08 SHL Add FORTIFY support
    4141# 26 May 08 SHL Update WARNALL to warn about more
     42# 22 Jul 08 SHL Change from dllsyms to syms target for consistency
    4243
    4344# Environment:
     
    163164
    164165!ifndef MAKERES
    165 .c.obj: .AUTODEPEND
     166.c.obj: .autodepend
    166167  $(CC) $(CFLAGS) $*.c
    167168!else
     
    202203     fm3res.str
    203204
    204 dllsyms: $(SYMS) .symbolic
     205syms: $(SYMS) .symbolic
    205206
    206207$(BASE).dll $(BASE).lib: $(OBJS) $(BASE).def $(BASE).lrf
     
    253254  cd..
    254255
    255 $(BASERES).obj: $(BASERES).c .AUTODEPEND
     256$(BASERES).obj: $(BASERES).c .autodepend
    256257  $(CC) $(CFLAGSR) $(BASERES).c
    257258
  • trunk/makefile

    r1054 r1133  
    1919# 21 Jan 08 SHL Add *.lrf to clean target
    2020# 22 Feb 08 JBS Suppress lxlite processing when DEBUG=1
     21# 08 Jul 08 SHL Avoid extra work for wmake -a dist
     22# 22 Jul 08 SHL Change from dll\dllsyms to dll\syms target for consistency
     23# 22 Jul 08 SHL Pass FORTIFY options to subordinate makefiles
    2124
    2225# Environment - see makefile_pre.mk
     
    4245!include makefile_pre.mk
    4346
    44 
    4547all: dll $(BASE) allexe .symbolic
    4648
    4749syms: exesyms dllsyms .symbolic
    4850
    49 dist: all syms lxlite wpi .symbolic
     51dist: lxlitedll $(BASE) lxliteexe syms wpi .symbolic
    5052
    5153# Only update resources
     
    5860dll: .symbolic
    5961  cd dll
    60   $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT)
     62  $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT) $(FORTIFY_OPT)
    6163  cd ..
    6264
    6365dllsyms: .symbolic
    6466  cd dll
    65   $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT) dllsyms
     67  $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT) $(FORTIFY_OPT) syms
    6668  cd ..
    6769
    6870$(BASE): $(BASE).exe $(BASE).res .symbolic
    6971
    70 $(BASE).res: $(BASE).rc  icons\$(BASE).ico bitmaps\*.bmp
     72$(BASE).res: $(BASE).rc  icons\$(BASE).ico bitmaps\*.bmp  .autodepend
    7173
    72 $(BASE).obj: $(BASE).c dll\version.h
     74$(BASE).obj: $(BASE).c dll\version.h .autodepend
    7375
    7476# make EXE compenents
    7577
    7678allexe: *.mak .symbolic
    77    @for %f in ($<) do $(MAKE) -f %f $(__MAKEOPTS__) $(DEBUG_OPT)
     79   @for %f in ($<) do $(MAKE) -f %f $(__MAKEOPTS__) $(DEBUG_OPT) $(FORTIFY_OPT)
    7880
    7981# make SYM files
    8082
    8183exesyms: *.mak .symbolic
    82    @for %f in ($<) do $(MAKE) -f %f $(__MAKEOPTS__) $(DEBUG_OPT) sym
     84   @for %f in ($<) do $(MAKE) -f %f $(__MAKEOPTS__) $(DEBUG_OPT) $(FORTIFY_OPT) sym
    8385
    8486# make WPI files
     
    8991   cd ..
    9092
     93lxlite:: lxlitedll lxliteexe .symbolic
     94
    9195# makefile_post.mk contains lxlite target for $(BASE).exe
    9296# Apply to each *.mak for other exes
    93 lxlite:: *.mak .symbolic
     97lxliteexe: *.mak .symbolic
    9498!ifdef DEBUG
    9599!  ifeq DEBUG 0
    96      @for %f in ($<) do $(MAKE) -f %f $(__MAKEOPTS__) $(DEBUG_OPT) lxlite
     100     @for %f in ($<) do $(MAKE) -f %f $(__MAKEOPTS__) $(DEBUG_OPT) $(FORTIFY_OPT) lxlite
    97101!  endif
    98102!else
    99      @for %f in ($<) do $(MAKE) -f %f $(__MAKEOPTS__) $(DEBUG_OPT) lxlite
     103     @for %f in ($<) do $(MAKE) -f %f $(__MAKEOPTS__) $(DEBUG_OPT) $(FORTIFY_OPT) lxlite
    100104!endif
    101105
    102106# Apply to dlls
    103 lxlite:: .symbolic
     107lxlitedll: .symbolic
    104108  cd dll
    105109!ifdef DEBUG
    106110!  ifeq DEBUG 0
    107 #      $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT) lxlite
    108      $(MAKE) $(DEBUG_OPT) lxlite
     111      $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT) $(FORTIFY_OPT) lxlite
     112#     $(MAKE) $(DEBUG_OPT) $(FORTIFY_OPT) lxlite
    109113!  endif
    110114!else
    111 #   $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT) lxlite
    112   $(MAKE) $(DEBUG_OPT) lxlite
     115   $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT) $(FORTIFY_OPT) lxlite
     116#  $(MAKE) $(DEBUG_OPT) $(FORTIFY_OPT) lxlite
    113117!endif
    114118  cd ..
  • trunk/makefile_pre.mk

    r1023 r1133  
    1313# 23 Jan 08 JBS Add support for building SYM files (Ticket 226)
    1414# 27 May 08 SHL Add WARNALL and FORTIFY support
     15# 22 Jul 08 SHL Pass FORTIFY to subordinate makefiles
    1516
    1617CC = wcc386
     
    4546!endif
    4647
    47 !ifdef %FORTIFY                 # if defined in environment
    48 FORTIFY = $(%FORTIFY)           # use value from environment
     48!ifdef FORTIFY                          # if defined on wmake command line
     49FORTIFY_OPT = FORTIFY=$(FORTIFY)        # set in case needed by sub-make
     50!else
     51!ifdef %FORTIFY                         # if defined in environment
     52FORTIFY = $(%FORTIFY)                   # use value from environment
     53FORTIFY_OPT = FORTIFY=$(FORTIFY)        # set in case needed by sub-make
     54!endif
    4955!endif
    5056
     
    8187# -wcd=309      unprototyped function called indirectly
    8288
    83 # We always compile with debug info to avoid needed a full rebuild just to debug
     89# We always compile with debug info to avoid needing a full rebuild just to debug
    8490CFLAGS = -bt=os2 -mf -bm -d2 -olirs   -s -j -wx -zfp -zgp -zp4 -zq -hd
    8591
Note: See TracChangeset for help on using the changeset viewer.