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

  1. #***************************************************************************
  2. #
  3. #  File Name   : PUSHBTN.MAK
  4. #
  5. #  Description : Makefile for the Push Button Part OpenDoc part handler class
  6. #
  7. #  Notes       : This makefile should be run from 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. #  Entry Points: N/A
  17. #
  18. #       (C) COPYRIGHT International Business Machines Corp. 1995
  19. #       All Rights Reserved
  20. #       Licensed Materials - Property of IBM
  21. #
  22. #       US Government Users Restricted Rights - Use, duplication or
  23. #       disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  24. #
  25. #       DISCLAIMER OF WARRANTIES.  The following [enclosed] code is
  26. #       sample code created by IBM Corporation. This sample code is not
  27. #       part of any standard or IBM product and is provided to you solely
  28. #       for the purpose of assisting you in the development of your
  29. #       applications.  The code is provided "AS IS", without
  30. #       warranty of any kind.  IBM shall not be liable for any damages
  31. #       arising out of your use of the sample code, even if they have been
  32. #       advised of the possibility of such damages.
  33. #
  34. #***************************************************************************
  35.  
  36. #===========================================================================
  37. #  MACRO DEFINITIONS
  38. #===========================================================================
  39.  
  40. PARENT   = cntnrprt
  41. FILENAME = pushbtn
  42.  
  43. DEBUG    = /Ti-
  44. #DEBUG   = /Ti+
  45.  
  46. BASEPATH    = ..\..\..\..
  47. BETAPATH    = $(BASEPATH)\BETA
  48. PUBLIC      = ..\public
  49. BETAPUBLIC  = $(BETAPATH)\samples\opendoc\parts\public
  50. INCLUDEPATH = .;$(PUBLIC);$(BETAPUBLIC)
  51.  
  52. #---------------------------------------------------------------------------
  53. #  XHLIST    is the list of .XH  files that need to be generated from the
  54. #            .IDL file.
  55. #  OBJLIST   is the list of .OBJ files that will be linked with your .DLL file.
  56. #  PARENTLIB is the list of .LIB files generated by your parent that will be
  57. #            linked with your .DLL file.
  58. #  Note:     You must comment out the definition of PARENTLIB macro if you are
  59. #            subclassing from ODPart class.  This means that no parent's
  60. #            library file will be link with your .DLL file.
  61. #---------------------------------------------------------------------------
  62.  
  63. XHLIST  = $(BETAPUBLIC)\$(PARENT).xh $(FILENAME).xh
  64.  
  65. OBJLIST = $(FILENAME).obj
  66.  
  67. PARENTLIB = $(BETAPUBLIC)\$(PARENT).lib
  68.  
  69. #===========================================================================
  70. #  PSEUDOTARGETS:
  71. #===========================================================================
  72.  
  73. all: $(XHLIST) $(FILENAME).dll $(FILENAME).lib
  74.  
  75. .SUFFIXES:
  76. .SUFFIXES: .idl .xh .cpp .hpp .rc .c .lib .dll .obj
  77.  
  78. #===========================================================================
  79. #  INFERENCE RULES:
  80. #===========================================================================
  81.  
  82. .idl.xh:
  83.    sc -D _PLATFORM_OS2_ -I$(PUBLIC) -I$(BETAPUBLIC) "-sxh;xih;def" -S70000 -p $(@B).idl
  84.  
  85. .idl.cpp:
  86.    sc -D _PLATFORM_OS2_ -I$(PUBLIC) -I$(BETAPUBLIC) "-sxh;xih;xc" -S70000 -p $(@B).idl
  87.  
  88. .cpp.obj:
  89.    icc.exe /Gm+ /Ge- /Tl- /Fd /Gd+ /I$(INCLUDEPATH) /Sp4 /Q /Fi /Si $(DEBUG) /N30 /C %s
  90.  
  91. #===========================================================================
  92. #  DESCRIPTION BLOCKS (TARGETS):
  93. #  Each .OBJ file should have its own description block with the right
  94. #  dependent(s).
  95. #===========================================================================
  96.  
  97. $(BETAPUBLIC)\$(PARENT).xh:
  98.    @echo **************************************************  & \
  99.     echo Cannot find $@  & \
  100.     echo **************************************************  & \
  101.     echo ****                                          ****  & \
  102.     echo ***   You need to make $(PARENT) before you     *** & \
  103.     echo ***          can build this sample             ***  & \
  104.     echo ****                                          ****  & \
  105.     echo **************************************************  & \
  106.     exit
  107.  
  108. $(FILENAME).obj: $*.cpp $*.hpp
  109.  
  110. $(FILENAME).res: $*.rc  $*.hpp $*.bmp
  111.    rc -r -I $(PUBLIC) $(FILENAME).rc $@
  112.  
  113. $(FILENAME).dll: \
  114.    $(OBJLIST) \
  115.    $*.res \
  116.    $(PARENTLIB) \
  117.    $(FILENAME).def
  118.    icc.exe @<<
  119. /Tl- /Fd /Ge- /Gd+ /Sp4 /Q /Fi /Si
  120.  /N30 $(DEBUG)
  121.  /B" /de /pmtype:pm /nologo /nod /noi /noe /map"
  122.  /Fe$*.dll
  123.  /Fm$*.map
  124.  $(OBJLIST)
  125.  somtk.lib
  126.  os2386.lib
  127.  os2cmbsi.lib
  128.  opendoc.lib
  129.  $(PARENTLIB)
  130.  $(FILENAME).def
  131. <<
  132.    rc $*.res $*.dll
  133.  
  134. $(FILENAME).lib: $(FILENAME).dll
  135.    @echo IMPLIB::Import library contruction
  136.    IMPLIB /NOLOGO $(FILENAME).lib $(FILENAME).dll
  137.  
  138. #---------------------------------------------------------------------------
  139. #  Remove build output
  140. #---------------------------------------------------------------------------
  141. CLEANUP:
  142.    @echo ***************************************************** & \
  143.     echo **  Cleaning Push Button part sample build output  ** & \
  144.     echo *****************************************************
  145.    -del *.def *.x* *.dll *.map *.obj *.res *.lib >nul 2>&1
  146.    -if exist CSET2PRE del CSET2PRE /n >nul 2>&1 & rd CSET2PRE >nul 2>&1
  147.