home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / viscobv6.zip / vac22os2 / ibmcobol / samples / toolkit / wps / carpp / carpp.mak < prev    next >
Makefile  |  1996-11-19  |  4KB  |  96 lines

  1. #****************************************************************************
  2. #
  3. #  Work Place Shell - Browse Sample makefile - SOM 2.1 / IDL version
  4. #
  5. #  Copyright (C) 1993, 1994 IBM Corporation
  6. #
  7. #      DISCLAIMER OF WARRANTIES.  The following [enclosed] code is
  8. #      sample code created by IBM Corporation. This sample code is not
  9. #      part of any standard or IBM product and is provided to you solely
  10. #      for  the purpose of assisting you in the development of your
  11. #      applications.  The code is provided "AS IS", without
  12. #      warranty of any kind.  IBM shall not be liable for any damages
  13. #      arising out of your use of the sample code, even if they have been
  14. #      advised of the possibility of such damages.
  15. #
  16. #      NOTE: you will have to modify the environment variables to suit
  17. #            your environment
  18. #
  19. #****************************************************************************
  20.  
  21. !include ..\..\ibmsamp.inc
  22.  
  23. #-------------------------------------------------------------------
  24. #
  25. #   A list of all of the object files
  26. #
  27. #-------------------------------------------------------------------
  28.  
  29. OBJS = $(OBJDIR)\carpp.obj $(OBJDIR)\horn.obj $(OBJDIR)\brake.obj $(OBJDIR)\rpm.obj
  30.  
  31. SOMTEMP = .\somtemp
  32.  
  33. !if [set SMTMP=$(SOMTEMP)] || \
  34.     [set SMEMIT=ih;h;c] || \
  35.     [set SMADDSTAR=1] || \
  36.     [set SMNOTC=1]
  37. !endif
  38.  
  39. !if [cd $(SOMTEMP)]
  40. !  if [md $(SOMTEMP)]
  41. !    error error creating $(SOMTEMP) directory
  42. !  endif
  43. !else
  44. !  if [cd ..]
  45. !    error - Couldn't cd .. from $(SOMTEMP) directory
  46. !  endif
  47. !endif
  48.  
  49. #-------------------------------------------------------------------
  50. #   This section lists all files to be built by the make.  The
  51. #   makefile builds the executible as well as its associated help
  52. #   file.
  53. #-------------------------------------------------------------------
  54. all: clean $(EXEDIR)\carpp.dll $(EXEDIR)\carpp.hlp
  55.  
  56. #-------------------------------------------------------------------
  57. #   Dependencies
  58. #     This section lists all object files needed to be built for the
  59. #     application, along with the files it is dependent upon (e.g.
  60. #     its source and any header files).
  61. #-------------------------------------------------------------------
  62. $(OBJDIR)\carpp.res: carpp.rc carpp.xih
  63.                 $(RC) $(RCFLAGS) $(@B).rc $@
  64.  
  65. $(EXEDIR)\carpp.hlp: carpp.ipf
  66.  
  67. carpp.xih:   carpp.idl
  68.    sc -r -I. -I$(R_OS2_IDL) -I$(SOM_COMP_HDR) -mnoint -mnotc -S 128000 -C 128000 -s"xih" $*.idl
  69.  
  70. carpp.def:   carpp.idl
  71.    sc -r -I. -I$(R_OS2_IDL) -I$(SOM_COMP_HDR) -mnoint -mnotc -S 128000 -C 128000 -s"def" $*.idl
  72.  
  73. carpp.xh:    carpp.idl
  74.    sc -r -I. -I$(R_OS2_IDL) -I$(SOM_COMP_HDR) -mnoint -mnotc -S 128000 -C 128000 -s"xh" $*.idl
  75.  
  76. $(OBJDIR)\horn.obj :    horn.cpp horn.h carpp.xih
  77.    $(CC) -c $(DLLCFLAGS) -I. -Fo"$(OBJDIR)\$(@B).obj" $(@B).cpp
  78.  
  79. $(OBJDIR)\brake.obj:    brake.cpp brake.h carpp.xih
  80.    $(CC) -c $(DLLCFLAGS) -I. -Fo"$(OBJDIR)\$(@B).obj" $(@B).cpp
  81.  
  82. $(OBJDIR)\rpm.obj  :    rpm.cpp rpm.h carpp.xih
  83.    $(CC) -c $(DLLCFLAGS) -I. -Fo"$(OBJDIR)\$(@B).obj" $(@B).cpp
  84.  
  85. $(OBJDIR)\carpp.obj: carpp.cpp carpp.xh carpp.xih carpp.idl horn.h brake.h rpm.h
  86.    $(CC) -c $(DLLCFLAGS) -I. -Fo"$(OBJDIR)\$(@B).obj" $(@B).cpp
  87.  
  88. $(EXEDIR)\carpp.dll: carpp.def $(OBJS) $(OBJDIR)\carpp.res
  89.    -$(CREATE_PATH)
  90.    $(LINK) $@ $(DLLCFLAGS) $(@B).def $(DLLLIBS) + $(SOMLIBS) $(OBJS)
  91.    $(RC) -p -x $(OBJDIR)\$(@B).res $@
  92.  
  93. clean:
  94.         @if exist carpp.xh  del carpp.xh
  95.         @if exist carpp.xih del carpp.xih
  96.