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.

128 lines
2.7 KiB

  1. #=========================================================
  2. #
  3. # nmake - build DEBUG version (default)
  4. # nmake RELEASE=1 - build RELEASE version (nmake clean first!)
  5. #
  6. #=========================================================
  7. #
  8. # Default definitions
  9. #
  10. NAME=db
  11. !if "$(RELEASE)"==""
  12. RELEASE=0
  13. !endif
  14. DEFS=/DSTRICT
  15. ROOT=..\..\..\..
  16. DEVTREE = $(ROOT)\dev
  17. DEVCOMMON = $(DEVTREE)\tools\common
  18. DEVC8 = $(DEVTREE)\tools\c816
  19. DEVINC = $(DEVTREE)\inc16;$(DEVTREE)\sdk\inc16;$(DEVC8)\inc
  20. DEVLIB = $(DEVC8)\lib;$(DEVTREE)\lib16;$(DEVTREE)\sdk\lib16;.
  21. MAPSYM = $(DEVCOMMON)\mapsym.exe
  22. RC = $(DEVTREE)\sdk\bin\rc.exe
  23. CC = $(DEVC8)\bin\cl.exe
  24. MASM = $(DEVTREE)\tools\masm\ml.exe
  25. LINK = $(DEVC8)\bin\link.exe
  26. IMPLIB = $(DEVC8)\bin\implib.exe
  27. H2INC = $(DEVCOMMON)\asm6h2nc.exe
  28. INCLUDES = $(DEVCOMMON)\includes.exe
  29. USERINC = ..\..\record.mgr; ..\..\inc;
  30. ALL_INC=$(DEVINC);$(USERINC)
  31. #=========================================================
  32. #
  33. # Debug options
  34. #
  35. DEBUG_CFLAGS=
  36. DEBUG_AFLAGS=
  37. DEBUG_LFLAGS=
  38. !if $(RELEASE)==0
  39. DEBUG_LFLAGS=/CODEVIEW
  40. DEBUG_CFLAGS=/DDEBUG /Zi
  41. DEBUG_AFLAGS=/DDEBUG /Zi
  42. !endif
  43. #=========================================================
  44. #
  45. # Default compiler, assembler, linker flags
  46. #
  47. # CFLAGS=-nologo $(DEBUG_CFLAGS) /W3 /c /AS /Owcgelsn /G2s /Gc /GA /Zp /Zd $(DEFS)
  48. CFLAGS=-c -AS -G2s -Zp -W3 -Zid -Od
  49. HIFLAGS= $(DEBUG_CFLAGS) /W3 /c /AS /Owcgelsn /G2s /Gc /Zp /Zd $(DEFS)
  50. AFLAGS=/nologo $(DEBUG_AFLAGS) /c /Cp /W2 /Zd $(DEFS)
  51. LFLAGS=$(DEBUG_LFLAGS) /NOD /NOE /MAP /LI
  52. #=========================================================
  53. #
  54. # Libraries
  55. #
  56. LIBS=slibce
  57. #=========================================================
  58. #
  59. # Build rules
  60. #
  61. .SUFFIXES: .c .asm .obj
  62. .c.obj:
  63. set INCLUDE=$(ALL_INC)
  64. $(CC) $(CFLAGS) $*.c
  65. .asm.obj:
  66. set INCLUDE=$(ALL_INC)
  67. $(MASM) $(AFLAGS) $*.asm
  68. .asm.lst:
  69. set INCLUDE=$(ALL_INC)
  70. $(MASM) $(AFLAGS) /Fl$*.lst $*.asm
  71. #=========================================================
  72. #
  73. # Build dependencies
  74. #
  75. OBJ = db.obj
  76. target: $(NAME).exe
  77. $(NAME).exe: makefile.w97 $(OBJ)
  78. set LIB=$(DEVLIB)
  79. $(LINK) $(LFLAGS) @<<
  80. $(OBJ)
  81. $(NAME).exe
  82. $(NAME).map
  83. $(LIBS);
  84. <<
  85. $(MAPSYM) $(NAME)
  86. clean:
  87. -del *.obj
  88. -del $(NAME).exe
  89. -del $(NAME).map
  90. -del $(NAME).sym
  91. depend:
  92. set INCLUDE=$(ALL_INC)
  93. $(INCLUDES) -I. -i -e -S. -L. *.asm >depend.mk
  94. $(INCLUDES) -I. -i -e -S. -L. *.c >>depend.mk
  95. $(INCLUDES) -I. -i -e -S. -L. *.h >>depend.mk
  96. $(INCLUDES) -I. -i -e -S. -L. *.inc >>depend.mk
  97. #=========================================================
  98. #
  99. # File dependencies
  100. #
  101. !if exist(depend.mk)
  102. !include depend.mk
  103. !else
  104. !message Warning: DEPEND.MK not found.
  105. !endif