Makefile 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. RPMS_DIR=rpm/
  2. VERSION := $(shell cat version)
  3. DIST_DOM0 ?= fc18
  4. OS ?= Linux
  5. ifeq ($(OS),Linux)
  6. DATADIR ?= /var/lib/qubes
  7. STATEDIR ?= /var/run/qubes
  8. LOGDIR ?= /var/log/qubes
  9. FILESDIR ?= /usr/share/qubes
  10. else ifeq ($(OS),Windows_NT)
  11. DATADIR ?= c:/qubes
  12. STATEDIR ?= c:/qubes/state
  13. LOGDIR ?= c:/qubes/log
  14. FILESDIR ?= c:/program files/Invisible Things Lab/Qubes
  15. endif
  16. help:
  17. @echo "make rpms -- generate binary rpm packages"
  18. @echo "make rpms-dom0 -- generate binary rpm packages for Dom0"
  19. @echo "make update-repo-current -- copy newly generated rpms to qubes yum repo"
  20. @echo "make update-repo-current-testing -- same, but to -current-testing repo"
  21. @echo "make update-repo-unstable -- same, but to -testing repo"
  22. @echo "make update-repo-installer -- copy dom0 rpms to installer repo"
  23. @echo "make clean -- cleanup"
  24. rpms: rpms-dom0
  25. rpms-vm:
  26. @true
  27. rpms-dom0:
  28. rpmbuild --define "_rpmdir $(RPMS_DIR)" -bb rpm_spec/core-dom0.spec
  29. rpmbuild --define "_rpmdir $(RPMS_DIR)" -bb rpm_spec/core-dom0-doc.spec
  30. rpm --addsign \
  31. $(RPMS_DIR)/x86_64/qubes-core-dom0-$(VERSION)*.rpm \
  32. $(RPMS_DIR)/noarch/qubes-core-dom0-doc-$(VERSION)*rpm
  33. clean:
  34. make -C dispvm clean
  35. make -C qmemman clean
  36. all:
  37. make all -C core
  38. make all -C core-modules
  39. make all -C tests
  40. # Currently supported only on xen
  41. ifeq ($(BACKEND_VMM),xen)
  42. make all -C qmemman
  43. make all -C dispvm
  44. endif
  45. install:
  46. ifeq ($(OS),Linux)
  47. $(MAKE) install -C linux/systemd
  48. $(MAKE) install -C linux/aux-tools
  49. $(MAKE) install -C linux/system-config
  50. endif
  51. $(MAKE) install -C qvm-tools
  52. $(MAKE) install -C core
  53. $(MAKE) install -C core-modules
  54. $(MAKE) install -C tests
  55. ifeq ($(BACKEND_VMM),xen)
  56. # Currently supported only on xen
  57. $(MAKE) install -C qmemman
  58. $(MAKE) install -C dispvm
  59. endif
  60. mkdir -p $(DESTDIR)/etc/qubes-rpc/policy
  61. mkdir -p $(DESTDIR)/usr/libexec/qubes
  62. cp qubes-rpc-policy/qubes.Filecopy.policy $(DESTDIR)/etc/qubes-rpc/policy/qubes.Filecopy
  63. cp qubes-rpc-policy/qubes.OpenInVM.policy $(DESTDIR)/etc/qubes-rpc/policy/qubes.OpenInVM
  64. cp qubes-rpc-policy/qubes.VMShell.policy $(DESTDIR)/etc/qubes-rpc/policy/qubes.VMShell
  65. cp qubes-rpc-policy/qubes.NotifyUpdates.policy $(DESTDIR)/etc/qubes-rpc/policy/qubes.NotifyUpdates
  66. cp qubes-rpc-policy/qubes.NotifyTools.policy $(DESTDIR)/etc/qubes-rpc/policy/qubes.NotifyTools
  67. cp qubes-rpc-policy/qubes.GetImageRGBA.policy $(DESTDIR)/etc/qubes-rpc/policy/qubes.GetImageRGBA
  68. cp qubes-rpc/qubes.NotifyUpdates $(DESTDIR)/etc/qubes-rpc/
  69. cp qubes-rpc/qubes.NotifyTools $(DESTDIR)/etc/qubes-rpc/
  70. cp qubes-rpc/qubes-notify-updates $(DESTDIR)/usr/libexec/qubes/
  71. cp qubes-rpc/qubes-notify-tools $(DESTDIR)/usr/libexec/qubes/
  72. mkdir -p "$(DESTDIR)$(FILESDIR)"
  73. cp vm-config/$(BACKEND_VMM)-vm-template.xml "$(DESTDIR)$(FILESDIR)/vm-template.xml"
  74. cp vm-config/$(BACKEND_VMM)-vm-template-hvm.xml "$(DESTDIR)$(FILESDIR)/vm-template-hvm.xml"
  75. mkdir -p $(DESTDIR)$(DATADIR)
  76. mkdir -p $(DESTDIR)$(DATADIR)/vm-templates
  77. mkdir -p $(DESTDIR)$(DATADIR)/appvms
  78. mkdir -p $(DESTDIR)$(DATADIR)/servicevms
  79. mkdir -p $(DESTDIR)$(DATADIR)/vm-kernels
  80. mkdir -p $(DESTDIR)$(DATADIR)/backup
  81. mkdir -p $(DESTDIR)$(DATADIR)/dvmdata
  82. mkdir -p $(DESTDIR)$(STATEDIR)
  83. mkdir -p $(DESTDIR)$(LOGDIR)