Changeset 1259


Ignore:
Timestamp:
Oct 26, 2008, 3:03:41 AM (17 years ago)
Author:
Steven Levine
Message:

Rework makefile dependencies to avoid target dependent build failures.
Drop support for DEBUG=0 - it does not match what our C code expects.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/internal/makefile

    r1148 r1259  
    66# 14 Jun 07 SHL Convert to OpenWatcom
    77# 27 Jun 07 SHL Support DEBUG set from command line or environment
     8# 25 Oct 08 SHL Rework dependencies to avoid target dependent build failures
    89
    910BASE=mkstr
     
    3334all: $(BASE).exe .symbolic
    3435
     36syms: $(BASE).sym .symbolic
     37
    3538$(BASE).obj: $(BASE).c .AUTODEPEND
    3639
    37 $(BASE).exe: $(BASE).obj $(BASE).lrf
     40$(BASE).exe $(BASE).map: $(BASE).obj $(BASE).lrf
    3841  $(LINK) @$(BASE).lrf
    3942  bldlevel $@
     
    5457   @%write $^@ library os2386.lib
    5558
     59lxlite: $(BASE).exe .symbolic
     60!ifndef DEBUG
     61  lxlite /x- /b- $?
     62!endif
     63
     64$(BASE).sym: $(BASE).map
     65   @echo Processing: $?
     66   -perl ..\..\debugtools\mapsymw.pl $(BASE).map
     67
    5668clean: .symbolic
    5769  -del $(BASE).exe
  • trunk/makefile

    r1133 r1259  
    2222# 22 Jul 08 SHL Change from dll\dllsyms to dll\syms target for consistency
    2323# 22 Jul 08 SHL Pass FORTIFY options to subordinate makefiles
     24# 25 Oct 08 SHL Sanitize DEBUG usage
    2425
    25 # Environment - see makefile_pre.mk
     26# Environment - see makefile_pre.mk and dll\makefile
    2627
    2728BASE = fm3
     
    7778
    7879allexe: *.mak .symbolic
    79    @for %f in ($<) do $(MAKE) -f %f $(__MAKEOPTS__) $(DEBUG_OPT) $(FORTIFY_OPT)
     80  @for %f in ($<) do $(MAKE) -f %f $(__MAKEOPTS__) $(DEBUG_OPT) $(FORTIFY_OPT)
    8081
    8182# make SYM files
    8283
    8384exesyms: *.mak .symbolic
    84    @for %f in ($<) do $(MAKE) -f %f $(__MAKEOPTS__) $(DEBUG_OPT) $(FORTIFY_OPT) sym
     85  @for %f in ($<) do $(MAKE) -f %f $(__MAKEOPTS__) $(DEBUG_OPT) $(FORTIFY_OPT) sym
    8586
    8687# make WPI files
    8788
    8889wpi: .symbolic
    89    cd warpin
    90    $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT) $(WARPIN_OPTS)
    91    cd ..
     90  cd warpin
     91  $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT) $(WARPIN_OPTS)
     92  cd ..
    9293
    9394lxlite:: lxlitedll lxliteexe .symbolic
     
    9697# Apply to each *.mak for other exes
    9798lxliteexe: *.mak .symbolic
    98 !ifdef DEBUG
    99 !  ifeq DEBUG 0
    100      @for %f in ($<) do $(MAKE) -f %f $(__MAKEOPTS__) $(DEBUG_OPT) $(FORTIFY_OPT) lxlite
    101 !  endif
    102 !else
    103      @for %f in ($<) do $(MAKE) -f %f $(__MAKEOPTS__) $(DEBUG_OPT) $(FORTIFY_OPT) lxlite
     99!ifndef DEBUG
     100  @for %f in ($<) do $(MAKE) -f %f $(__MAKEOPTS__) $(DEBUG_OPT) $(FORTIFY_OPT) lxlite
    104101!endif
    105102
    106103# Apply to dlls
    107104lxlitedll: .symbolic
     105!ifndef DEBUG
    108106  cd dll
    109 !ifdef DEBUG
    110 !  ifeq DEBUG 0
    111       $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT) $(FORTIFY_OPT) lxlite
    112 #     $(MAKE) $(DEBUG_OPT) $(FORTIFY_OPT) lxlite
    113 !  endif
    114 !else
    115    $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT) $(FORTIFY_OPT) lxlite
    116 #  $(MAKE) $(DEBUG_OPT) $(FORTIFY_OPT) lxlite
     107  $(MAKE) $(__MAKEOPTS__) $(DEBUG_OPT) $(FORTIFY_OPT) lxlite
     108  cd ..
    117109!endif
    118   cd ..
    119110
    120111cleanobj: .symbolic
  • trunk/makefile_post.mk

    r987 r1259  
    66# 02 Jun 07 SHL Convert to OpenWatcom
    77# 23 Feb 08 JBS Add support for building SYM files (Ticket 226)
     8# 25 Oct 08 JBS Rework DEBUG usage to match what C code expects
    89
    910!ifndef MAKERES
     
    3738$(BASE).exe: $(BASE).res .explicit
    3839  @if not exist $@ echo $@ missing
    39 !ifdef DEBUG
    40 !  ifeq DEBUG 0
    41      lxlite $@ /x+ /b-
    42      lxlite $@ /c:minstub
    43 !  endif
    44 !else
     40!ifndef DEBUG
    4541     lxlite $@ /x+ /b-
    4642     lxlite $@ /c:minstub
    4743!endif
    4844  $(RC) $(RCFLAGS2) $(BASE).res $@
    49 !ifdef DEBUG
    50 !  ifeq DEBUG 0
    51      lxlite $@ /x- /b-
    52 !  endif
    53 !else
     45!ifndef DEBUG
    5446  lxlite $@ /x- /b-
    5547!endif
     
    5951
    6052lxlite:: $(BASE).exe .symbolic .explicit
    61 !ifdef DEBUG
    62 !  ifeq DEBUG 0
    63      lxlite /x- /b- $?
    64 !  endif
    65 !else
     53!ifndef DEBUG
    6654  lxlite /x- /b- $?
    6755!endif
  • trunk/makefile_pre.mk

    r1133 r1259  
    1414# 27 May 08 SHL Add WARNALL and FORTIFY support
    1515# 22 Jul 08 SHL Pass FORTIFY to subordinate makefiles
     16# 06 Oct 08 SHL Pass DEBUG in CFLAGS; clean up USE_RC usage
     17
     18# Environment: see dll\makefile
     19
     20# DEBUG - not defined = release build, defined = debug build
     21# WARNALL - add more warnings if defined
     22# FORTIFY - build with FORTIFYed memory
     23# USE_RC - build with rc.exe if defined, other build with wrc.exe
    1624
    1725CC = wcc386
     
    2129!ifdef %USE_RC                  # if defined in environment
    2230USE_RC = $(%USE_RC)
    23 !else
    24 USE_RC = 0
    2531!endif
    2632!endif
    2733
    28 !if $(USE_RC)
     34!ifdef USE_RC
    2935RC = rc
    3036!else
     
    102108LFLAGS = sys os2v2_pm op quiet op verbose op cache op caseexact op map
    103109!ifdef DEBUG
     110CFLAGS += -d$DEBUG_OPT
    104111LFLAGS += debug dwarf all
    105112!endif
    106113
    107114# rc Includes can be in current director or dll subdirectory
    108 !if $(USE_RC)
     115!ifdef USE_RC
    109116RCFLAGS = -r -i dll
    110117RCFLAGS2 = -x2
     
    119126.SUFFIXES: .obj .c .res .rc .ipf .sym .map
    120127
    121 !if $(USE_RC)
     128!ifdef USE_RC
    122129.rc.res:
    123130   $(RC) $(RCFLAGS) $*.rc
Note: See TracChangeset for help on using the changeset viewer.