portmkfile 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. MKSHELL=$PLAN9/bin/rc
  2. %.$O: %.s
  3. $AS $AFLAGS -o $stem.o -c $stem.s
  4. %.$O: %.c
  5. $CC $CFLAGS -c $stem.c
  6. %.m: %.$O
  7. $LD -o $target -uX -l $prereq
  8. %.acid: %.c
  9. $CC $CFLAGS -a $stem.c >$stem.acid
  10. %.acid: ../ip/%.c
  11. $CC $CFLAGS -a -I. ../ip/$stem.c >$stem.acid
  12. %.acid: ../port/%.c
  13. $CC $CFLAGS -a -I. ../port/$stem.c >$stem.acid
  14. %.db: main.$O
  15. $CC -s$stem main.c | dbfmt > $stem.db
  16. %.$O: /$objtype/include/u.h
  17. %.$O: ../port/lib.h
  18. %.$O: mem.h
  19. %.$O: dat.h ../port/portdat.h
  20. %.$O: fns.h ../port/portfns.h
  21. alloc.$O: /sys/include/pool.h
  22. chan.$O: ../port/error.h
  23. dev.$O: ../port/error.h
  24. devcap.$O: ../port/error.h
  25. devcap.$O: /sys/include/libsec.h
  26. devcons.$O: /sys/include/authsrv.h /sys/include/pool.h
  27. devdup.$O: ../port/error.h
  28. devenv.$O: ../port/error.h
  29. devkprof.$O: ../port/error.h
  30. devmnt.$O: ../port/error.h
  31. devpipe.$O: ../port/error.h
  32. devprobe.$O: ../port/netif.h probe.h
  33. devproc.$O: ../port/error.h ../port/edf.h
  34. devproc.$O: /sys/include/tos.h /sys/include/trace.h /$objtype/include/ureg.h
  35. devsd.$O: ../port/error.h ../port/sd.h
  36. devsrv.$O: ../port/error.h
  37. devssl.$O: ../port/error.h
  38. devssl.$O: /sys/include/libsec.h
  39. devtab.$O: ../port/error.h
  40. devtls.$O: ../port/error.h
  41. devtls.$O: /sys/include/libsec.h
  42. devuart.$O: ../port/error.h
  43. devwd.$O: ../port/error.h
  44. edf.$O: ../port/error.h ../port/edf.h
  45. edf.$O: /sys/include/trace.h
  46. ethermii.$O: ../port/ethermii.h ../port/netif.h
  47. fault.$O: ../port/error.h
  48. image.$O: ../port/error.h
  49. initcode.$O: /sys/include/libc.h
  50. latin1.$O: ../port/latin1.h
  51. netif.$O: ../port/error.h ../port/netif.h
  52. parse.$O: ../port/error.h
  53. pgrp.$O: ../port/error.h
  54. portclock.$O: /$objtype/include/ureg.h
  55. proc.$O: ../port/error.h ../port/edf.h errstr.h
  56. proc.$O: /sys/include/trace.h
  57. qio.$O: ../port/error.h
  58. rdb.$O: /$objtype/include/ureg.h
  59. rebootcmd.$O: ../port/error.h
  60. rebootcmd.$O: /sys/include/a.out.h
  61. segment.$O: ../port/error.h
  62. swap.$O: ../port/error.h
  63. sysauth.$O: ../port/error.h
  64. sysauth.$O: /sys/include/authsrv.h
  65. sysfile.$O: ../port/error.h
  66. sysproc.$O: ../port/error.h ../port/edf.h
  67. sysproc.$O: /sys/include/a.out.h
  68. sysseg.$O: ../port/error.h
  69. taslock.$O: ../port/edf.h
  70. ../port/latin1.h: /lib/keyboard
  71. aux/mklatinkbd /lib/keyboard > $target
  72. ../port/systab.c: ../mk/parse /sys/src/libc/9syscall/sys.h
  73. awk -f ../mk/parse -- -mksystab /sys/src/libc/9syscall/sys.h $CONF > $target
  74. systab.$O: ../port/systab.c
  75. $CC $CFLAGS -I. -c ../port/systab.c
  76. errstr.h: ../mk/parse ../port/error.h
  77. awk -f ../mk/parse -- -mkerrstr > $target
  78. init.h: init.out
  79. {echo 'unsigned char initcode[]={'
  80. xd -1x $prereq | sed -e 's/^[0-9a-f]+ //' -e 's/ ([0-9a-f][0-9a-f])/0x\1,/g'
  81. echo '};'} > init.h
  82. $CONF.$O: $CONF.c
  83. $CC $CFLAGS '-DKERNDATE='`{date -n} -c $CONF.c
  84. $CONF.c: ../mk/parse $CONF
  85. awk -f ../mk/parse -- -mkdevc $CONF > $CONF.c
  86. ./root/$O.%: ./root/%.c
  87. @{cd ./root; mk $O.$stem}
  88. ../root/$O.%: ../root/%.c
  89. @{cd ../root; mk $O.$stem}
  90. all:V:
  91. for(i in $CONFLIST)
  92. mk 'CONF='$i
  93. installall:V:
  94. for(i in $CONFLIST)
  95. mk 'CONF='$i install
  96. %.clean:V:
  97. rm -f $stem.c [9bz]$stem [9bz]$stem.gz boot$stem.*
  98. clean:V:
  99. rm -f *.[$OS] *.root.[cs] *.out *.m *.acid errstr.h init.h $objtype^l.h
  100. for(i in $CONFLIST)
  101. mk $i.clean
  102. @{cd ../root; mk clean}
  103. if(test -d ./root) @{cd ./root; mk clean}; status=''
  104. nuke:V: clean
  105. rm -f ../boot/libboot.a *.elf *.rr
  106. @{cd ../root; mk clean nuke}
  107. if(test -d ./root) @{cd ./root; mk clean nuke}; status=''