home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / VSCPPv8.zip / VACPP / IBMCPP / samples / TOOLKIT / WPS / CAR / CAR.MAK < prev    next >
Text File  |  1995-03-22  |  3KB  |  118 lines

  1. #****************************************************************************
  2. #
  3. #  Work Place Shell - Car Sample makefile - SOM 2.0 / IDL version
  4. #
  5. #  Copyright (C) 1992, 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. #  Dot directive definition area (usually just suffixes)
  25. #****************************************************************************
  26.  
  27. .SUFFIXES:
  28. .SUFFIXES: .c .obj .dll .idl .h .ih .rc .res
  29.  
  30. #****************************************************************************
  31. #  Environment Setup for the component(s).
  32. #****************************************************************************
  33.  
  34. SOMTEMP = .\somtemp
  35.  
  36. !if [set SMTMP=$(SOMTEMP)] || \
  37.     [set SMEMIT=ih;h;c] || \
  38.     [set SMADDSTAR=1] || \
  39.     [set SMNOTC=1]
  40. !endif
  41.  
  42. !if [cd $(SOMTEMP)]
  43. !  if [md $(SOMTEMP)]
  44. !    error error creating $(SOMTEMP) directory
  45. !  endif
  46. !else
  47. !  if [cd ..]
  48. !    error - Couldn't cd .. from $(SOMTEMP) directory
  49. !  endif
  50. !endif
  51.  
  52. #
  53. # Compiler/tools Macros
  54. #
  55.  
  56. CC      = $(CC) /Ge-
  57. LINK    = ILINK
  58. LDFLAGS = /nofree /noi /map /nol /nod /exepack /packcode /packdata /align:16
  59. DLLLIBS    = $(DLLLIBS) somtk.lib
  60.  
  61. !ifdef DEBUG
  62. LISTING  = $(CC) /Le /Li /Ls /Fc
  63. ERRLEVEL = /W3 /Ka /Kg /Kp /Kr
  64. CC       = $(CC) /Ti /DDEBUG
  65. LDFLAGS  = $(LDFLAGS) /MAP /CODEVIEW
  66. !endif
  67.  
  68. #****************************************************************************
  69. # Set up Macros that will contain all the different dependencies for the
  70. # executables and dlls etc. that are generated.
  71. #****************************************************************************
  72.  
  73. OBJS = car.obj
  74. !ifdef INCL_INT3
  75. OBJS = $(OBJS) int3.obj
  76. !endif
  77.  
  78. #****************************************************************************
  79. #   Setup the inference rules for compiling source code to
  80. #   object code.
  81. #****************************************************************************
  82.  
  83. .idl.ih:
  84.         sc -maddstar -mnoint -S128000 -C128000 -v -p $*.idl
  85.  
  86. .idl.c:
  87.         sc -maddstar -mnoint -S128000 -C128000 -v -p -s c $*.idl
  88.  
  89. .idl.def:
  90.         sc -maddstar -mnoint -S128000 -C128000 -v -p -s def $*.idl
  91.  
  92. .c.obj:
  93.         $(CC) -I.; -c $<
  94.  
  95. all: car.dll
  96.  
  97. #
  98. # Specific Process Tag
  99. #
  100.  
  101. !ifdef INCL_INT3
  102. int3.obj:
  103.     $(ASM)   $*.asm
  104. !endif
  105.  
  106. car.ih:  $$(@B).idl
  107.  
  108. car.obj: $$(@B).c $$(@B).ih $$(@B).h $$(@B).idl
  109.  
  110. car.dll: $$(@B).def $(OBJS) car.res
  111.          $(LINK) $(LDFLAGS) $(OBJS),$@,,$(DLLLIBS),$*;
  112.          rc -p -x $*.res $*.dll
  113.          mapsym car.map
  114.  
  115. car.res: $$(@B).rc $$(@B).ih
  116.          rc -r $*.rc $*.res
  117.  
  118.