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

  1. #
  2. # Makefile for xpstat.
  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. # FIXED MACROS
  28. # ------------
  29.  
  30. # OUTPUTDIR specifies the directory where all the output .OBJ
  31. # files will be created in. $(XWP_OUTPUT_ROOT) is set by
  32. # setup.in to point to \bin from the XWorkplace sources root,
  33. # but this can be modified by setting an external environment
  34. # variable. This approach has the advantage that
  35. # 1) all build files are in a common dir tree and the entire
  36. #    tree can be removed completely;
  37. # 2) the build tree can be on a different physical drive for
  38. #    speed.
  39. OUTPUTDIR = $(XWP_OUTPUT_ROOT)\exe_mt
  40. MODULESDIR = $(XWP_OUTPUT_ROOT)\modules
  41.  
  42. !if [@md $(OUTPUTDIR) 2> NUL]
  43. !endif
  44. !if [@md $(MODULESDIR) 2> NUL]
  45. !endif
  46.  
  47. .SUFFIXES: .c .obj .dll .h .ih .rc .res
  48.  
  49. HLPINC = $(HELPERS_BASE)\include\helpers
  50.  
  51. HEADERS = $(HLPINC)\eah.h $(HLPINC)\dosh.h $(HLPINC)\winh.h
  52.  
  53. ALL_OBJ1 = $(OUTPUTDIR)\xpstat.obj $(OUTPUTDIR)\helpers.lib $(HELPERS_BASE)\src\helpers\pmprintf.lib
  54.  
  55. CURRENT_DIR = $(MAKEDIR)
  56.  
  57. # TARGETS
  58. # -------
  59.  
  60. all: helpers_exe_mt $(XWPRUNNING)\bin\xpstat.exe
  61.     @echo ----- Leaving $(MAKEDIR)
  62.  
  63. $(OUTPUTDIR)\xpstat.obj: $(@B).c $(@B).h \
  64.     $(HLPINC)\comctl.h $(HLPINC)\cnrh.h $(HLPINC)\gpih.h $(HLPINC)\linklist.h \
  65.         $(HLPINC)\memdebug.h $(HLPINC)\procstat.h $(HLPINC)\dosh.h $(HLPINC)\stringh.h \
  66.         $(HLPINC)\textview.h $(HLPINC)\winh.h \
  67.     ..\..\include\dlgids.h
  68.         $(CC_EXE_MT) /Fo$(OUTPUTDIR)\$(@B).obj $(@B).c
  69.  
  70. helpers_exe_mt:
  71.     @echo $(MAKEDIR)\makefile: Going for src\helpers (EXE MT version)
  72.     @cd $(HELPERS_BASE)\src\helpers
  73.     @nmake -nologo all "MAINMAKERUNNING=YES" $(SUBMAKE_PASS_STRING) \
  74. "HELPERS_OUTPUT_DIR=$(XWP_OUTPUT_ROOT)\exe_mt" "CC_HELPERS=$(CC_HELPERS_EXE_MT)"
  75.     @cd $(CURRENT_DIR)
  76.  
  77. $(OUTPUTDIR)\helpers.lib: helpers_exe_mt
  78.  
  79. # build targets
  80. xpstat.def: ..\..\include\bldlevel.h makefile
  81.     $(RUN_BLDLEVEL) $*.def ..\..\include\bldlevel.h "$(XWPNAME) process status utility"
  82.  
  83. $(OUTPUTDIR)\xpstat.res: $(@B).rc *.ico
  84.     $(RC) -r $(@B).rc $(OUTPUTDIR)\$(@B).res
  85.  
  86. $(MODULESDIR)\xpstat.exe: $(ALL_OBJ1) $(@B).def $(OUTPUTDIR)\$(@B).res makefile
  87.     $(LINK) /out:$(MODULESDIR)\$(@B).exe $(ALL_OBJ1) $(@B).def
  88.     $(RC) $(OUTPUTDIR)\$(@B).res $(MODULESDIR)\$(@B).exe
  89.  
  90. # main target
  91. $(XWPRUNNING)\bin\xpstat.exe: $(MODULESDIR)\$(@B).exe
  92.     cmd.exe /c copy $(MODULESDIR)\$(@B).exe $(XWPRUNNING)\bin
  93.  
  94.  
  95.