home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ddkx86v2.zip / DDKX86 / DBCSDD / SRC_DBCS / VDEV / VDEVSUB.MAK
Makefile  |  1995-04-10  |  5KB  |  184 lines

  1. #       SCCSID = @(#)vdevsub.mak        6.3 91/09/21
  2.  
  3. #****************************************************************************
  4. #  Dot directive definition area (usually just suffixes)
  5. #****************************************************************************
  6.  
  7. .SUFFIXES:
  8. .SUFFIXES:      .c .asm .h .obj .lst .def .lnk .lrf .exe .com .imt .inc
  9. .SUFFIXES:      .doc .hpl .hp2 .ppr .ppx .txt .sci .sin .isu .stb .sym .map
  10. .SUFFIXES:      .cga .ega .vga .mna .cgd .egd .vgd .mnd .cgl .egl .vgl .mnl
  11. .SUFFIXES:      .lsd .ltb
  12.  
  13. #****************************************************************************
  14. #  Environment Setup for the component(s).
  15. #****************************************************************************
  16.  
  17. #
  18. # Compiler Location w/ includes, libs and tools
  19. #
  20.  
  21. H_DBCS = ..\..\..\h_dbcs
  22. INC_DBCS = ..\..\..\inc_dbcs
  23. LIB_DBCS= ..\..\..\lib_dbcs
  24. H = ..\..\..\h
  25. H386 = ..\..\..\h386
  26. INC = ..\..\..\inc
  27. LIB= ..\..\..\lib
  28. TOOLSPATH=..\..\..\..\tools
  29.  
  30. #
  31. # Define macros for language. If the macro is NOT defined, the default
  32. # value will be the US.
  33. #
  34.  
  35. !ifndef LANG
  36. LANG=us
  37. !endif
  38.  
  39. #
  40. # Since the compiler/linker and other tools use environment
  41. # variables ( INCLUDE, LIB, etc ) in order to get the location of files,
  42. # the following line will check the environment for the LIFE of the
  43. # makefile and will be specific to this set of instructions. All MAKEFILES
  44. # are requested to use this format to insure that they are using the correct
  45. # level of files and tools.
  46. #
  47.  
  48. !if [set INCLUDE=$(H_DBCS);$(H);$(H386);$(INC_DBCS);$(INC)] || \
  49.    [set LIB=$(LIB_DBCS);$(LIB)] || [set PATH=$(TOOLSPATH)]
  50. !endif
  51.  
  52. #
  53. # Compiler/tools Macros
  54. #
  55.  
  56. AS=masm
  57. CC= cl386
  58. IMPLIB=implib
  59. IPF=ipfc
  60. LIBUTIL=lib
  61. LINK=link386
  62. LINK16=link
  63. MAPSYM=mapsym
  64. RC=rc
  65.  
  66. #
  67. # Compiler and Linker Options
  68. #
  69.  
  70. PURE    = -p
  71. GAFLAGS =
  72. AFLAGS  = -Ml $(PURE) -t -Z $(GAFLAGS) $(FLAGS)
  73. AINC   =  -I. -I$(H_DBCS) -I$(H) -I$(INC_DBCS) -I$(INC)
  74. CINC   =  -I. -I$(H386) -I$(H_DBCS) -I$(H) -I$(INC_DBCS) -I$(INC)
  75. DFLAGS  = -DVDDSTRICT -DVDHSTRICT -DVDDDEBUG
  76. BFLAGS  = -DVDDSTRICT -DVDHSTRICT -DSTUB_VPIC
  77. OFLAGS  = -Owait
  78. SFLAGS  = -G3s -Zflp -Asnw -W2 -X $(CINC) -nologo -c $(GCFLAGS) $(BFLAGS)
  79. CFLAGS  = -G3s -Zflp -Asnw -W2 -X $(CINC) -nologo -c $(GCFLAGS) $(FLAGS)
  80. LFLAGS = /noi /noe /nod /map:0 /exepack /align:16
  81. L16FLAGS = /noi /noe /nod /map:0
  82. RFLAGS = -r
  83.  
  84. LIBS    = $(LIB)\vdh.lib
  85. DEF     = $(LIB)\vdd.def
  86.  
  87. #       Definitions for dwscript
  88.  
  89. DWSFLAGS= /n /y /t
  90.  
  91. SINC    = sinc
  92.  
  93. #****************************************************************************
  94. #   Setup the inference rules for compiling and assembling source code to
  95. #   obejct code.
  96. #****************************************************************************
  97.  
  98. .asm.obj:
  99.         $(AS) $(AFLAGS) $(AINC) $< ;
  100.  
  101. .asm.obd:
  102.         $(AS) $(AFLAGS) $(DFLAGS) $(AINC) $<, $*.obd;
  103.  
  104. .asm.lst:
  105.         $(AS) -l -n $(AFLAGS) $(AINC) $< ;
  106.  
  107. .asm.lsd:
  108.         $(AS) -l -n $(AFLAGS) $(DFLAGS) $(AINC) $< ;
  109.  
  110. .c.obj:
  111.         $(CC) $(OFLAGS) $(CFLAGS) $(CINC) $< ;
  112.  
  113. .c.obd:
  114.         $(CC) -Zi -Oi $(CFLAGS) $(DFLAGS) $(CINC) -Fo$@ $< ;
  115.  
  116. .c.lst:
  117.         $(CC) $(OFLAGS) $(CFLAGS) $(CINC) -Fc$*.lst $< ;
  118.  
  119. .c.lsd:
  120.         $(CC) -Zi -Oi $(CFLAGS) $(DFLAGS) $(CINC) -Fc$*.lst $< ;
  121.  
  122. .c.stb:
  123.         $(CC) $(OFLAGS) $(SFLAGS) $(CINC) -Fo$@ $< ;
  124.  
  125. .c.ltb:
  126.         $(CC) $(OFLAGS) $(SFLAGS) $(CINC) -Fc$*.lst $< ;
  127.  
  128. .c.i:
  129.         $(CC) $(OFLAGS) $(CFLAGS) $(CINC) -E $< >$*.i
  130.  
  131. .rc.obj:
  132.         $(RC) $(RFLAGS) $< ;
  133.  
  134. .asm.imt:
  135.         msgprof $*.asm /txt /asm
  136.         extract $*.pro
  137.         del $*.pro
  138.         mkmsgf $*.txt $*.imt /asm
  139.         del $*.txt
  140.  
  141. .lnk.lrf:
  142.         tresp $*.lnk $*.lrf
  143.  
  144. .map.sym:
  145.         mapsym $*.map
  146.  
  147. #       Rule for generating a .inc file from a .h file
  148.  
  149. .h.inc:
  150.         tabify -d $*.h | sed -f $(TOOLSPATH)\h2inc32.sed | tabify >$*.inc
  151.  
  152. #       Rules for generating dwscript output for different devices
  153.  
  154. .doc.hpl:
  155.         dwscript $*.doc $*.hpl laserjet.pro $(DWSFLAGS)
  156.         del toc.tmp
  157.  
  158. .doc.hp2:
  159.         dwscript $*.doc $*.hp2 laser2.pro $(DWSFLAGS)
  160.         del toc.tmp
  161.  
  162. .doc.ppr:
  163.         dwscript $*.doc $*.ppr ppr.pro $(DWSFLAGS)
  164.         del toc.tmp
  165.         ctlz $*.ppr
  166.  
  167. .doc.ppx:
  168.         echo .cs 1 ignore> $*.tmp
  169.         echo .im $*.doc >> $*.tmp
  170.         dwscript $*.tmp $*.ppx ppr.pro $(DWSFLAGS)
  171.         del $*.tmp
  172.         del toc.tmp
  173.         ctlz $*.ppx
  174.  
  175. .doc.txt:
  176.         dwscript $*.doc $*.txt nopro.pro $(DWSFLAGS)
  177.         del toc.tmp
  178.  
  179. #       Rules for generating header documents from .sin files
  180.  
  181. .sci.sin:
  182.         $(SINC) $(SINCFLAGS) $*.sci > $*.sin
  183.  
  184.