home *** CD-ROM | disk | FTP | other *** search
/ NEXT Generation 27 / NEXT27.iso / pc / demos / emperor / dx3.exe / SDK / SAMPLES / WATSDK.MK < prev    next >
Makefile  |  1996-08-28  |  4KB  |  138 lines

  1. ############################################################################
  2. #
  3. #  Copyright (C) 1995 Microsoft Corporation.  All Rights Reserved.
  4. #
  5. #  File:        watsdk.mk
  6. #  Content:     Rules for building the components of the SDK.
  7. #               For use with WATCOM C/C++
  8. #
  9. ############################################################################
  10.  
  11. !ifndef MSTOOLS
  12. MSTOOLS=\mstools
  13. !endif
  14.  
  15. !ifndef GSDKROOT
  16. GSDKROOT=..\..\..
  17. !endif
  18.  
  19. #############################################################################
  20. #
  21. # Set up include & lib path
  22. #
  23. #############################################################################
  24. INCLUDE=$(GSDKROOT)\inc;$(GSDKROOT)\SAMPLES\WATINC;$(%WATCOM)\h\nt;$(MSTOOLS)\include;..\..\misc;$(%WATCOM)\h;$(%WATCOM)\h\win
  25. LIB=$(GSDKROOT)\lib;$(MSTOOLS)\LIB;$(WATCOM)\LIB386\NT;$(LIB)
  26.  
  27. #############################################################################
  28. #
  29. # new suffixes
  30. #
  31. #############################################################################
  32. .EXTENSIONS:
  33. .EXTENSIONS:.exe .dll
  34. .EXTENSIONS:.obj .res
  35. .EXTENSIONS:.c .cpp .asm .h  .rc
  36.  
  37. #############################################################################
  38. #
  39. # C compiler definitions
  40. #
  41. #############################################################################
  42. #CC      =wcl386
  43. CC      =wcc386
  44. CPPC    =wpp386
  45. CFLAGS  += -W3 #-c
  46. !ifndef LOGO
  47. CFLAGS  += -zq -i$(INCLUDE)
  48. !endif
  49.  
  50. #############################################################################
  51. #
  52. # Linker definitions
  53. #
  54. #############################################################################
  55. LINK    =wlink 
  56. !ifndef LOGO
  57. LFLAGS  += option quiet 
  58. !endif
  59.  
  60. #############################################################################
  61. # resource compiler definitions
  62. #
  63. #############################################################################
  64. RCFLAGS += -I..;$(%WATCOM)\h\nt;$(%WATCOM)\h
  65. RCFLAGS += -DWIN32 -DIS_32 -D__WATCOMC__=1050
  66. RC = wrc
  67.  
  68. #############################################################################
  69. #
  70. # assembler definitions
  71. #
  72. #############################################################################
  73. ASM = ml
  74. AFLAGS  +=-DIS_32 -DWIN32
  75. AFLAGS  +=-W3 -WX -Zd -c -Cx -DMASM6
  76.  
  77. #############################################################################
  78. #
  79. # librarian definitions
  80. #
  81. #############################################################################
  82. LIBEXE = wlib
  83.  
  84. #############################################################################
  85. #
  86. # targets
  87. #
  88. #############################################################################
  89.  
  90. goal:   $(GOALS) .SYMBOLIC
  91.         @%null
  92.  
  93. .c: ..;..\..\misc
  94.  
  95. .c.obj:
  96.         @%write $(NAME).cpt  -D_WIN32 $(CFLAGS) -bt=NT  $[* -fh
  97. !ifdef MONKEY
  98. #       $(CC) @$(NAME).cpt $[* -fh -i..\..\misc -c -zz -DDEBUG
  99.         $(CC) @$(NAME).cpt -zz -DDEBUG
  100. !else
  101. #       $(CC) @$(NAME).cpt $[* -fh -i..\..\misc -c -DDEBUG $[* -fh -c
  102.         $(CC) @$(NAME).cpt 
  103. !endif
  104. #       $(CC) -D_WIN32 -D_WINDOWS -DNDEBUG $(CFLAGS) -bt=NT $[* -fh
  105.  
  106. .cpp : ..;..\..\misc
  107.  
  108. .cpp.obj:
  109.         @%write $(NAME).cpt  -D_WIN32 $(CFLAGS) -bt=NT $[* -fh 
  110. !ifdef MONKEY
  111. #       $(CPPC) @$(NAME).cpt $[* -fh -i..\..\misc -c -zz -DDEBUG
  112.         $(CPPC) @$(NAME).cpt -zz -DDEBUG
  113. !else
  114. #       $(CPPC) @$(NAME).cpt $[* -fh -i..\..\misc -c 
  115.         $(CPPC) @$(NAME).cpt
  116. !endif
  117. #       $(CC) -D_WIN32 $(CFLAGS) -bt=NT $[* -fh
  118.    
  119. .asm : ..
  120.  
  121. .asm.obj:
  122.         $(ASM) $(AFLAGS) $[*.asm
  123.         
  124. .rc : ..
  125.  
  126. .rc.res:
  127.         $(RC) $(RCFLAGS) -bt=NT -r -fo=$^. $[*.rc
  128.         
  129. $(NAME).lnk : ..\$(MAKENAME) ..\..\watsdk.mk ..\..\watbld.mk
  130.     @%write $(NAME).lnk debug all
  131.     @%append $(NAME).lnk system $(SYS)
  132.     @%append $(NAME).lnk op map
  133.     @%append $(NAME).lnk op st=64k
  134.     @%append $(NAME).lnk name $(NAME).exe
  135.     @for %i in ($(OBJS)) do @%append $(NAME).lnk file %i
  136.     @for %i in ($(LIBS)) do @%append $(NAME).lnk lib %i
  137.