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.

173 lines
3.3 KiB

  1. !IF 0
  2. Copyright (c) 1991 & 1993 Microsoft Corporation
  3. Module Name:
  4. makefile
  5. Abstract:
  6. makefile for Vdm NetWare Redir program
  7. Author:
  8. Richard L Firth (rfirth) 13-Sep-1991
  9. Revision History:
  10. 13-Sep-1991 rfirth
  11. Created
  12. !ENDIF
  13. !include $(NTMAKEENV)\makefile.plt
  14. #
  15. # Because we've invoked nmake from within a makefile, macros defined
  16. # in a previous makefile (ie, sources, sources.inc, makefile.def)
  17. # are not defined at this point unless they're defined on the command
  18. # line. This makefile assumes the LANGUAGE and ALT_PROJECT_TARGET macros
  19. # defined in $(LANGUAGE)\sources.inc are passed to this invokation of nmake
  20. # on the command line.
  21. #
  22. !if "$(PROCESSOR_ARCHITECTURE)" == "x86"
  23. TARGET_DIRECTORY=i386
  24. !elseif "$(PROCESSOR_ARCHITECTURE)" == "ALPHA"
  25. TARGET_DIRECTORY=alpha
  26. !endif
  27. PATH=$(PATH_TOOLS16);$(PATH)
  28. #
  29. # set the LANGUAGE info
  30. #
  31. !IFNDEF LANGUAGE
  32. LANGUAGE=USA
  33. !ENDIF
  34. DEST=$(LANGUAGE)\$(_OBJ_DIR)\$(TARGET_DIRECTORY)
  35. .SUFFIXES:
  36. .SUFFIXES: .asm .h
  37. #
  38. # nmake doesn't work properly if we try to stick the objects in obj, so put
  39. # them in current dir for now. WHEN CHANGE OBJPATH TO BE OBJ, CHANGE clean TOO
  40. #
  41. ASM = $(PATH_TOOLS16)\masm
  42. LINK = $(PATH_TOOLS16)\link16
  43. #
  44. # convert NTDEBUG into DEBUG flag. NTDEBUG can be not present or retail, either
  45. # of which mean no debugging; or ntsd, cvp or sym, which means debugging support
  46. # required
  47. #
  48. !IF "$(NTDEBUG)" == "ntsdnodbg"
  49. DEBUGGING=0
  50. !ELSE
  51. DEBUGGING=1
  52. !ENDIF
  53. #
  54. # assembler and linker debugging options
  55. #
  56. !IF $(DEBUGGING)
  57. ASMDEBUG =/DDEBUG=1 /Zi
  58. LINKDEBUG =/CO
  59. !ELSE
  60. ASMDEBUG =/DDEBUG=0
  61. LINKDEBUG =
  62. !ENDIF
  63. ASMINC =/I. /I..\..\inc /I..\inc\$(_OBJ_DIR)\$(TARGET_DIRECTORY) /I..\..\inc\$(LANGUAGE) /I$(SDK_INC16_PATH)
  64. ASMFLAGS =/Mx
  65. LINKFLAGS =/MAP /CP:1
  66. #
  67. # Inference rules - asm to obj, h to inc
  68. #
  69. .asm{$(DEST)\}.obj:
  70. @rem Setting the MASM env var keeps the masm command line below 128 chars
  71. set MASM=$(ASMINC) $(ASMDEBUG) $(USERDEFS)
  72. $(ASM) $<,$@;
  73. .asm.lst:
  74. set MASM = $(ASMINC) $(ASMDEBUG) $(USERDEFS)
  75. $(ASM) /L $<;
  76. #
  77. # what it is we're building
  78. #
  79. TARGET = $(DEST)\nw16.exe
  80. MAPFILE = $(TARGET:.exe=.map)
  81. DEFFILE = ;
  82. OBJS = $(DEST)\nw16.obj \
  83. $(DEST)\resident.obj
  84. LIBS =
  85. #
  86. # how to build it
  87. #
  88. all: makedir $(TARGET)
  89. $(TARGET): $(OBJS)
  90. $(LINK) @<<
  91. $(OBJS)
  92. $(TARGET) $(LINKFLAGS) $(LINKDEBUG)
  93. $(MAPFILE)
  94. $(LIBS)
  95. $(DEFFILE)
  96. <<
  97. #
  98. # where to put it
  99. #
  100. if not exist $(DEST) md $(DEST)
  101. binplace -o $(ALT_PROJECT_TARGET) $(TARGET)
  102. binplace -o $(ALT_PROJECT_TARGET) $(MAPFILE)
  103. #
  104. # clean build - delete all objs
  105. #
  106. clean: clean2
  107. clean2:
  108. if exist $(DEST)\*.* del $(DEST)\*.*
  109. $(MAKE)
  110. makedir:
  111. @-if not exist $(DEST) md $(DEST)
  112. #
  113. # file dependencies
  114. #
  115. $(DEST)\nw16.obj: \
  116. nw16.asm \
  117. debugmac.inc \
  118. asmmacro.inc \
  119. segorder.inc \
  120. ..\inc\$(_OBJ_DIR)\$(TARGET_DIRECTORY)\nwdos.inc
  121. $(DEST)\resident.obj: \
  122. resident.asm \
  123. segorder.inc \
  124. debugmac.inc \
  125. asmmacro.inc \
  126. ..\inc\$(_OBJ_DIR)\$(TARGET_DIRECTORY)\nwdos.inc