home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / cset21v5.zip / TOOLKT21 / CPLUS / SAMPLES / WPCAR / CARPP.MAK < prev    next >
Makefile  |  1993-05-06  |  3KB  |  113 lines

  1. #****************************************************************************
  2. #
  3. #  Work Place Shell Sample makefile
  4. #
  5. #  Copyright (C) 1992 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. #****************************************************************************
  17.  
  18. #!include ..\ibmsamp.inc
  19.  
  20. LFLAGS   = /NOE /NOD /ALIGN:16 /EXEPACK /M /BASE:0x10000
  21. LINK    = LINK386  $(LFLAGS)
  22. LIBS    = DDE4MBS + OS2386
  23. STLIBS  = DDE4SBS + OS2386
  24. MTLIBS  = DDE4MBS + os2386
  25. DLLLIBS = DDE4NBS + os2386
  26. VLIBS   = DDE4SBS + vdh + os2386
  27.  
  28.  
  29. #****************************************************************************
  30. #  Dot directive definition area (usually just suffixes)
  31. #****************************************************************************
  32.  
  33. .SUFFIXES:
  34. .SUFFIXES: .cpp .obj .dll .csc .sc .xh .xih .xph .psc .rc .res .def
  35.  
  36. #****************************************************************************
  37. #  Environment Setup for the component(s).
  38. #****************************************************************************
  39.  
  40. SOMTEMP = .\somtemp
  41. SCPATH  = ..\..\..\sc
  42. HPATH   = ..\..\os2h
  43. LIBPATH = ..\..\..\os2lib
  44.  
  45. !if [set SMINCLUDE=.;$(HPATH);$(SCPATH);] || \
  46.     [set SMTMP=$(SOMTEMP)] || \
  47.     [set SMEMIT=xih;xh;psc;sc;xc;def]
  48. !endif
  49.  
  50. !if [cd $(SOMTEMP)]
  51. !  if [md $(SOMTEMP)]
  52. !    error error creating $(SOMTEMP) directory
  53. !  endif
  54. !else
  55. !  if [cd ..]
  56. !    error - Couldn't cd .. from $(SOMTEMP) directory
  57. !  endif
  58. !endif
  59.  
  60. #
  61. # Compiler/tools Macros
  62. #
  63.  
  64. CPP     = icc /Ge-
  65. LINK    = LINK386
  66. LDFLAGS = /noi /map /nol /nod /exepack /packcode /packdata /align:16
  67. DLLLIBS = $(DLLLIBS) som.lib
  68.  
  69. #****************************************************************************
  70. # Set up Macros that will contain all the different dependencies for the
  71. # executables and dlls etc. that are generated.
  72. #****************************************************************************
  73.  
  74. OBJS = carpp.obj horn.obj brake.obj rpm.obj
  75.  
  76. #****************************************************************************
  77. #   Setup the inference rules for compiling source code to
  78. #   object code.
  79. #****************************************************************************
  80.  
  81. .cpp.obj:
  82.         $(CPP) -I$(HPATH) -c $<
  83.  
  84. # Remove pound signs to have CSC recompile
  85. .csc.xih:
  86.         sc -v -r  $*.csc
  87.  
  88. all: carpp.dll
  89.  
  90. #
  91. # Specific Process Tag
  92. #
  93.  
  94. horn.obj: $$(@B).cpp $$(@B).h carpp.xih
  95.  
  96. brake.obj: $$(@B).cpp $$(@B).h carpp.xih
  97.  
  98. rpm.obj: $$(@B).cpp $$(@B).h carpp.xih
  99.  
  100. carpp.xih:   $$(@B).csc $(HPATH)\wpdataf.xh
  101.  
  102. carpp.def:   $$(@B).csc
  103.  
  104. carpp.obj: $$(@B).cpp $$(@B).xih $$(@B).xh  $$(@B).sc $(HPATH)\wpdataf.xh horn.h brake.h rpm.h
  105.  
  106. carpp.dll: $$(@B).def $(OBJS) carpp.res
  107.          $(LINK) $(LDFLAGS) $(OBJS),$@,,$(DLLLIBS),$*;
  108.          rc -p -x $*.res $*.dll
  109.          mapsym carpp.map
  110.  
  111. carpp.res: $$(@B).rc $$(@B).xih
  112.          rc -r $*.rc $*.res
  113.