| 1 | # makefile_post.mk - common makefile suffix settings for all makefiles
 | 
|---|
| 2 | # $Id: makefile_post.mk 1396 2009-02-08 13:48:46Z gyoung $
 | 
|---|
| 3 | 
 | 
|---|
| 4 | # 16 Aug 05 SHL Clean up
 | 
|---|
| 5 | # 16 Apr 06 SHL Add lxlite target
 | 
|---|
| 6 | # 02 Jun 07 SHL Convert to OpenWatcom
 | 
|---|
| 7 | # 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
 | 
|---|
| 9 | # 18 Nov 08 JBS Ticket 297: Various build improvements/corrections
 | 
|---|
| 10 | # 19 Nov 08 JBS Ticket 297: Removed bldlevel calls
 | 
|---|
| 11 | 
 | 
|---|
| 12 | !ifndef MAKERES
 | 
|---|
| 13 | 
 | 
|---|
| 14 | # Build executable
 | 
|---|
| 15 | # Common parameters go in .lrf
 | 
|---|
| 16 | # Executable specific paramters go in .def
 | 
|---|
| 17 | 
 | 
|---|
| 18 | $(BASE).exe: $(BASE).lrf $(BASE).obj $(BASE).res $(BASE).def .explicit
 | 
|---|
| 19 |   $(LINK) @$(BASE).lrf @$(BASE).def
 | 
|---|
| 20 |   @echo.
 | 
|---|
| 21 |   @echo Compiling resource: $@
 | 
|---|
| 22 |   @echo.
 | 
|---|
| 23 |   $(RC) $(RCFLAGS2) $(BASE).res $@
 | 
|---|
| 24 | 
 | 
|---|
| 25 | $(BASE).lrf: $(__MAKEFILES__) .explicit
 | 
|---|
| 26 |    @%write $^@ $(LFLAGS)
 | 
|---|
| 27 |    @%append $^@ name $(BASE)
 | 
|---|
| 28 |    @%append $^@ file $(BASE).obj
 | 
|---|
| 29 | !ifdef %EXCEPTQ
 | 
|---|
| 30 |     @%append $^@ file exceptq.lib
 | 
|---|
| 31 | !endif
 | 
|---|
| 32 |    @%append $^@ library dll\fm3dll.lib
 | 
|---|
| 33 |    @%append $^@ library os2386.lib
 | 
|---|
| 34 | 
 | 
|---|
| 35 | $(BASE).sym: $(BASE).map
 | 
|---|
| 36 |    @echo Processing: $?
 | 
|---|
| 37 |    -perl debugtools\mapsymw.pl $?
 | 
|---|
| 38 | 
 | 
|---|
| 39 | !else
 | 
|---|
| 40 | 
 | 
|---|
| 41 | # Replace resources
 | 
|---|
| 42 | $(BASE).exe: $(BASE).res .explicit
 | 
|---|
| 43 |   @if not exist $@ echo $@ missing
 | 
|---|
| 44 | !ifndef DEBUG
 | 
|---|
| 45 |      lxlite $@ /x+ /b-
 | 
|---|
| 46 |      lxlite $@ /c:minstub
 | 
|---|
| 47 | !endif
 | 
|---|
| 48 |   @echo.
 | 
|---|
| 49 |   @echo Compiling resource: $@
 | 
|---|
| 50 |   @echo.
 | 
|---|
| 51 |   $(RC) $(RCFLAGS2) $(BASE).res $@
 | 
|---|
| 52 | !ifndef DEBUG
 | 
|---|
| 53 |   lxlite $@ /x- /b-
 | 
|---|
| 54 | !endif
 | 
|---|
| 55 | 
 | 
|---|
| 56 | !endif
 | 
|---|
| 57 | 
 | 
|---|
| 58 | lxlite:: $(BASE).exe .symbolic .explicit
 | 
|---|
| 59 | !ifndef DEBUG
 | 
|---|
| 60 |   lxlite /x- /b- $?
 | 
|---|
| 61 | !endif
 | 
|---|
| 62 | 
 | 
|---|
| 63 | clean:: .symbolic .explicit
 | 
|---|
| 64 |   -del $(BASE).exe
 | 
|---|
| 65 |   -del $(BASE).lrf
 | 
|---|
| 66 |   -del $(BASE).map
 | 
|---|
| 67 |   -del $(BASE).obj
 | 
|---|
| 68 |   -del $(BASE).res
 | 
|---|
| 69 | 
 | 
|---|
| 70 | # The end
 | 
|---|