Makefile 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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 \
  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.OpenURL \
  50. qubes.SuspendPre qubes.SuspendPost qubes.GetAppmenus \
  51. qubes.SuspendPreAll \
  52. qubes.SuspendPostAll \
  53. qubes.WaitForSession \
  54. qubes.DetachPciDevice \
  55. qubes.Backup qubes.Restore \
  56. qubes.SelectFile qubes.SelectDirectory \
  57. qubes.GetImageRGBA \
  58. qubes.SetDateTime \
  59. qubes.InstallUpdatesGUI \
  60. qubes.ResizeDisk \
  61. qubes.StartApp \
  62. qubes.PostInstall \
  63. qubes.GetDate \
  64. qubes.ShowInTerminal \
  65. qubes.ConnectTCP
  66. for config in *.config; do \
  67. install -D -m 0644 "$$config" "$(DESTDIR)$(QUBESRPCCONFDIR)/$${config%.config}"; \
  68. done
  69. install -d $(DESTDIR)$(SYSCONFDIR)
  70. install -t $(DESTDIR)$(SYSCONFDIR) -m 0644 qubes-suspend-module-blacklist
  71. install -d $(DESTDIR)/etc/qubes/suspend-pre.d
  72. install -t $(DESTDIR)$(QUBESCONFDIR)/suspend-pre.d -m 0644 suspend-pre.d/README
  73. install -d $(DESTDIR)/etc/qubes/suspend-post.d
  74. install -t $(DESTDIR)$(QUBESCONFDIR)/suspend-post.d -m 0644 suspend-post.d/README
  75. install -t $(DESTDIR)$(QUBESCONFDIR)/suspend-post.d suspend-post.d/*.sh
  76. install -d $(DESTDIR)/etc/qubes/post-install.d
  77. install -t $(DESTDIR)$(QUBESCONFDIR)/post-install.d -m 0644 post-install.d/README
  78. install -t $(DESTDIR)$(QUBESCONFDIR)/post-install.d post-install.d/*.sh