mkfile 3.1 KB

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