home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / odtlktv4.zip / ODTLKT / TOOLKIT / BETA / SAMPLES / OPENDOC / PUBUTILS / PUBUTILS.MAK < prev    next >
Text File  |  1995-12-15  |  5KB  |  107 lines

  1. #***********************************************************************
  2. #
  3. #  File Name  :  PUBUTILS.MAK
  4. #
  5. #  Description:  Makefile for the OpenDoc Public Utilities Library.
  6. #
  7. #  Notes      :  This makefile should be run in this sample's subdirectory.
  8. #
  9. #                Regarding the DEBUG macro statements:
  10. #                The file is shipped so that the build will not produce
  11. #                debug information ("DEBUG = /Ti-" is uncommented and
  12. #                "DEBUG = /T+" is commented out).  If you prefer to build
  13. #                with debug information, comment out the first DEBUG macro
  14. #                and uncomment the second one.
  15. #
  16. #      (C) COPYRIGHT International Business Machines Corp. 1995
  17. #      All Rights Reserved
  18. #      Licensed Materials - Property of IBM
  19. #
  20. #      US Government Users Restricted Rights - Use, duplication or
  21. #      disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  22. #
  23. #      DISCLAIMER OF WARRANTIES.  The following [enclosed] code is
  24. #      sample code created by IBM Corporation. This sample code is not
  25. #      part of any standard or IBM product and is provided to you solely
  26. #      for the purpose of assisting you in the development of your
  27. #      applications.  The code is provided "AS IS", without
  28. #      warranty of any kind.  IBM shall not be liable for any damages
  29. #      arising out of your use of the sample code, even if they have
  30. #      been advised of the possibility of such damages.
  31. #
  32. #***********************************************************************
  33.  
  34. #===========================================================================
  35. #  MACROS DEFINITION
  36. #===========================================================================
  37.  
  38. FILENAME = pubutils
  39.  
  40. DEBUG = /Ti-
  41. # DEBUG = /Ti+
  42.  
  43. #---------------------------------------------------------------------------
  44. # OBJLIST is the list of .OBJ files that will be linked with the .LIB file.
  45. #---------------------------------------------------------------------------
  46. OBJLIST = altpoint.obj altpoly.obj except.obj focuslib.obj \
  47.           lineops.obj oddebug.obj odutils.obj tempobj.obj
  48.  
  49. #===========================================================================
  50. #  PSEUDOTARGETS:
  51. #===========================================================================
  52.  
  53. .all: $(FILENAME).lib
  54.  
  55. .SUFFIXES: .cpp .obj
  56.  
  57. .cpp.obj:
  58.       @echo WF::COMPILE::C Set ++ Compile
  59.       icc.exe /Gm+ /Ge- /Tl- /Fd /Gd+ /Sp4 /Q /Fi /Si $(DEBUG) /N30 /C %s
  60.  
  61. altpoint.obj: altpoint.cpp altpoint.h except.h oddebug.h lineops.h
  62.  
  63. altpoly.obj: altpoly.cpp altpoint.h altpoly.h except.h oddebug.h lineops.h
  64.  
  65. except.obj: except.cpp except.h errstrs.h
  66.  
  67. focuslib.obj: focuslib.cpp focuslib.h
  68.  
  69. lineops.obj: lineops.cpp lineops.h altpoint.h except.h oddebug.h
  70.  
  71. oddebug.obj: oddebug.cpp oddebug.h except.h
  72.  
  73. odutils.obj: odutils.cpp odutils.h except.h oddebug.h
  74.  
  75. tempobj.obj: tempobj.cpp tempobj.h oddebug.h
  76.  
  77. #-----------------------------------------------------------------------------
  78. # The following rule builds the file that contains the error code string
  79. # representation in sort order.
  80. #-----------------------------------------------------------------------------
  81. errstrs.h: ..\..\..\..\h\errordef.xh
  82.     @echo /**/                       > $(TMP)\parseerr.cmd
  83.     @echo parse upper arg errfile .   >>$(TMP)\parseerr.cmd
  84.     @echo do while lines(errfile) ^> 0 >>$(TMP)\parseerr.cmd
  85.     @echo   line = linein(errfile)     >>$(TMP)\parseerr.cmd
  86.     @echo   parse var line a b c .     >>$(TMP)\parseerr.cmd
  87.     @echo   if (a = '#define' ^& substr(b,1,6) = 'kODErr') then   >>$(TMP)\parseerr.cmd
  88.     @echo     call lineout , '{'^|^|format(c,6)^|^|', "'||b||'"},'>>$(TMP)\parseerr.cmd
  89.     @echo end                                             >>$(TMP)\parseerr.cmd
  90.     @echo /*                                              > $@
  91.     @echo  * This is a machine generated file.  The routine     >>$@
  92.     @echo  * that uses the array declared in this file requires >>$@
  93.     @echo  * that the array members be maintained in sort order >>$@
  94.     @echo  * by error code.                                     >>$@
  95.     @echo  */                                                   >>$@
  96.     @echo struct ODErrorString {                                >>$@
  97.     @echo    ODError err;                                       >>$@
  98.     @echo    const char* str;                                   >>$@
  99.     @echo };                                                    >>$@
  100.     @echo static const ODErrorString ErrorStrings[] = {         >>$@
  101.     $(TMP)\parseerr   $** | sort                                >>$@
  102.     @echo };                                                    >>$@
  103.     @del $(TMP)\parseerr.cmd
  104.  
  105. $(FILENAME).lib: $(OBJLIST)
  106.       !lib $@ -+$?;
  107.