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

  1. #
  2. # Makefile for XIMGVIEW.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.
  29. OUTPUTDIR = $(XWP_OUTPUT_ROOT)\exe_mt
  30. MODULESDIR = $(XWP_OUTPUT_ROOT)\modules
  31.  
  32. # create output directory
  33. !if [@md $(OUTPUTDIR) 2> NUL]
  34. !endif
  35. !if [@md $(MODULESDIR) 2> NUL]
  36. !endif
  37.  
  38. # FIXED MACROS
  39. # ------------
  40.  
  41. .SUFFIXES: .c .obj .dll .h .ih .rc .res
  42.  
  43. HLPINC = $(HELPERS_BASE)\include\helpers
  44.  
  45. HEADERS = ximgview.h $(HLPINC)\eah.h $(HLPINC)\dosh.h $(HLPINC)\linklist.h $(HLPINC)\memdebug.h $(HLPINC)\winh.h $(HLPINC)\xstring.h
  46.  
  47. ALL_OBJ1 = $(OUTPUTDIR)\ximgview.obj $(OUTPUTDIR)\helpers.lib $(HELPERS_BASE)\src\helpers\pmprintf.lib
  48.  
  49. MYDIR = $(MAKEDIR)
  50.  
  51. # TARGETS
  52. # -------
  53.  
  54. all: helpers $(XWPRUNNING)\bin\ximgview.exe
  55.     @echo ----- Leaving $(MAKEDIR)
  56.  
  57. helpers:
  58.     @cd ..\..
  59.     @nmake -nologo helpers
  60.     cd $(MYDIR)
  61.  
  62. $(OUTPUTDIR)\ximgview.obj: $(@B).c $(HEADERS) ..\..\include\bldlevel.h
  63.           $(CC_EXE_MT) /Fo$(OUTPUTDIR)\$(@B).obj $(@B).c
  64.  
  65. # build targets
  66. ximgview.def: ..\..\include\bldlevel.h makefile
  67.           $(RUN_BLDLEVEL) $*.def ..\..\include\bldlevel.h "$(XWPNAME) image viewer"
  68.  
  69. $(OUTPUTDIR)\ximgview.res: $(@B).rc *.ico
  70.           $(RC) -r $(@B).rc $(OUTPUTDIR)\$(@B).res
  71.  
  72. $(MODULESDIR)\ximgview.exe: $(ALL_OBJ1) $(@B).def $(OUTPUTDIR)\$(@B).res makefile
  73.           $(LINK) /out:$(MODULESDIR)\$(@B).exe $(ALL_OBJ1) mmpm2.lib $(@B).def
  74.           $(RC) $(OUTPUTDIR)\$(@B).res $(MODULESDIR)\$(@B).exe
  75.  
  76. # main target
  77. $(XWPRUNNING)\bin\ximgview.exe: $(MODULESDIR)\ximgview.exe
  78.           cmd.exe /c copy $(MODULESDIR)\$(@B).exe $(XWPRUNNING)\bin
  79.  
  80.  
  81.