home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / xwplascr.zip / XWPL0208.ZIP / src / Treesize / makefile next >
Makefile  |  2002-02-26  |  4KB  |  107 lines

  1. #
  2. # Makefile for TREESIZE.EXE.
  3. #
  4. # For use with IBM NMAKE, which is part of IBM C-Set/2 and VisualAge C++.
  5. # This file will probably not work with other MAKE utilities, such as
  6. # GNU make or DMAKE.
  7. #
  8. #       Copyright (C) 1998-2002 Ulrich Möller.
  9. #       This file is part of the XWorkplace source package.
  10. #       XWorkplace is free software; you can redistribute it and/or modify
  11. #       it under the terms of the GNU General Public License as published
  12. #       by the Free Software Foundation, in version 2 as it comes in the
  13. #       "COPYING" file of the XWorkplace main distribution.
  14. #       This program is distributed in the hope that it will be useful,
  15. #       but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. #       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  17. #       GNU General Public License for more details.
  18. #
  19.  
  20. # Say hello to yourself.
  21. !if [@echo +++++ Entering $(MAKEDIR)]
  22. !endif
  23.  
  24. # include setup (compiler options etc.)
  25. !include ..\..\setup.in
  26.  
  27. # OUTPUTDIR specifies the directory where all the output .OBJ
  28. # files will be created in. $(XWP_OUTPUT_ROOT) is set by
  29. # setup.in to point to \bin from the XWorkplace sources root,
  30. # but this can be modified by setting an external environment
  31. # variable. This approach has the advantage that
  32. # 1) all build files are in a common dir tree and the entire
  33. #    tree can be removed completely;
  34. # 2) the build tree can be on a different physical drive for
  35. #    speed.
  36. BASE_OUTPUTDIR = $(XWP_OUTPUT_ROOT)
  37. OUTPUTDIR = $(BASE_OUTPUTDIR)\exe_mt
  38. !if [@echo       OUTPUTDIR is $(OUTPUTDIR)]
  39. !endif
  40. MODULESDIR = $(BASE_OUTPUTDIR)\modules
  41.  
  42. # create output directory
  43. !if [@md $(OUTPUTDIR) 2> NUL]
  44. !endif
  45.  
  46.  
  47. # FIXED MACROS
  48. # ------------
  49.  
  50. .SUFFIXES: .c .obj .dll .h .ih .rc .res
  51.  
  52. HLPINC = $(HELPERS_BASE)\include\helpers
  53.  
  54. HEADERS = treesize.h $(HLPINC)\eah.h $(HLPINC)\dosh.h $(HLPINC)\linklist.h $(HLPINC)\memdebug.h $(HLPINC)\winh.h $(HLPINC)\xstring.h
  55.  
  56. ALL_OBJ1 = $(OUTPUTDIR)\treesize.obj $(OUTPUTDIR)\helpers.lib $(HELPERS_BASE)\src\helpers\pmprintf.lib
  57.  
  58. EXENAME = treesize
  59.  
  60. # TARGETS
  61. # -------
  62.  
  63. all: $(XWPRUNNING)\bin\$(EXENAME).exe
  64.     @echo ----- Leaving $(MAKEDIR)
  65.  
  66. # The "dep" target: run fastdep on the sources.
  67. # "nmake dep" gets called from src\makefile if nmake dep
  68. # is running on the main makefile.
  69. dep:
  70.     $(RUN_FASTDEP) *.c
  71.     @echo ----- Leaving $(MAKEDIR)
  72.  
  73. .c.{$(OUTPUTDIR)}.obj:
  74.         @echo $(MAKEDIR)\makefile [$@]: Compiling $(@B).c
  75. !ifndef PRECH
  76. # precompiled headers disabled:
  77.         $(CC_EXE_MT) /Fo$(OUTPUTDIR)\$(@B).obj $(@B).c
  78. !else
  79.         $(CC_EXE_MT) /fi"$(PRECH)\$(@B).pch" /si"$(PRECH)\$(@B).pch" /Fo$(OUTPUTDIR)\$(@B).obj $(@B).c
  80. !endif
  81.  
  82. # build targets
  83. $(EXENAME).def: ..\..\include\bldlevel.h makefile
  84.           $(RUN_BLDLEVEL) $*.def ..\..\include\bldlevel.h "$(XWPNAME) Treesize Utility"
  85.  
  86. $(OUTPUTDIR)\$(EXENAME).res: $(@B).rc *.ico
  87.           $(RC) -r $(@B).rc $(OUTPUTDIR)\$(@B).res
  88.  
  89. $(MODULESDIR)\$(EXENAME).exe: $(ALL_OBJ1) $(@B).def $(OUTPUTDIR)\$(@B).res makefile
  90.           $(LINK) /out:$(MODULESDIR)\$(@B).exe $(ALL_OBJ1) $(@B).def
  91.           $(RC) $(OUTPUTDIR)\$(@B).res $(MODULESDIR)\$(@B).exe
  92.  
  93. # main target
  94. $(XWPRUNNING)\bin\$(EXENAME).exe: $(MODULESDIR)\$(@B).exe
  95.           cmd.exe /c copy $(MODULESDIR)\$(@B).exe $(XWPRUNNING)\bin
  96.  
  97. # The .OBJ-from-sources dependencies are now automatically
  98. # created by "nmake dep" into the .depend include file.
  99. # V0.9.12 (2001-05-22) [umoeller]
  100.  
  101. !ifndef NOINCLUDEDEPEND
  102. !include .depend
  103. !endif
  104.  
  105.  
  106.  
  107.