Makefile 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. BINDIR ?= /usr/bin
  2. LIBDIR ?= /usr/lib
  3. SYSCONFDIR ?= /etc
  4. QUBESLIBDIR = $(LIBDIR)/qubes
  5. QUBESRPCCMDDIR = $(SYSCONFDIR)/qubes-rpc
  6. QUBESCONFDIR = $(SYSCONFDIR)/qubes
  7. QUBESRPCCONFDIR = $(QUBESCONFDIR)/rpc-config
  8. ifneq ($(DEBUG),0)
  9. DEBUG_FLAGS := -g
  10. endif
  11. CPPFLAGS := -I.
  12. CFLAGS := $(DEBUG_FLAGS) -O2 -Wall -Wextra -Werror -fPIC -pie $(CFLAGS)
  13. LDFLAGS := $(DEBUG_FLAGS) -pie $(LDFLAGS)
  14. LDLIBS := -lqubes-rpc-filecopy
  15. .PHONY: all clean install
  16. all: vm-file-editor qopen-in-vm qfile-agent qfile-unpacker tar2qfile
  17. vm-file-editor: vm-file-editor.o
  18. qopen-in-vm: qopen-in-vm.o gui-fatal.o
  19. qfile-agent: qfile-agent.o gui-fatal.o
  20. qfile-unpacker: qfile-unpacker.o gui-fatal.o
  21. tar2qfile: tar2qfile.o gui-fatal.o
  22. clean:
  23. -$(RM) qopen-in-vm qfile-agent qfile-unpacker tar2qfile vm-file-editor *.o
  24. install:
  25. install -d $(DESTDIR)$(BINDIR)
  26. install -t $(DESTDIR)$(BINDIR) \
  27. qubes-open \
  28. qvm-open-in-dvm qvm-open-in-vm qvm-run-vm qvm-sync-clock
  29. install -t $(DESTDIR)$(BINDIR) qvm-copy
  30. ln -s qvm-copy $(DESTDIR)$(BINDIR)/qvm-move-to-vm
  31. ln -s qvm-copy $(DESTDIR)$(BINDIR)/qvm-move
  32. ln -s qvm-copy $(DESTDIR)$(BINDIR)/qvm-copy-to-vm
  33. install -d $(DESTDIR)$(QUBESLIBDIR)
  34. install -t $(DESTDIR)$(QUBESLIBDIR) qvm-copy-to-vm.gnome
  35. ln -s qvm-copy-to-vm.gnome $(DESTDIR)$(QUBESLIBDIR)/qvm-move-to-vm.gnome
  36. ln -s qvm-copy-to-vm.gnome $(DESTDIR)$(QUBESLIBDIR)/qvm-copy-to-vm.kde
  37. ln -s qvm-copy-to-vm.gnome $(DESTDIR)$(QUBESLIBDIR)/qvm-move-to-vm.kde
  38. install -t $(DESTDIR)$(QUBESLIBDIR) \
  39. prepare-suspend resize-rootfs \
  40. qfile-agent qopen-in-vm qrun-in-vm qubes-sync-clock \
  41. tar2qfile vm-file-editor xdg-icon
  42. # Install qfile-unpacker as SUID, because it will fail to receive
  43. # files from other vm.
  44. install -t $(DESTDIR)$(QUBESLIBDIR) -m 4755 qfile-unpacker
  45. install -d $(DESTDIR)$(QUBESRPCCMDDIR)
  46. install -t $(DESTDIR)$(QUBESRPCCMDDIR) \
  47. qubes.Filecopy qubes.OpenInVM qubes.VMShell \
  48. qubes.VMRootShell \
  49. qubes.VMExec \
  50. qubes.OpenURL \
  51. qubes.SuspendPre qubes.SuspendPost qubes.GetAppmenus \
  52. qubes.SuspendPreAll \
  53. qubes.SuspendPostAll \
  54. qubes.WaitForSession \
  55. qubes.DetachPciDevice \
  56. qubes.Backup qubes.Restore \
  57. qubes.RegisterBackupLocation \
  58. qubes.RestoreById \
  59. qubes.SelectFile qubes.SelectDirectory \
  60. qubes.GetImageRGBA \
  61. qubes.SetDateTime \
  62. qubes.InstallUpdatesGUI \
  63. qubes.ResizeDisk \
  64. qubes.StartApp \
  65. qubes.PostInstall \
  66. qubes.GetDate \
  67. qubes.ShowInTerminal \
  68. qubes.ConnectTCP
  69. ln -s qubes.VMExec $(DESTDIR)$(QUBESRPCCMDDIR)/qubes.VMExecGUI
  70. for config in *.config; do \
  71. install -D -m 0644 "$$config" "$(DESTDIR)$(QUBESRPCCONFDIR)/$${config%.config}"; \
  72. done
  73. install -d $(DESTDIR)$(SYSCONFDIR)
  74. install -t $(DESTDIR)$(SYSCONFDIR) -m 0644 qubes-suspend-module-blacklist
  75. install -d $(DESTDIR)/etc/qubes/suspend-pre.d
  76. install -t $(DESTDIR)$(QUBESCONFDIR)/suspend-pre.d -m 0644 suspend-pre.d/README
  77. install -d $(DESTDIR)/etc/qubes/suspend-post.d
  78. install -t $(DESTDIR)$(QUBESCONFDIR)/suspend-post.d -m 0644 suspend-post.d/README
  79. install -t $(DESTDIR)$(QUBESCONFDIR)/suspend-post.d suspend-post.d/*.sh
  80. install -d $(DESTDIR)/etc/qubes/post-install.d
  81. install -t $(DESTDIR)$(QUBESCONFDIR)/post-install.d -m 0644 post-install.d/README
  82. install -t $(DESTDIR)$(QUBESCONFDIR)/post-install.d post-install.d/*.sh