portmkfile 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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 ../ip/ipv6.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 s[9bz]$stem boot$stem.* *.acid
  29. nuke:V: clean
  30. rm -f ../boot/libboot.a$O *.elf *.rr
  31. %.$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
  32. ../port/systab.h: /sys/src/libc/9syscall/sys.h ../port/mksystab
  33. rc ../port/mksystab > ../port/systab.h
  34. $CONF.$O: $CONF.c
  35. $CC $CFLAGS '-DKERNDATE='`{date -n} $CONF.c
  36. $CONF.c: ../port/mkdevc $CONF
  37. rc ../port/mkdevc $CONF > $CONF.c
  38. errstr.h: ../port/mkerrstr ../port/error.h
  39. rc ../port/mkerrstr > errstr.h
  40. ../port/latin1.h: /lib/keyboard
  41. aux/mklatinkbd /lib/keyboard > ../port/latin1.h
  42. %.db: main.$O
  43. $CC -s$stem main.c | dbfmt > $stem.db
  44. alloc.$O: /sys/include/pool.h
  45. devmnt.$O: /sys/include/fcall.h
  46. proc.$O: errstr.h
  47. devroot.$O: errstr.h
  48. trap.$O: /$objtype/include/ureg.h
  49. devproc.$O: /$objtype/include/ureg.h
  50. main.$O: init.h
  51. trap.$O: ../port/systab.h
  52. devpipe.$O: ../port/netif.h
  53. netif.$O: ../port/netif.h
  54. devuart.$O: ../port/netif.h
  55. devmouse.$O: screen.h
  56. devdraw.$O: screen.h
  57. screen.$O: screen.h
  58. latin1.$O: ../port/latin1.h
  59. thwack.$O: ../port/thwack.h
  60. unthwack.$O: ../port/thwack.h
  61. devsdp.$O: ../port/thwack.h
  62. devproc.$O sysproc.$O: /sys/include/tos.h
  63. devproc.$O edf.$O proc.$O: /sys/include/trace.h
  64. boot$CONF.out: $CONF print.$O $BOOTDIR/boot.c $BOOTLIB
  65. $BOOTDIR/mkboot $CONF > boot$CONF.c
  66. $CC $CFLAGS boot$CONF.c
  67. $CC $CFLAGS ../boot/printstub.c
  68. $LD -o boot$CONF.out boot$CONF.$O $BOOTLIB printstub.$O