home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c480 / 19.ddi / SOURCE / STARTUP / MAKEFILE.WI_ / MAKEFILE.WI
Encoding:
Text File  |  1993-02-08  |  5.1 KB  |  187 lines

  1. ###############################################################################
  2. #                                          #
  3. #    Copyright (c) 1986-1992, Microsoft Corporation.  All rights reserved. #
  4. #                                          #
  5. #    Makefile for building c runtime startup objects (WIN).              #
  6. #                                          #
  7. #    This makefile is invoked by CSTARTUP.<BAT,CMD>.               #
  8. #    See CSTARTUP.<BAT,CMD> for usage information.                  #
  9. #                                          #
  10. ###############################################################################
  11.  
  12. #
  13. # environment variable settings
  14. #
  15. # this makefile assumes that the following environment variables are
  16. # defined on input:
  17. #
  18. #    SRC = directory where sources reside
  19. #    INC = directory for ASM include files
  20. #    CL = compiler command line
  21. #    ASM = assembler command line
  22. #    CMACROS = standard assembler include files
  23. #
  24. # see winexe.mkf and windll.mkf for these definitions
  25. #
  26.  
  27. #
  28. # WIN EXE objects
  29. #
  30.  
  31. win:    \
  32.     fatal.obj     \
  33.     fmsghdr.obj     \
  34.     qwcinit.obj     \
  35.     stubmain.obj     \
  36.     wild.obj     \
  37.         crt0dat.obj  \
  38.         crt0msg.obj  \
  39.         file.obj     \
  40.         nmsghdr.obj  \
  41.         stdargv.obj  \
  42.         _setargv.obj \
  43.         stdenvp.obj  \
  44.         stdalloc.obj \
  45.         wchkstk.obj  \
  46.         wfile.obj    \
  47.         windgrp.obj  \
  48.         windgrpx.obj \
  49.         wcrt0.obj    \
  50.         nocrt.obj    \
  51.         wnull.obj    \
  52.         noqwin.obj    \
  53.     nulbody.obj     \
  54.     winstart
  55.  
  56. #
  57. # WIN DLL objects
  58. #
  59.  
  60. windll: \
  61.     fatal.obj     \
  62.     stubmain.obj     \
  63.         crt0dat.obj  \
  64.         crt0msg.obj  \
  65.         file.obj     \
  66.         nocrt.obj    \
  67.         stubwep.obj  \
  68.         wcrt0.obj    \
  69.         wep.obj
  70.  
  71.  
  72. #
  73. # startup modules built from DOS sources
  74. #
  75.  
  76.  
  77. crt0dat.obj: $(SRC)\dos\crt0dat.asm $(CMACROS) $(INC)\msdos.inc
  78.             $(ASM) $(SRC)\dos\crt0dat.asm,crt0dat.obj;
  79.  
  80. crt0msg.obj: $(SRC)\dos\crt0msg.asm $(CMACROS) $(INC)\rterr.inc
  81.             $(ASM) $(SRC)\dos\crt0msg.asm,crt0msg.obj;
  82.  
  83. file.obj:   $(SRC)\file.asm $(CMACROS) \
  84.             $(INC)\defsegs.inc $(INC)\stdio.inc
  85.     $(ASM) $(SRC)\file.asm,file.obj;
  86.  
  87. fmsghdr.obj:    $(SRC)\fmsghdr.asm $(CMACROS) $(INC)\msdos.inc
  88.         $(ASM) $(SRC)\fmsghdr.asm;
  89.  
  90. nmsghdr.obj: $(SRC)\dos\nmsghdr.asm $(CMACROS) $(INC)\msdos.inc
  91.             $(ASM) $(SRC)\dos\nmsghdr.asm,nmsghdr.obj;
  92.  
  93. stdargv.obj: $(SRC)\dos\stdargv.asm $(CMACROS) $(INC)\msdos.inc \
  94.             $(INC)\rterr.inc
  95.             $(ASM) $(SRC)\dos\stdargv.asm,stdargv.obj;
  96.  
  97. stdalloc.obj: $(SRC)\dos\stdalloc.asm $(CMACROS) \
  98.             $(INC)\heap.inc $(INC)\msdos.inc
  99.             $(ASM) $(SRC)\dos\stdalloc.asm,stdalloc.obj;
  100.  
  101. stdenvp.obj: $(SRC)\dos\stdenvp.asm $(CMACROS) $(INC)\msdos.inc \
  102.             $(INC)\rterr.inc
  103.             $(ASM) $(SRC)\dos\stdenvp.asm,stdenvp.obj;
  104.  
  105. #
  106. # startup sources built from WIN sources
  107. #
  108.  
  109. noqwin.obj: $(SRC)\win\noqwin.asm $(CMACROS) \
  110.             $(INC)\rterr.inc
  111.         $(ASM) $(SRC)\win\noqwin.asm,noqwin.obj;
  112.  
  113. fatal.obj: $(SRC)\win\fatal.asm $(CMACROS) \
  114.         $(INC)\defsegs.inc $(INC)\rterr.inc
  115.     $(ASM) $(SRC)\win\fatal.asm,fatal.obj;
  116.  
  117. qwcinit.obj: $(SRC)\win\qwcinit.asm $(CMACROS) \
  118.         $(INC)\cmsgs.inc $(INC)\defsegs.inc \
  119.         $(INC)\fcntl.inc $(INC)\rterr.inc
  120.     $(ASM) $(SRC)\win\qwcinit.asm,qwcinit.obj;
  121.  
  122. stubmain.obj: $(SRC)\win\stubmain.asm $(CMACROS)
  123.     $(ASM) $(SRC)\win\stubmain.asm,stubmain.obj;
  124.  
  125. wchkstk.obj: $(SRC)\win\wchkstk.asm $(CMACROS)
  126.     $(ASM) $(SRC)\win\wchkstk.asm,wchkstk.obj;
  127.  
  128. wfile.obj: $(SRC)\win\wfile.asm $(CMACROS) \
  129.             $(INC)\defsegs.inc $(INC)\stdio.inc
  130.     $(ASM) $(SRC)\win\wfile.asm,wfile.obj;
  131.  
  132. windgrp.obj: $(SRC)\win\windgrp.asm $(CMACROS)
  133.     $(ASM) $(SRC)\win\windgrp.asm,$@;
  134.  
  135. windgrpx.obj: $(SRC)\win\windgrpx.c
  136.     $(CL) $(MEM) -Gw -Fo$@ $(SRC)\win\windgrpx.c
  137.  
  138. wcrt0.obj: $(SRC)\win\crt0.asm $(CMACROS) \
  139.             $(INC)\msdos.inc $(INC)\defsegs.inc \
  140.             $(INC)\rterr.inc $(INC)\stdlib.inc
  141.     $(ASM) $(SRC)\win\crt0.asm,wcrt0.obj;
  142.  
  143. nocrt.obj: $(SRC)\win\crt0.asm $(CMACROS) \
  144.             $(INC)\msdos.inc
  145.     $(ASM) -D_NOCRT $(SRC)\win\crt0.asm,nocrt.obj;
  146.  
  147. stubwep.obj: $(SRC)\win\stubwep.asm $(CMACROS)
  148.     $(ASM) $(SRC)\win\stubwep.asm,stubwep.obj;
  149.  
  150. wep.obj: $(SRC)\win\wep.asm $(CMACROS)
  151.     $(ASM) $(SRC)\win\wep.asm,wep.obj;
  152.  
  153. wnull.obj: $(SRC)\win\wnull.asm $(CMACROS)
  154.     $(ASM) $(SRC)\win\wnull.asm,wnull.obj;
  155.  
  156. #
  157. # wild card expansion support modules
  158. #
  159.  
  160. setargv.obj: $(SRC)\setargv.asm $(CMACROS)
  161.                 $(ASM) $(SRC)\setargv.asm,setargv.obj;
  162.  
  163. _setargv.obj: $(SRC)\dos\stdargv.asm $(CMACROS) $(INC)\msdos.inc \
  164.         $(INC)\rterr.inc
  165.                 $(ASM) -DWILDCARD $(SRC)\dos\stdargv.asm,_setargv.obj;
  166.  
  167. wild.obj:     $(SRC)\wild.c $(CINC)\stddef.h $(CINC)\string.h \
  168.         $(CINC)\malloc.h $(INC)\register.h $(CINC)\ctype.h \
  169.         $(INC)\msdos.h
  170.         $(CL) -GW -Zel $(SRC)\wild.c
  171.  
  172. #
  173. # small program
  174. #
  175.  
  176. nulbody.obj: $(SRC)\nulbody.c
  177.         $(CL) -GW -Fonulbody.obj $(SRC)\nulbody.c
  178.  
  179. #
  180. # this step is always done because the target does not exist
  181. #
  182.  
  183. winstart:
  184.                 link @$(SRC)\win\nulbody.lnk,,/NOD:$(MODEL)libce \
  185.                 $(MODEL)libcewq.lib libw.lib, \
  186.                 $(SRC)\win\nulbody.def
  187.