portmkfile 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. PORTFILES=`{../port/mkfilelist ../port}
  2. ^($PORTFILES)\.$O:R: '../port/\1.c'
  3. $CC $CFLAGS -I. ../port/$stem1.c
  4. IPFILES=`{../port/mkfilelist ../ip}
  5. ^($IPFILES)\.$O:R: '../ip/\1.c' ../ip/ip.h
  6. $CC $CFLAGS -I. ../ip/$stem1.c
  7. %.$O: %.s
  8. $AS $AFLAGS $stem.s
  9. %.$O: %.c
  10. $CC $CFLAGS $stem.c
  11. %.acid: %.c
  12. $CC $CFLAGS -a $stem.c >$stem.acid
  13. %.acid: ../ip/%.c
  14. $CC $CFLAGS -a -I. ../ip/$stem.c >$stem.acid
  15. %.acid: ../port/%.c
  16. $CC $CFLAGS -a -I. ../port/$stem.c >$stem.acid
  17. installall:V:
  18. for(i in $CONFLIST)
  19. mk 'CONF='$i install
  20. all:V:
  21. for(i in $CONFLIST)
  22. mk 'CONF='$i
  23. clean:V:
  24. rm -f *.[$OS] *.root.s *.rootc.c cfs.h fs.h init.h conf.h *.out *.m errstr.h
  25. for(i in $CONFLIST $CRAPLIST)
  26. mk $i.clean
  27. %.clean:V:
  28. rm -f $stem.c [9bz]$stem [9bz]$stem.gz boot$stem.*
  29. %.$O: /$objtype/include/u.h ../port/lib.h mem.h dat.h fns.h io.h ../port/error.h ../port/portdat.h ../port/portfns.h
  30. ../port/systab.h: /sys/src/libc/9syscall/sys.h ../port/mksystab
  31. rc ../port/mksystab > ../port/systab.h
  32. $CONF.$O: $CONF.c
  33. $CC $CFLAGS '-DKERNDATE='`{date -n} $CONF.c
  34. $CONF.c: ../port/mkdevc $CONF
  35. rc ../port/mkdevc $CONF > $CONF.c
  36. errstr.h: ../port/mkerrstr ../port/error.h
  37. rc ../port/mkerrstr > errstr.h
  38. ../port/latin1.h: /lib/keyboard
  39. aux/mklatinkbd /lib/keyboard > ../port/latin1.h
  40. %.db: main.$O
  41. $CC -s$stem main.c | dbfmt > $stem.db
  42. alloc.$O: /sys/include/pool.h
  43. devmnt.$O: /sys/include/fcall.h
  44. proc.$O: errstr.h
  45. devroot.$O: errstr.h
  46. trap.$O: /$objtype/include/ureg.h
  47. devproc.$O: /$objtype/include/ureg.h
  48. main.$O: init.h
  49. trap.$O: ../port/systab.h
  50. devpipe.$O: ../port/netif.h
  51. netif.$O: ../port/netif.h
  52. devuart.$O: ../port/netif.h
  53. devmouse.$O: screen.h
  54. devdraw.$O: screen.h
  55. screen.$O: screen.h
  56. latin1.$O: ../port/latin1.h
  57. thwack.$O: ../port/thwack.h
  58. unthwack.$O: ../port/thwack.h
  59. devsdp.$O: ../port/thwack.h
  60. devproc.$O sysproc.$O: /sys/include/tos.h
  61. devproc.$O edf.$O proc.$O: /sys/include/trace.h
  62. boot$CONF.out: $CONF print.$O $BOOTDIR/boot.c $BOOTLIB
  63. $BOOTDIR/mkboot $CONF > boot$CONF.c
  64. $CC $CFLAGS boot$CONF.c
  65. $LD -o boot$CONF.out boot$CONF.$O $BOOTLIB