home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: WPS_PM / WPS_PM.zip / xfld085s.zip / 001 / xfldr001.mak < prev    next >
Makefile  |  1999-01-05  |  3KB  |  101 lines

  1. #
  2. # Makefile for XFolder National Language Support.
  3. #
  4. # A makefile contains information about how several source files
  5. # relate to each other, especially which code modules must be updated
  6. # when certain source files change.
  7. #
  8. # For use with IBM NMAKE, which is part of IBM C-Set/2 and VisualAge C++.
  9. # This file will probably not work with other MAKE utilities, such as
  10. # GNU make or DMAKE.
  11. #
  12. # This makefile assumes that certain toolkit tools are on the PATH.
  13. # In addition, you must put the "unlock" utility from the "tools"
  14. # directory on your PATH, or this will fail.
  15. #
  16. # Copyright (C) 1997-99 Ulrich Möller.
  17. # This program is free software; you can redistribute it and/or modify
  18. # it under the terms of the GNU General Public License as published by
  19. # the Free Software Foundation, in version 2 as it comes in the COPYING
  20. # file of the XFolder main distribution.
  21. # This program is distributed in the hope that it will be useful,
  22. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  23. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  24. # GNU General Public License for more details.
  25. # Required changes for translating the NLS DLL: three lines below.
  26. #
  27.  
  28. # This is the language code for the language that the NLS DLL
  29. # will support. Change this to a different language code, and
  30. # the makefile will support your langauge.
  31. LANGUAGE = 001
  32. # Change this to the directory where you installed XFolder.
  33. # The output files will automatically be copied there to.
  34. # Currently, the makefile aborts with an error if the environment
  35. # variable XFOLDERPATH is not set (it is set by ..\MAKE.CMD).
  36. # You can replace the below four lines with a fixed path like this:
  37. # XFRUNNING = G:\Tools\XFolder
  38. !ifndef XFOLDERPATH
  39. !error The environment variable XFOLDERPATH is not defined. Terminating.
  40. !endif
  41. XFRUNNING = $(XFOLDERPATH)
  42.  
  43. #
  44. # DO NOT CHANGE THE FOLLOWING
  45. #
  46.  
  47. #
  48. # Set up a few environment variables.
  49. #
  50.  
  51. CC      = icc /Ge- /Se
  52. LINK    = ilink
  53. RC      = rc -i ..
  54. OBJS = xfldr$(LANGUAGE).obj
  55. XFLDHELP = $(XFRUNNING)\help
  56.  
  57. #
  58. # Define the suffixes for files which NMAKE will work on.
  59. # .SUFFIXES is a reserved NMAKE keyword ("pseudotarget") for
  60. # defining file extensions that NMAKE will recognize.
  61. #
  62.  
  63. .SUFFIXES: .msg .txt .c .obj .dll .rc .res .html .ipf .hlp .inf
  64.  
  65. #
  66. # Now define inference rules for what to do with certain file
  67. # types, based on their file extension.
  68. # The syntax we need here is ".fromext.toext".
  69. # So whenever NMAKE encounters a .toext file, it
  70. # executes what we specify here.
  71. #
  72.  
  73. .c.obj:
  74.         $(CC) -I$(INCLUDE) -c $<
  75.  
  76. #
  77. # Now define inference rules for the different file types.
  78. #
  79.  
  80. all: xfldr$(LANGUAGE).dll $(XFLDHELP)\xfldr$(LANGUAGE).msg
  81.  
  82. $(XFLDHELP)\xfldr$(LANGUAGE).msg: xfldr$(LANGUAGE).msg
  83.         cmd.exe /c copy $(@B).msg $(XFLDHELP)
  84.  
  85. xfldr$(LANGUAGE).msg: $$(@B).txt
  86.          mkmsgf $*.txt $*.msg
  87.  
  88. xfldr$(LANGUAGE).obj: $$(@B).c
  89.  
  90. xfldr$(LANGUAGE).dll: $$(@B).def $(OBJS) $$(@B).res ..\main\dlgids.h
  91.          $(LINK) $*.def $(OBJS) /OUT:$*.dll
  92.          $(RC) -p -x2 $*.res $*.dll
  93.          unlock $(XFRUNNING)\bin\$*.dll
  94.          cmd.exe /c del $(XFRUNNING)\bin\$*.dll
  95.          cmd.exe /c copy $*.dll $(XFRUNNING)\bin
  96.  
  97. xfldr$(LANGUAGE).res: $$(@B).rc $$(@B).dlg *.bmp *.ico ..\main\dlgids.h
  98.          $(RC) -r -x2 $*.rc $*.res
  99.  
  100.  
  101.