Makefile 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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.SelectFile qubes.SelectDirectory \
  58. qubes.GetImageRGBA \
  59. qubes.SetDateTime \
  60. qubes.InstallUpdatesGUI \
  61. qubes.ResizeDisk \
  62. qubes.StartApp \
  63. qubes.PostInstall \
  64. qubes.GetDate \
  65. qubes.ShowInTerminal \
  66. qubes.ConnectTCP
  67. ln -s qubes.VMExec $(DESTDIR)$(QUBESRPCCMDDIR)/qubes.VMExecGUI
  68. for config in *.config; do \
  69. install -D -m 0644 "$$config" "$(DESTDIR)$(QUBESRPCCONFDIR)/$${config%.config}"; \
  70. done
  71. install -d $(DESTDIR)$(SYSCONFDIR)
  72. install -t $(DESTDIR)$(SYSCONFDIR) -m 0644 qubes-suspend-module-blacklist
  73. install -d $(DESTDIR)/etc/qubes/suspend-pre.d
  74. install -t $(DESTDIR)$(QUBESCONFDIR)/suspend-pre.d -m 0644 suspend-pre.d/README
  75. install -d $(DESTDIR)/etc/qubes/suspend-post.d
  76. install -t $(DESTDIR)$(QUBESCONFDIR)/suspend-post.d -m 0644 suspend-post.d/README
  77. install -t $(DESTDIR)$(QUBESCONFDIR)/suspend-post.d suspend-post.d/*.sh
  78. install -d $(DESTDIR)/etc/qubes/post-install.d
  79. install -t $(DESTDIR)$(QUBESCONFDIR)/post-install.d -m 0644 post-install.d/README
  80. install -t $(DESTDIR)$(QUBESCONFDIR)/post-install.d post-install.d/*.sh