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.

182 lines
4.3 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=gio-unix-2.0 \
  38. --pkg=json-glib-1.0 \
  39. --pkg=gee-0.8 \
  40. --pkg=libnotify \
  41. --pkg=posix \
  42. --pkg=gdk-3.0 \
  43. --pkg=atspi-2 \
  44. --vapidir=src/crypt
  45. #-------------------------------------------------------------
  46. mconnect_SOURCES = \
  47. src/mconnect/main.vala \
  48. src/mconnect/discovery.vala \
  49. src/mconnect/packet.vala \
  50. src/mconnect/device.vala \
  51. src/mconnect/discovereddevice.vala \
  52. src/mconnect/device-proxy.vala \
  53. src/mconnect/devicemanager.vala \
  54. src/mconnect/devicemanager-proxy.vala \
  55. src/mconnect/devicechannel.vala \
  56. src/mconnect/core.vala \
  57. src/mconnect/packethandlerinterface.vala \
  58. src/mconnect/packethandlerinterface-proxy.vala \
  59. src/mconnect/packethandlers.vala \
  60. src/mconnect/packethandlers-proxy.vala \
  61. src/mconnect/notification.vala \
  62. src/mconnect/battery.vala \
  63. src/mconnect/battery-proxy.vala \
  64. src/mconnect/telephony.vala \
  65. src/mconnect/mousepad.vala \
  66. src/mconnect/ping.vala \
  67. src/mconnect/ping-proxy.vala \
  68. src/mconnect/config.vala \
  69. src/mconnect/application.vala \
  70. src/mconnect/utils.vala \
  71. src/mconnect/property-proxy.vala
  72. mconnect_LDADD = \
  73. libmconn-crypt.la \
  74. $(MCONNECT_LIBS)
  75. mconnect_CFLAGS = \
  76. $(MCONNECT_CFLAGS) \
  77. -I$(top_srcdir)/src/crypt
  78. mconnect_VALAFLAGS = \
  79. --pkg=mconn-crypt
  80. #-------------------------------------------------------------
  81. libmconn_crypt_la_SOURCES = \
  82. src/crypt/mconn-crypt.c \
  83. src/crypt/mconn-crypt.h
  84. libmconn_crypt_la_CFLAGS = \
  85. $(MCONNECT_CFLAGS)
  86. libmconn_crypt_la_LIBADD = \
  87. $(MCONNECT_LIBS)
  88. #-------------------------------------------------------------
  89. test_mconn_crypt_SOURCES = \
  90. test/mconn-crypt-test.c
  91. test_mconn_crypt_LDADD = \
  92. $(MCONNECT_LIBS) \
  93. libmconn-crypt.la
  94. test_mconn_crypt_CFLAGS = \
  95. $(MCONNECT_CFLAGS) \
  96. -I$(top_srcdir)/src/crypt
  97. #-------------------------------------------------------------
  98. test_mconn_crypt_vala_SOURCES = \
  99. test/mconn-crypt-vala-test.vala
  100. test_mconn_crypt_vala_LDADD = \
  101. $(MCONNECT_LIBS) \
  102. libmconn-crypt.la
  103. test_mconn_crypt_vala_CFLAGS = \
  104. $(MCONNECT_CFLAGS) \
  105. -I$(top_srcdir)/src/crypt
  106. test_mconn_crypt_vala_VALAFLAGS = \
  107. --pkg=mconn-crypt
  108. #-------------------------------------------------------------
  109. mconnectctl_SOURCES = \
  110. src/mconnectctl/main.vala
  111. mconnectctl_LDADD = \
  112. $(MCONNECT_LIBS)
  113. mconnectctl_CFLAGS = \
  114. $(MCONNECT_CFLAGS)
  115. #-------------------------------------------------------------
  116. # configure will expand bindir to ${exec_prefix}/bin, we want the
  117. # whole thing, that's why mconnect.desktop is generated here and not
  118. # in configure
  119. do_desktop_subst = sed -e 's,[@]bindir[@],${bindir},g'
  120. mconnect.desktop: mconnect.desktop.in
  121. $(do_desktop_subst) < $< > $@
  122. #-------------------------------------------------------------
  123. REV ?= HEAD
  124. git-source-dist:
  125. gitsha=`git rev-list $(REV) -1`; \
  126. git archive --prefix=mconnect-$${gitsha}/ $(REV) | \
  127. gzip -c > mconnect-$${gitsha}.tar.gz
  128. #-------------------------------------------------------------
  129. run-gdb: gdb-script install
  130. gdb -x gdb-script
  131. .PHONY: run-gdb
  132. gdb-script: gdb-script.in
  133. sed -e 's,[@]bindir[@],${bindir},g' < $< > $@
  134. #-------------------------------------------------------------
  135. GEN_FROM_VALA = $(filter %.vala,$(mconnect_SOURCES))
  136. BUILT_SOURCES = \
  137. mconnect.desktop \
  138. $(GEN_FROM_VALA:.vala=.c)
  139. CLEANFILES = $(BUILT_SOURCES)