mkfile 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. objtype=386
  2. </$objtype/mkfile
  3. BIN=/386
  4. TARG=\
  5. 9load\
  6. 9pxeload\
  7. 9loadlite\
  8. 9loaddebug\
  9. 9loadlitedebug\
  10. ld.com\
  11. mbr\
  12. pbs\
  13. pbslba\
  14. CORE=\
  15. alarm.$O\
  16. cga.$O\
  17. clock.$O\
  18. console.$O\
  19. dosboot.$O\
  20. devfloppy.$O\
  21. dma.$O\
  22. fs.$O\
  23. ilock.$O\
  24. kbd.$O\
  25. kfsboot.$O\
  26. print.$O\
  27. queue.$O\
  28. trap.$O\
  29. LOAD=\
  30. 8250.$O\
  31. apm.$O\
  32. boot.$O\
  33. cis.$O\
  34. conf.$O\
  35. devi82365.$O\
  36. devpccard.$O\
  37. devsd.$O\
  38. inflate.$O\
  39. load.$O\
  40. memory.$O\
  41. part.$O\
  42. pci.$O\
  43. sdata.$O\
  44. sdmylex.$O\
  45. sd53c8xx.$O\
  46. sdiahci.$O\
  47. sdscsi.$O\
  48. ETHER=\
  49. bootp.$O\
  50. ether.$O\
  51. ether2114x.$O\
  52. ether2000.$O\
  53. ether589.$O\
  54. ether79c970.$O\
  55. ether8003.$O\
  56. ether8139.$O\
  57. ether8169.$O\
  58. ether82563.$O\
  59. ether82557.$O\
  60. ether83815.$O\
  61. ether8390.$O\
  62. etherec2t.$O\
  63. etherelnk3.$O\
  64. etherga620.$O\
  65. etherigbe.$O\
  66. ethermii.$O\
  67. etherrhine.$O\
  68. etherdp83820.$O\
  69. BCOM=\
  70. bcom.$O\
  71. bootld.$O\
  72. devsd.$O\
  73. memory.$O\
  74. part.$O\
  75. pci.$O\
  76. sdata.$O\
  77. sdscsi.$O\
  78. HFILES=\
  79. lib.h\
  80. mem.h\
  81. dat.h\
  82. fns.h\
  83. io.h\
  84. CFLAGS=-FTVw -I.
  85. all:V: $TARG
  86. 9load: l.$O $CORE $LOAD $ETHER
  87. $LD -o $target -H3 -T0x80010000 -l $prereq -lflate -lc -lip
  88. ls -l $target
  89. 9pxeload: lpxe.$O $CORE $LOAD $ETHER
  90. $LD -o $target -H3 -T0x80007C00 -l $prereq -lflate -lc -lip
  91. ls -l $target
  92. 9loaddebug: l.$O $CORE $LOAD $ETHER
  93. $LD -o $target -T0x80010000 -l $prereq -lflate -lc -lip
  94. ls -l $target
  95. # acid $target
  96. # map({"text", 0x80010000, 0x80090000, 0x00000020})
  97. 9loadlite: l.$O $CORE $LOAD noether.$O
  98. $LD -o $target -H3 -T0x80010000 -l $prereq -lflate -lc
  99. ls -l $target
  100. 9loadlitedebug: l.$O $CORE $LOAD noether.$O
  101. $LD -o $target -T0x80010000 -l $prereq -lflate -lc
  102. ls -l $target
  103. # acid $target
  104. # map({"text", 0x80010000, 0x80090000, 0x00000020})
  105. ld.com: ld.$O $CORE $BCOM
  106. $LD -o $target -H3 -T0x80080100 -l $prereq -lc
  107. ls -l $target
  108. lddebug: ld.$O $CORE $BCOM
  109. $LD -o $target -T0x80080100 -l $prereq -lc
  110. ls -l $target
  111. # acid $target
  112. # map({"text", 0x80080100, 0x800B0000, 0x00000020})
  113. ld.$O: l.s
  114. $AS -DDOTCOM -o $target l.s
  115. lpxe.$O: l.s
  116. $AS -DPXE -o $target l.s
  117. %.$O: %.s
  118. $AS $stem.s
  119. %.$O: %.c
  120. $CC $CFLAGS $stem.c
  121. %.$O: $HFILES
  122. l.$O pbs.$O pbslba.$O mbr.$O: x16.h
  123. clock.$O floppy.$O trap.$O: ureg.h
  124. bcom.$O conf.$O devfloppy.$O devsd.$O dosboot.$O fs.$O \
  125. kfsboot.$O load.$O part.$O: dosfs.h fs.h kfs.h
  126. ether.$O etherelnk3.$O: etherif.h
  127. devsd.$O part.$O sdata.$O sdscsi.$O: sd.h
  128. bootp.$O: ip.h
  129. mbr: mbr.$O
  130. $LD -o $target -H3 -T0x0600 -l $prereq
  131. ls -l $target
  132. pbs&: pbs%.$O
  133. $LD -o $target -H3 -T0x7C00 -l $prereq
  134. ls -l $target
  135. pbs&.debug: pbs%.$O
  136. $LD -o $target -T0x7C00 -l $prereq
  137. ls -l $target
  138. # acid $target
  139. # map({"text", 0x7C00, 0x7E00, 0x00000020})
  140. clean:
  141. rm -f *.[$OS] [$OS].out y.tab.? y.debug y.output $TARG 9loaddebug lddebug
  142. install:V:
  143. for (i in $TARG)
  144. mk $MKFLAGS $i.install
  145. %.install:V: $BIN/%
  146. # import lookout / /n/lookout
  147. # cp $prereq /n/lookout/$prereq
  148. $BIN/%: %
  149. cp $stem $BIN/$stem
  150. UPDATE=\
  151. mkfile\
  152. ${CORE:%.$O=%.c}\
  153. ${LOAD:%.$O=%.c}\
  154. ${BCOM:%.$O=%.c}\
  155. ${ETHER:%.$O=%.c}\
  156. $HFILES\
  157. l.s\
  158. noether.c\
  159. pbs.s\
  160. pbslba.s\
  161. mbr.s\
  162. x16.h\
  163. ureg.h\
  164. dosfs.h\
  165. fs.h\
  166. kfs.h\
  167. etherif.h\
  168. sd.h\
  169. ip.h\
  170. devfloppy.h\
  171. ${TARG:%=/386/%}\
  172. update:V:
  173. update $UPDATEFLAGS $UPDATE