mconnect - KDE Connect protocol implementation in Vala/C
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

177 lines
4.2 KiB

  1. # This program is free software; you can redistribute it and/or modify
  2. # it under the terms of the GNU General Public License version 2 as
  3. # published by the Free Software Foundation.
  4. #
  5. # This program is distributed in the hope that it will be useful,
  6. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  7. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  8. # GNU General Public License for more details.
  9. #
  10. # You should have received a copy of the GNU General Public License along
  11. # with this program; if not, write to the Free Software Foundation, Inc.,
  12. # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  13. #
  14. # AUTHORS
  15. # Maciek Borzecki <maciek.borzecki (at] gmail.com>
  16. #
  17. # location of *.desktop file, usually /usr/share/applications
  18. applicationsdir = $(datadir)/applications
  19. applications_DATA = \
  20. mconnect.desktop
  21. mconnectdatadir = $(datadir)/mconnect
  22. mconnectdata_DATA = \
  23. mconnect.conf
  24. bin_PROGRAMS = \
  25. mconnect \
  26. mconnectctl
  27. noinst_PROGRAMS = \
  28. test-mconn-crypt \
  29. test-mconn-crypt-vala
  30. noinst_LTLIBRARIES = \
  31. libmconn-crypt.la
  32. VALAFLAGS = \
  33. --no-color \
  34. -g \
  35. --vapidir=vapi \
  36. --pkg=gio-2.0 \
  37. --pkg=json-glib-1.0 \
  38. --pkg=gee-0.8 \
  39. --pkg=libnotify \
  40. --pkg=posix \
  41. --pkg=gdk-3.0 \
  42. --pkg=atspi-2 \
  43. --vapidir=src/crypt
  44. #-------------------------------------------------------------
  45. mconnect_SOURCES = \
  46. src/mconnect/main.vala \
  47. src/mconnect/discovery.vala \
  48. src/mconnect/packet.vala \
  49. src/mconnect/device.vala \
  50. src/mconnect/discovereddevice.vala \
  51. src/mconnect/device-proxy.vala \
  52. src/mconnect/devicemanager.vala \
  53. src/mconnect/devicemanager-proxy.vala \
  54. src/mconnect/devicechannel.vala \
  55. src/mconnect/core.vala \
  56. src/mconnect/packethandlerinterface.vala \
  57. src/mconnect/packethandlerinterface-proxy.vala \
  58. src/mconnect/packethandlers.vala \
  59. src/mconnect/notification.vala \
  60. src/mconnect/battery.vala \
  61. src/mconnect/telephony.vala \
  62. src/mconnect/mousepad.vala \
  63. src/mconnect/ping.vala \
  64. src/mconnect/config.vala \
  65. src/mconnect/application.vala \
  66. src/mconnect/utils.vala
  67. mconnect_LDADD = \
  68. libmconn-crypt.la \
  69. $(MCONNECT_LIBS)
  70. mconnect_CFLAGS = \
  71. $(MCONNECT_CFLAGS) \
  72. -I$(top_srcdir)/src/crypt
  73. mconnect_VALAFLAGS = \
  74. --pkg=mconn-crypt
  75. #-------------------------------------------------------------
  76. libmconn_crypt_la_SOURCES = \
  77. src/crypt/mconn-crypt.c \
  78. src/crypt/mconn-crypt.h
  79. libmconn_crypt_la_CFLAGS = \
  80. $(MCONNECT_CFLAGS)
  81. libmconn_crypt_la_LIBADD = \
  82. $(MCONNECT_LIBS)
  83. #-------------------------------------------------------------
  84. test_mconn_crypt_SOURCES = \
  85. test/mconn-crypt-test.c
  86. test_mconn_crypt_LDADD = \
  87. $(MCONNECT_LIBS) \
  88. libmconn-crypt.la
  89. test_mconn_crypt_CFLAGS = \
  90. $(MCONNECT_CFLAGS) \
  91. -I$(top_srcdir)/src/crypt
  92. #-------------------------------------------------------------
  93. test_mconn_crypt_vala_SOURCES = \
  94. test/mconn-crypt-vala-test.vala
  95. test_mconn_crypt_vala_LDADD = \
  96. $(MCONNECT_LIBS) \
  97. libmconn-crypt.la
  98. test_mconn_crypt_vala_CFLAGS = \
  99. $(MCONNECT_CFLAGS) \
  100. -I$(top_srcdir)/src/crypt
  101. test_mconn_crypt_vala_VALAFLAGS = \
  102. --pkg=mconn-crypt
  103. #-------------------------------------------------------------
  104. mconnectctl_SOURCES = \
  105. src/mconnectctl/main.vala
  106. mconnectctl_LDADD = \
  107. $(MCONNECT_LIBS)
  108. mconnectctl_CFLAGS = \
  109. $(MCONNECT_CFLAGS)
  110. #-------------------------------------------------------------
  111. # configure will expand bindir to ${exec_prefix}/bin, we want the
  112. # whole thing, that's why mconnect.desktop is generated here and not
  113. # in configure
  114. do_desktop_subst = sed -e 's,[@]bindir[@],${bindir},g'
  115. mconnect.desktop: mconnect.desktop.in
  116. $(do_desktop_subst) < $< > $@
  117. #-------------------------------------------------------------
  118. REV ?= HEAD
  119. git-source-dist:
  120. gitsha=`git rev-list $(REV) -1`; \
  121. git archive --prefix=mconnect-$${gitsha}/ $(REV) | \
  122. gzip -c > mconnect-$${gitsha}.tar.gz
  123. #-------------------------------------------------------------
  124. run-gdb: gdb-script install
  125. gdb -x gdb-script
  126. .PHONY: run-gdb
  127. gdb-script: gdb-script.in
  128. sed -e 's,[@]bindir[@],${bindir},g' < $< > $@
  129. #-------------------------------------------------------------
  130. GEN_FROM_VALA = $(filter %.vala,$(mconnect_SOURCES))
  131. BUILT_SOURCES = \
  132. mconnect.desktop \
  133. $(GEN_FROM_VALA:.vala=.c)
  134. CLEANFILES = $(BUILT_SOURCES)