makefile
上传用户:xiaoan1112
上传日期:2013-04-11
资源大小:19621k
文件大小:3k
源码类别:

操作系统开发

开发平台:

Visual C++

  1. #   Compiler options:
  2. #   Always:
  3. #        -c   compiler should not link
  4. #        -W2  warning level 2 (max)
  5. #        -AM  medium model code..near data, far code
  6. #        -Zp  pack structures on byte boundaries
  7. #        -Gc  Pascal calling conventions
  8. #   Debugging:
  9. #        -Zi  codeview information
  10. #        -DDEBUG define DEBUG for all code
  11. #
  12. #   Non-Debugging:
  13. #        -Ox  total optimization
  14. #             includes:
  15. #             -Oa ingnore aliasing
  16. #             -Oi intrinsic functions
  17. #             -Ol loop optimizations
  18. #             -Ot optimize for speed
  19. #             -Gs disable stack checking
  20. #
  21. #   Debugging compile line:
  22. INCL = loader
  23. ########################### International Changes #######################
  24. MSG_DIR=$(LANG_SRC)$(COUNTRY)dosshellloader
  25. #########################################################################
  26. CC  = cl -c -W2 -AM -Zip -Gc
  27. #   Non-Debuggin compile line:
  28. #CC  = cl -c -W2 -AM -Zp -Ox -Gc
  29. #
  30. #   Assembler options:
  31. #       always:
  32. #       -MX preserve case of globals
  33. #       -D?SMALL small model
  34. #       Debugging:
  35. #       -DDEBUG define debug for all asm code
  36. #
  37. #   Debugging assembler line:
  38. #ASM = masm -MX -D?SMALL -DDEBUG -I$(INCL) -I$(MSG_DIR)
  39. #   Non-Debugging assembler line:
  40. !IFDEF ROMDOS
  41. ASM = masm -MX -D?SMALL -DROMDOS -I$(INCL) -I$(MSG_DIR)
  42. !ELSE
  43. ASM = masm -MX -D?SMALL -I$(INCL) -I$(MSG_DIR)
  44. !ENDIF
  45. QASM = masm -MX -D?SMALL -DQLOADER -I$(INCL) -I$(MSG_DIR)
  46. #
  47. #   Linker options:
  48. #       /NOE no external dictionary for library search
  49. #       /MAP generate a map file
  50. #   Linker line:
  51. LINK= link /NOE/MAP
  52. LIBRARY = ;
  53. #
  54. #   Name is the name of the linker's output .exe file:
  55. NAME = tstshell
  56. #
  57. #   OBJS is a list of all .obj files that should be linke in:
  58. OBJS = loader.obj tstshell.obj
  59. OBJSQ = qloader.obj
  60. #
  61. #   LIBRARY is a list of libraries that should be linked in, in order:
  62. LIBRARY =
  63. #
  64. #
  65. #
  66. #   Compile all C files in makefile's directory:
  67. .c.obj:
  68. $(CC) $*.c
  69. #
  70. #   Assemble all ASM files in makefile's directory, generate listing:
  71. .asm.obj:
  72. $(ASM) $*.asm,$*.obj,$*.lst ;
  73. bins    =....binaries
  74. cprs    =....compress
  75. dest    =dosshell.com
  76. cpr     =dosshell.co_
  77. !IFNDEF       BUILDER
  78. all: tstshell.exe $(dest) ..$(dest)
  79. !ELSE
  80. all: $(dest) $(cprs)$(cpr) $(bins)$(dest)
  81. $(bins)$(dest): $(dest)
  82.     copy $(dest) $(bins)
  83. $(cprs)$(cpr):  $(cpr)
  84.     copy $(cpr) $(cprs)
  85. $(cpr):       $(dest)
  86.     $(compress) $(dest) $(cpr)
  87. !ENDIF
  88. ..$(dest): $(dest)
  89.     copy $(dest) ..
  90. qloader.exe:    $(OBJSQ)
  91. $(LINK) @<<
  92. $(OBJSQ)
  93. $*,
  94. $*,
  95. $(LIBRARY)
  96. NUL;
  97. <<
  98. tstshell.exe:   $(OBJS)
  99. $(LINK) @<<
  100. $(OBJS)
  101. $*,
  102. $*,
  103. $(LIBRARY)
  104. NUL;
  105. <<
  106. loader.obj:     loader.asm swtch_re.inc swtch_tr.inc
  107. qloader.obj:    loader.asm swtch_re.inc swtch_tr.inc
  108. $(QASM) loader,qloader;
  109. $(dest):        qloader.exe
  110. reloc qloader.exe $(dest)