mkfile 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. CONF=pc
  2. CONFLIST=pc pccpu pcdisk pcauth
  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. $DEVS\
  48. $PORT\
  49. LIB=\
  50. /$objtype/lib/libmemlayer.a\
  51. /$objtype/lib/libmemdraw.a\
  52. /$objtype/lib/libdraw.a\
  53. /$objtype/lib/libc.a\
  54. /$objtype/lib/libsec.a\
  55. ETHER=`{echo devether.c ether*.c | sed 's/\.c/.'$O'/g'}
  56. VGA=`{echo devvga.c screen.c vga*.c | sed 's/\.c/.'$O'/g'}
  57. SDEV=`{echo devsd.c sd*.c | sed 's/\.c/.'$O'/g'}
  58. $p$CONF: $CONF.c $OBJ $LIB
  59. $CC $CFLAGS '-DKERNDATE='`{date -n} $CONF.c
  60. $LD -o $target -T0x80100020 -l $OBJ $CONF.$O $LIB
  61. size $target
  62. $p$CONF.gz: $p$CONF
  63. strip < $p$CONF | gzip -9 > $p$CONF.gz
  64. install:V: $p$CONF $p$CONF.gz
  65. cp $p$CONF $p$CONF.gz /$objtype/
  66. # import lookout / /n/lookout && cp $p$CONF $p$CONF.gz /n/lookout/$objtype/
  67. <../boot/bootmkfile
  68. <../port/portmkfile
  69. <|../port/mkbootrules $CONF
  70. $ETHER: etherif.h ../port/netif.h
  71. ether8003.$O ether8390.$O: ether8390.h
  72. $VGA mouse.$O: screen.h
  73. devfloppy.$O: floppy.h
  74. archmp.$O mp.$O: apbootstrap.h
  75. apic.$O archmp.$O mp.$O: mp.h
  76. $SDEV: ../port/sd.h
  77. sd53c8xx.$O: sd53c8xx.i
  78. main.$O: init.h reboot.h
  79. wavelan.$O: wavelan.c ../pc/wavelan.c ../pc/wavelan.h
  80. etherwavelan.$O: etherwavelan.c ../pc/wavelan.h
  81. devusb.$O usbuhci.$O usbohci.$O: usb.h
  82. sd53c8xx.i: sd53c8xx.n
  83. aux/na $prereq > $target
  84. init.h: ../port/initcode.c init9.c
  85. $CC ../port/initcode.c
  86. $CC init9.c
  87. $LD -l -R1 -o init.out init9.$O initcode.$O /386/lib/libc.a
  88. {echo 'uchar initcode[]={'
  89. strip < init.out | xd -1x |
  90. sed -e 's/^[0-9a-f]+ //' -e 's/ ([0-9a-f][0-9a-f])/0x\1,/g'
  91. echo '};'} > init.h
  92. reboot.h: rebootcode.s
  93. $AS rebootcode.s
  94. $LD -l -s -T0x1000 -R4 -o reboot.out rebootcode.$O
  95. {echo 'uchar rebootcode[]={'
  96. xd -1x reboot.out |
  97. sed -e '1,2d' -e 's/^[0-9a-f]+ //' -e 's/ ([0-9a-f][0-9a-f])/0x\1,/g'
  98. echo '};'} > reboot.h
  99. apbootstrap.h: apbootstrap.s mem.h
  100. $AS $prereq
  101. $LD -o apbootstrap.out -T0x80001000 -R4 -l -s apbootstrap.$O
  102. {echo 'uchar apbootstrap[]={'
  103. xd -1x apbootstrap.out |
  104. sed -e '1,2d' -e 's/^[0-9a-f]+ //' -e 's/ ([0-9a-f][0-9a-f])/0x\1,/g'
  105. echo '};'} > $target
  106. acid:V:
  107. 8c -a -w -I. ../port/qio.c>acid
  108. %.checkether:VQ:
  109. for (i in ether*.c){
  110. x=`{echo $i | sed 's/\.c//'}
  111. if(! ~ $x ether8390 && ! grep -s '^ '^$x^'([ ]|$)' $stem)
  112. echo $x not included in $stem
  113. }
  114. exit 0
  115. %.checkvga:VQ:
  116. for (i in vga*.c){
  117. x=`{echo $i | sed 's/\.c//'}
  118. if(! ~ $x vga vgax vgasavage && ! grep -s '^ '^$x^'([ ]|$)' $stem)
  119. echo $x not included in $stem
  120. }
  121. exit 0
  122. checkdist:VQ:
  123. for(i in pcdisk pcflop)
  124. for(j in checkvga checkether)
  125. mk $i.$j