mkfile 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. CONF=pc
  2. CONFLIST=pc pccpu pcdisk pcauth pcblast
  3. objtype=386
  4. </$objtype/mkfile
  5. p=9
  6. DEVS=`{rc ../port/mkdevlist $CONF}
  7. PORT=\
  8. alarm.$O\
  9. alloc.$O\
  10. allocb.$O\
  11. auth.$O\
  12. cache.$O\
  13. chan.$O\
  14. dev.$O\
  15. fault.$O\
  16. latin1.$O\
  17. nulledf.$O\
  18. page.$O\
  19. parse.$O\
  20. pgrp.$O\
  21. portclock.$O\
  22. print.$O\
  23. proc.$O\
  24. qio.$O\
  25. qlock.$O\
  26. rebootcmd.$O\
  27. segment.$O\
  28. swap.$O\
  29. sysfile.$O\
  30. sysproc.$O\
  31. taslock.$O\
  32. tod.$O\
  33. xalloc.$O\
  34. OBJ=\
  35. l.$O\
  36. plan9l.$O\
  37. cga.$O\
  38. i8253.$O\
  39. i8259.$O\
  40. kbd.$O\
  41. main.$O\
  42. memory.$O\
  43. mmu.$O\
  44. random.$O\
  45. rdb.$O\
  46. trap.$O\
  47. $CONF.root.$O\
  48. $CONF.rootc.$O\
  49. $DEVS\
  50. $PORT\
  51. LIB=\
  52. /$objtype/lib/libmemlayer.a\
  53. /$objtype/lib/libmemdraw.a\
  54. /$objtype/lib/libdraw.a\
  55. /$objtype/lib/libc.a\
  56. /$objtype/lib/libsec.a\
  57. ETHER=`{echo devether.c ether*.c | sed 's/\.c/.'$O'/g'}
  58. VGA=`{echo devvga.c screen.c vga*.c | sed 's/\.c/.'$O'/g'}
  59. SDEV=`{echo devsd.c sd*.c | sed 's/\.c/.'$O'/g'}
  60. $p$CONF: $CONF.c $OBJ $LIB
  61. $CC $CFLAGS '-DKERNDATE='`{date -n} $CONF.c
  62. $LD -o $target -T0x80100020 -l $OBJ $CONF.$O $LIB
  63. size $target
  64. $p$CONF.gz: $p$CONF
  65. strip < $p$CONF | gzip -9 > $p$CONF.gz
  66. install:V: $p$CONF $p$CONF.gz
  67. cp $p$CONF $p$CONF.gz /$objtype/
  68. # import lookout / /n/lookout && cp $p$CONF $p$CONF.gz /n/lookout/$objtype/
  69. <../boot/bootmkfile
  70. <../port/portmkfile
  71. <|../port/mkbootrules $CONF
  72. $ETHER: etherif.h ../port/netif.h
  73. ether8003.$O ether8390.$O: ether8390.h
  74. $VGA mouse.$O: screen.h
  75. devfloppy.$O: floppy.h
  76. archmp.$O mp.$O: apbootstrap.h
  77. apic.$O archmp.$O mp.$O: mp.h
  78. $SDEV: ../port/sd.h
  79. sd53c8xx.$O: sd53c8xx.i
  80. main.$O: init.h reboot.h
  81. wavelan.$O: wavelan.c ../pc/wavelan.c ../pc/wavelan.h
  82. etherwavelan.$O: etherwavelan.c ../pc/wavelan.h
  83. devusb.$O usbuhci.$O usbohci.$O: usb.h
  84. sd53c8xx.i: sd53c8xx.n
  85. aux/na $prereq > $target
  86. init.h: ../port/initcode.c init9.c
  87. $CC ../port/initcode.c
  88. $CC init9.c
  89. $LD -l -R1 -o init.out init9.$O initcode.$O /386/lib/libc.a
  90. {echo 'uchar initcode[]={'
  91. strip < init.out | xd -1x |
  92. sed -e 's/^[0-9a-f]+ //' -e 's/ ([0-9a-f][0-9a-f])/0x\1,/g'
  93. echo '};'} > init.h
  94. reboot.h: rebootcode.s
  95. $AS rebootcode.s
  96. $LD -l -s -T0x1000 -R4 -o reboot.out rebootcode.$O
  97. {echo 'uchar rebootcode[]={'
  98. xd -1x reboot.out |
  99. sed -e '1,2d' -e 's/^[0-9a-f]+ //' -e 's/ ([0-9a-f][0-9a-f])/0x\1,/g'
  100. echo '};'} > reboot.h
  101. apbootstrap.h: apbootstrap.s mem.h
  102. $AS $prereq
  103. $LD -o apbootstrap.out -T0x80001000 -R4 -l -s apbootstrap.$O
  104. {echo 'uchar apbootstrap[]={'
  105. xd -1x apbootstrap.out |
  106. sed -e '1,2d' -e 's/^[0-9a-f]+ //' -e 's/ ([0-9a-f][0-9a-f])/0x\1,/g'
  107. echo '};'} > $target
  108. acid:V:
  109. 8c -a -w -I. ../port/qio.c>acid
  110. %.checkether:VQ:
  111. for (i in ether*.c){
  112. x=`{echo $i | sed 's/\.c//'}
  113. if(! ~ $x ether8390 && ! grep -s '^ '^$x^'([ ]|$)' $stem)
  114. echo $x not included in $stem
  115. }
  116. exit 0
  117. %.checkvga:VQ:
  118. for (i in vga*.c){
  119. x=`{echo $i | sed 's/\.c//'}
  120. if(! ~ $x vga vgax vgasavage && ! grep -s '^ '^$x^'([ ]|$)' $stem)
  121. echo $x not included in $stem
  122. }
  123. exit 0
  124. checkdist:VQ:
  125. for(i in pcdisk pcflop)
  126. for(j in checkvga checkether)
  127. mk $i.$j
  128. %.clean:V:
  129. rm -f $stem.c [9bz]$stem [9bz]$stem.gz boot$stem.*