Makefile 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. #
  2. # Toplevel makefile for OS/161.
  3. #
  4. #
  5. # Main rules:
  6. # all (default): depend and compile system; install into staging area
  7. # rebuild: likewise, but start with a clean slate.
  8. # fullrebuild: likewise, but start with a very clean slate.
  9. #
  10. # What all does, in order:
  11. # tools: depend and compile the tools used in build.
  12. # includes: install header files.
  13. # build: depend and compile the system.
  14. #
  15. # Other targets:
  16. # depend: just update make dependency information.
  17. # tags: generate/regenerate "tags" files.
  18. # install: install into $(OSTREE).
  19. # clean: remove generated files.
  20. # distclean: remove all generated files.
  21. #
  22. TOP=.
  23. .include "$(TOP)/mk/os161.config.mk"
  24. all:; # make this first
  25. MKDIRS=$(OSTREE)
  26. .include "$(TOP)/mk/os161.mkdirs.mk"
  27. all: tools .WAIT includes .WAIT build
  28. rebuild:
  29. $(MAKE) clean
  30. $(MAKE) all
  31. fullrebuild:
  32. $(MAKE) distclean
  33. $(MAKE) all
  34. # currently no tools required, hence no tools/ dir or work to do
  35. tools:
  36. @true
  37. build:
  38. (cd user && $(MAKE) build)
  39. (cd man && $(MAKE) install-staging)
  40. includes tags depend:
  41. (cd kern && $(MAKE) $@)
  42. (cd user && $(MAKE) $@)
  43. clean:
  44. (cd kern && $(MAKE) $@)
  45. (cd user && $(MAKE) $@)
  46. rm -rf $(INSTALLTOP)
  47. distclean: clean
  48. rm -rf $(WORKDIR)
  49. install: $(OSTREE)
  50. (cd $(INSTALLTOP) && tar -cf - .) | (cd $(OSTREE) && tar -xvf -)
  51. .PHONY: all rebuild fullrebuild tools build includes tags depend
  52. .PHONY: clean distclean
  53. # old BSD name, same as distclean
  54. cleandir: distclean
  55. .PHONY: cleandir