Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

185 lines
3.7 KiB

  1. !IFDEF NTMAKEENV
  2. #
  3. # DO NOT EDIT THIS SECTION!!! Edit .\sources. if you want to add a new source
  4. # file to this component. This section merely indirects to the real make file
  5. # that is shared by all the components of WINDOWS NT
  6. #
  7. !INCLUDE $(NTMAKEENV)\makefile.def
  8. !ELSE
  9. #***
  10. #
  11. #makefile
  12. #
  13. # This makefile builds link.exe, a COFF linker. The environment for this
  14. # makefile is setup by common.mak and make.bat.
  15. #
  16. #****************************************************************************
  17. Default: all
  18. PCH_HDR = link.h
  19. PCH_SRC = alpha.cpp
  20. PCH_OBJ = $(ODIR)\alpha.obj
  21. !include ..\common.mak
  22. #***
  23. #
  24. # Add double-byte support
  25. #
  26. #****************************************************************************
  27. !if "$(DBC)" != "0"
  28. CFLAGS = $(CFLAGS) -D_MBCS
  29. !message --- Building MBCS version
  30. !else
  31. !message --- Building SBC version
  32. !endif
  33. #***
  34. #
  35. # Add language support
  36. #
  37. #****************************************************************************
  38. !if "$(LANG)" == ""
  39. LANG = US
  40. !endif
  41. #***
  42. #
  43. # Validate language
  44. #
  45. #****************************************************************************
  46. !if "$(LANG)" != "US" && "$(LANG)" != "JAPAN"
  47. !message Unsupported language, please build with LANG=US (default)
  48. !message or LANG=JAPAN.
  49. !error Please try again.
  50. !endif
  51. #***
  52. #
  53. #objects
  54. #
  55. #****************************************************************************
  56. OBJS = \
  57. $(ODIR)\alpha.obj \
  58. $(ODIR)\bufio.obj \
  59. $(ODIR)\calltree.obj \
  60. $(ODIR)\cmdline.obj \
  61. $(ODIR)\coff.obj \
  62. $(ODIR)\contrib.obj \
  63. $(ODIR)\convert.obj \
  64. $(ODIR)\cpp.obj \
  65. $(ODIR)\cv.obj \
  66. $(ODIR)\cvtomf.obj \
  67. $(ODIR)\data.obj \
  68. $(ODIR)\db.obj \
  69. $(ODIR)\dbg.obj \
  70. $(ODIR)\dbiapi.obj \
  71. $(ODIR)\dbinsp.obj \
  72. $(ODIR)\defaultl.obj \
  73. $(ODIR)\deflib.obj \
  74. $(ODIR)\dmple.obj \
  75. $(ODIR)\dmpne.obj \
  76. $(ODIR)\dmppef.obj \
  77. $(ODIR)\dump.obj \
  78. $(ODIR)\edit.obj \
  79. $(ODIR)\errmsg.obj \
  80. $(ODIR)\export.obj \
  81. $(ODIR)\hash.obj \
  82. $(ODIR)\i386.obj \
  83. $(ODIR)\ifpo.obj \
  84. $(ODIR)\image.obj \
  85. $(ODIR)\incr.obj \
  86. $(ODIR)\ipdata.obj \
  87. $(ODIR)\irelocs.obj \
  88. $(ODIR)\lib.obj \
  89. $(ODIR)\linenum.obj \
  90. $(ODIR)\link.obj \
  91. $(ODIR)\lnkmain.obj \
  92. $(ODIR)\lnkp1.obj \
  93. $(ODIR)\lnkp2.obj \
  94. $(ODIR)\log.obj \
  95. $(ODIR)\m68k.obj \
  96. $(ODIR)\mac.obj \
  97. $(ODIR)\map.obj \
  98. $(ODIR)\memory.obj \
  99. $(ODIR)\mips.obj \
  100. $(ODIR)\mppc.obj \
  101. $(ODIR)\order.obj \
  102. $(ODIR)\pdata.obj \
  103. $(ODIR)\pe.obj \
  104. $(ODIR)\ppc.obj \
  105. $(ODIR)\shared.obj \
  106. $(ODIR)\symbol.obj \
  107. $(ODIR)\tce.obj \
  108. $(ODIR)\textpad.obj \
  109. $(ODIR)\vxd.obj \
  110. $(ODIR)\link.res
  111. #***
  112. #
  113. #target
  114. #
  115. #****************************************************************************
  116. # For error file generation
  117. AWK=gawk
  118. !if "$(TIMEBOMB)"=="1"
  119. !if "$(LANG)" == "JAPAN"
  120. EXT_LIBS = timebomj.lib $(EXT_LIBS)
  121. !else
  122. EXT_LIBS = timebomb.lib $(EXT_LIBS)
  123. !endif
  124. !endif
  125. all: $(ODIR)\link.exe
  126. $(ODIR)\link.exe: makefile $(OBJS) \
  127. ..\disasm\$(ODIR)\disasm.lib \
  128. ..\disasm68\$(ODIR)\disasm68.lib
  129. $(LINKER) @<<
  130. -out:$@
  131. $(LFLAGS)
  132. -subsystem:console
  133. $(OBJS)
  134. ..\disasm\$(ODIR)\disasm.lib
  135. ..\disasm68\$(ODIR)\disasm68.lib
  136. mspdb.lib
  137. $(EXT_LIBS)
  138. <<
  139. !if "$(PROCESSOR_ARCHITECTURE)" != "PPC"
  140. bscmake /o $(@R).bsc $(ODIR)\*.sbr
  141. !endif
  142. #***
  143. #
  144. # Generate the message files.
  145. #
  146. #****************************************************************************
  147. errgen:
  148. $(AWK) -f mkhfile.awk link32er.txt > errmsg.h
  149. $(AWK) -f mkrfile.awk link32er.txt > errmsg.rc
  150. $(AWK) -f mkdfile.awk link32er.txt > errdat.h
  151. clean:
  152. -del $(ODIR)\*.bsc
  153. -del $(ODIR)\*.exe
  154. -del $(ODIR)\*.ilk
  155. -del $(ODIR)\*.lib
  156. -del $(ODIR)\*.map
  157. -del $(ODIR)\*.obj
  158. -del $(ODIR)\*.pch
  159. -del $(ODIR)\*.pdb
  160. -del $(ODIR)\*.res
  161. -del $(ODIR)\*.sbr
  162. !ENDIF