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.

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