home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / primcuts.zip / FrameWindowTricks / makefile < prev    next >
Makefile  |  2000-06-30  |  2KB  |  90 lines

  1. .SUFFIXES:
  2. .SUFFIXES: .c .rc .obj .h .exe .res
  3.  
  4. .SILENT:
  5.  
  6. BASENAME=FrameWindowTricks
  7.  
  8. BACKUP_FILES = *.c *.h *.rc *.ico makefile *.def
  9.  
  10.  
  11. all: $(BASENAME).exe
  12.  
  13. OBJS = $(BASENAME).obj \
  14. ClientWindow.obj \
  15. StatusBarWindow.obj
  16.  
  17.  
  18. # terminal - launch debug terminal, include debug code
  19. # yes - include debug code
  20. # no - no debug code, no debug terminal
  21. !IFNDEF DEBUG
  22. DEBUG = no
  23. !ENDIF
  24.  
  25. release:
  26.    nmake -nologo DEBUG=no
  27.  
  28. debug:
  29.    nmake -nologo DEBUG=yes
  30.  
  31. debugterm:
  32.    nmake -nologo DEBUG=terminal
  33.  
  34.  
  35. clean:
  36.    del *.obj
  37.    del *.exe
  38.    del *.res
  39.    del *.map
  40.    del *.sym
  41.  
  42.  
  43.  
  44. .c.obj:
  45. !IFDEF DEBUG
  46. !  IF "$(DEBUG)" == "yes"
  47.        @icc /C /Gd+ /Gm+ /Ti+ /O- /Q+ /I. /DDEBUG /Wall+ppc-ppt- %s
  48. !  ELIF "$(DEBUG)" == "terminal"
  49.        @icc /C /Gd+ /Gm+ /Ti+ /O- /Q+ /I. /DDEBUG /DDEBUG_TERM /Wall+ppc-ppt- %s
  50. !  ELSE
  51.        @icc /C /Gd+ /Gm+ /G5 /Gi+ /Gf+ /Gu+ /Ti- /O+ /Q+ /I. /Wall+ppc-ppt- %s
  52. !  ENDIF
  53. !ELSE
  54. !    ERROR Macro named DEBUG is not defined.
  55. !ENDIF
  56.  
  57. .rc.res:
  58.    rc -n -r %s $(@B).res
  59.  
  60.  
  61. $(BASENAME).obj: $(@B).c resources.h StatusbarWindow.h
  62.  
  63. ClientWindow.obj: $(@B).c resources.h StatusbarWindow.h
  64.  
  65. StatusbarWindow.obj: $(@B).c $(@B).h
  66.  
  67.  
  68. $(BASENAME).res: $(@B).rc resources.h $(BASENAME).ico
  69.  
  70.  
  71. $(BASENAME).exe: $(OBJS) $(@B).def $(@B).res
  72.    ilink /nologo @<<
  73. !if "$(DEBUG)" == "yes" || "$(DEBUG)" == "terminal"
  74.        /noinformation /exec /out:$(@B) /map:$(@B) /debug
  75. !else
  76.        /noinformation /exec /out:$(@B) /map:$(@B) /exepack:2 /nodebug /optfunc /packcode /packdata
  77. !endif
  78.       $(OBJS)
  79.       $(@B).def
  80.    <<
  81. !if "$(DEBUG)" == "yes" || "$(DEBUG)" == "terminal"
  82.    rc -n $(@B).res $@
  83. !else
  84.    rc -n -x2 $(@B).res $@
  85. !endif
  86.    dllrname /Q /R $@ cppom30=os2om30
  87.    mapsym -n $(@B).map
  88.    @detach pkzip /add /silent last_successful_build $(BACKUP_FILES)
  89.  
  90.