Makefile.am 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  1. # Copyright (c) 2012-2020 Red Hat, Inc.
  2. #
  3. # Authors: Jan Friesse (jfriesse@redhat.com)
  4. # Fabio M. Di Nitto (fdinitto@redhat.com)
  5. #
  6. # This software licensed under BSD license, the text of which follows:
  7. #
  8. # Redistribution and use in source and binary forms, with or without
  9. # modification, are permitted provided that the following conditions are met:
  10. #
  11. # - Redistributions of source code must retain the above copyright notice,
  12. # this list of conditions and the following disclaimer.
  13. # - Redistributions in binary form must reproduce the above copyright notice,
  14. # this list of conditions and the following disclaimer in the documentation
  15. # and/or other materials provided with the distribution.
  16. # - Neither the name of the Red Hat, Inc. nor the names of its
  17. # contributors may be used to endorse or promote products derived from this
  18. # software without specific prior written permission.
  19. #
  20. # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  21. # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  22. # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  23. # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
  24. # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  25. # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  26. # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  27. # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  28. # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  29. # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
  30. # THE POSSIBILITY OF SUCH DAMAGE.
  31. MAINTAINERCLEANFILES = Makefile.in
  32. SUBDIRS =
  33. bin_PROGRAMS =
  34. sbin_PROGRAMS =
  35. bin_SCRIPTS =
  36. sbin_SCRIPTS =
  37. EXTRA_DIST = corosync-qnetd-certutil.sh corosync-qdevice-net-certutil.sh
  38. if BUILD_QNETD
  39. bin_PROGRAMS += corosync-qnetd corosync-qnetd-tool
  40. bin_SCRIPTS += corosync-qnetd-certutil
  41. corosync_qnetd_SOURCES = corosync-qnetd.c \
  42. dynar.c dynar.h msg.c msg.h msgio.c msgio.h \
  43. nss-sock.c nss-sock.h qnetd-client.c qnetd-client.h \
  44. qnetd-client-list.c qnetd-client-list.h log.c log.h \
  45. pr-poll-array.c pr-poll-array.h timer-list.c timer-list.h tlv.c tlv.h \
  46. log-common.c log-common.h \
  47. send-buffer-list.c send-buffer-list.h node-list.c node-list.h \
  48. qnetd-algo-test.c qnetd-algo-test.h qnetd-algorithm.c qnetd-algorithm.h \
  49. qnetd-algo-utils.c qnetd-algo-utils.h \
  50. qnetd-algo-ffsplit.c qnetd-algo-ffsplit.h \
  51. qnetd-cluster.c qnetd-cluster.h \
  52. qnetd-cluster-list.c qnetd-cluster-list.h \
  53. qnetd-client-send.c qnetd-client-send.h \
  54. qnetd-algo-2nodelms.c qnetd-algo-2nodelms.h qnetd-algo-lms.c qnetd-algo-lms.h \
  55. utils.c utils.h qnetd-instance.c qnetd-instance.h \
  56. qnetd-client-net.c qnetd-client-net.h \
  57. qnetd-client-msg-received.c qnetd-client-msg-received.h \
  58. qnetd-log-debug.c qnetd-log-debug.h \
  59. qnetd-client-algo-timer.c qnetd-client-algo-timer.h \
  60. qnetd-client-dpd-timer.c qnetd-client-dpd-timer.h \
  61. qnetd-ipc.c qnetd-ipc.h unix-socket-ipc.c unix-socket-ipc.h \
  62. dynar-simple-lex.c dynar-simple-lex.h dynar-str.c dynar-str.h \
  63. unix-socket-client.c unix-socket-client.h \
  64. unix-socket-client-list.c unix-socket-client-list.h \
  65. unix-socket.c unix-socket.h qnetd-ipc-cmd.c qnetd-ipc-cmd.h \
  66. qnet-config.h dynar-getopt-lex.c \
  67. dynar-getopt-lex.h qnetd-advanced-settings.c qnetd-advanced-settings.h \
  68. pr-poll-loop.c pr-poll-loop.h
  69. corosync_qnetd_tool_SOURCES = corosync-qnetd-tool.c unix-socket.c unix-socket.h dynar.c dynar.h \
  70. dynar-str.c dynar-str.h utils.c utils.h
  71. corosync_qnetd_CFLAGS = $(nss_CFLAGS) $(libsystemd_CFLAGS)
  72. corosync_qnetd_LDADD = $(nss_LIBS) $(libsystemd_LIBS)
  73. corosync-qnetd-certutil: corosync-qnetd-certutil.sh
  74. sed -e 's#@''DATADIR@#${datadir}#g' \
  75. -e 's#@''BASHPATH@#${BASHPATH}#g' \
  76. -e 's#@''COROSYSCONFDIR@#${COROSYSCONFDIR}#g' \
  77. $< > $@
  78. endif
  79. if BUILD_QDEVICES
  80. sbin_PROGRAMS += corosync-qdevice corosync-qdevice-tool
  81. sbin_SCRIPTS += corosync-qdevice-net-certutil
  82. corosync_qdevice_SOURCES = corosync-qdevice.c \
  83. qdevice-cmap.c qdevice-cmap.h \
  84. qdevice-instance.c qdevice-instance.h node-list.c node-list.h \
  85. utils.c utils.h qdevice-log.c qdevice-log.h \
  86. log-common.c log-common.h \
  87. qdevice-votequorum.c qdevice-votequorum.h \
  88. qdevice-model.c qdevice-model.h qdevice-model-net.c qdevice-model-net.h \
  89. qdevice-net-instance.c qdevice-net-instance.h dynar.c dynar.h \
  90. send-buffer-list.c send-buffer-list.h timer-list.c timer-list.h \
  91. msg.c msg.h msgio.c msgio.h nss-sock.c nss-sock.h tlv.c tlv.h \
  92. unix-socket.c unix-socket.h unix-socket-client.c unix-socket-client.h \
  93. unix-socket-client-list.c unix-socket-client-list.h \
  94. unix-socket-ipc.c unix-socket-ipc.h qdevice-ipc.c qdevice-ipc.h \
  95. pr-poll-array.c pr-poll-array.h dynar-simple-lex.c dynar-simple-lex.h \
  96. dynar-str.c dynar-str.h qdevice-ipc-cmd.c qdevice-ipc-cmd.h \
  97. qdevice-net-ipc-cmd.c qdevice-net-ipc-cmd.h \
  98. qdevice-net-send.c qdevice-net-send.h \
  99. qdevice-net-votequorum.c qdevice-net-votequorum.h \
  100. qdevice-net-socket.c qdevice-net-socket.h \
  101. qdevice-net-nss.c qdevice-net-nss.h \
  102. qdevice-net-msg-received.c qdevice-net-msg-received.h \
  103. qdevice-net-cast-vote-timer.c qdevice-net-cast-vote-timer.h \
  104. qdevice-net-echo-request-timer.c qdevice-net-echo-request-timer.h \
  105. qdevice-net-algorithm.c qdevice-net-algorithm.h \
  106. qdevice-net-algo-test.c qdevice-net-algo-test.h \
  107. qdevice-net-algo-ffsplit.c qdevice-net-algo-ffsplit.h \
  108. qdevice-net-algo-2nodelms.c qdevice-net-algo-2nodelms.h \
  109. qdevice-net-algo-lms.c qdevice-net-algo-lms.h \
  110. qdevice-config.h qnet-config.h qdevice-net-disconnect-reason.h \
  111. qdevice-model-type.h qdevice-advanced-settings.c \
  112. qdevice-advanced-settings.h dynar-getopt-lex.c dynar-getopt-lex.h \
  113. qdevice-heuristics.h qdevice-heuristics.c \
  114. qdevice-heuristics-worker.h qdevice-heuristics-worker.c \
  115. qdevice-heuristics-io.h qdevice-heuristics-io.c \
  116. qdevice-heuristics-worker-instance.h \
  117. qdevice-heuristics-worker-log.h qdevice-heuristics-worker-log.c \
  118. qdevice-heuristics-log.h qdevice-heuristics-log.c \
  119. qdevice-heuristics-instance.h qdevice-heuristics-instance.c \
  120. qdevice-heuristics-mode.h qdevice-heuristics-mode.c \
  121. qdevice-heuristics-exec-list.c qdevice-heuristics-exec-list.h \
  122. qdevice-heuristics-cmd.c qdevice-heuristics-cmd.h \
  123. qdevice-heuristics-worker-cmd.c qdevice-heuristics-worker-cmd.h \
  124. qdevice-heuristics-cmd-str.h \
  125. qdevice-heuristics-exec-result.c qdevice-heuristics-exec-result.h \
  126. process-list.h process-list.c \
  127. qdevice-net-heuristics.c qdevice-net-heuristics.h \
  128. qdevice-heuristics-result-notifier.c qdevice-heuristics-result-notifier.h \
  129. log.c log.h pr-poll-loop.c pr-poll-loop.h \
  130. qdevice-pr-poll-loop-cb.c qdevice-pr-poll-loop-cb.h \
  131. qdevice-pr-poll-loop.c qdevice-pr-poll-loop.h
  132. corosync_qdevice_tool_SOURCES = corosync-qdevice-tool.c unix-socket.c unix-socket.h dynar.c dynar.h \
  133. dynar-str.c dynar-str.h utils.c utils.h
  134. corosync_qdevice_CFLAGS = $(nss_CFLAGS) $(libsystemd_CFLAGS) $(cmap_CFLAGS) \
  135. $(votequorum_CFLAGS) $(corosync_common_CFLAGS)
  136. corosync_qdevice_LDADD = $(nss_LIBS) $(libsystemd_LIBS) $(cmap_LIBS) \
  137. $(votequorum_LIBS) $(corosync_common_LIBS)
  138. corosync-qdevice-net-certutil: corosync-qdevice-net-certutil.sh
  139. sed -e 's#@''DATADIR@#${datadir}#g' \
  140. -e 's#@''BASHPATH@#${BASHPATH}#g' \
  141. -e 's#@''COROSYSCONFDIR@#${COROSYSCONFDIR}#g' \
  142. $< > $@
  143. TESTS = qnetd-cluster-list.test dynar.test dynar-simple-lex.test \
  144. dynar-getopt-lex.test process-list.test utils.test \
  145. log.test pr-poll-loop.test timer-list.test
  146. check_PROGRAMS = qnetd-cluster-list.test dynar.test dynar-simple-lex.test \
  147. dynar-getopt-lex.test process-list.test utils.test \
  148. log.test pr-poll-loop.test timer-list.test
  149. qnetd_cluster_list_test_SOURCES = test-qnetd-cluster-list.c qnetd-cluster-list.c qnetd-cluster-list.h \
  150. qnetd-cluster.c qnetd-cluster.h \
  151. qnetd-client-list.c qnetd-client-list.h \
  152. qnetd-client.c qnetd-client.h dynar.c dynar.h \
  153. node-list.c node-list.h send-buffer-list.c send-buffer-list.h
  154. qnetd_cluster_list_test_CFLAGS = $(nss_CFLAGS)
  155. qnetd_cluster_list_test_LDADD = $(nss_LIBS)
  156. dynar_test_SOURCES = test-dynar.c dynar.c dynar.h dynar-str.c dynar-str.h
  157. dynar_simple_lex_test_SOURCES = test-dynar-simple-lex.c dynar.c dynar.h dynar-str.c dynar-str.h \
  158. dynar-simple-lex.c dynar-simple-lex.h
  159. dynar_getopt_lex_test_SOURCES = test-dynar-getopt-lex.c dynar.c dynar.h dynar-str.c dynar-str.h \
  160. dynar-getopt-lex.c dynar-getopt-lex.h
  161. process_list_test_SOURCES = test-process-list.c dynar.c dynar.h dynar-str.c dynar-str.h \
  162. dynar-simple-lex.c dynar-simple-lex.h process-list.c process-list.h
  163. utils_test_SOURCES = test-utils.c utils.c utils.h
  164. log_test_SOURCES = test-log.c log.c log.h
  165. pr_poll_loop_test_SOURCES = test-pr-poll-loop.c pr-poll-loop.c pr-poll-loop.h \
  166. pr-poll-array.c pr-poll-array.h timer-list.c timer-list.h
  167. pr_poll_loop_test_CFLAGS = $(nss_CFLAGS)
  168. pr_poll_loop_test_LDADD = $(nss_LIBS)
  169. timer_list_test_SOURCES = test-timer-list.c timer-list.c timer-list.h
  170. timer_list_test_CFLAGS = $(nss_CFLAGS)
  171. timer_list_test_LDADD = $(nss_LIBS)
  172. endif
  173. clean-local:
  174. rm -rf $(bin_SCRIPTS) $(sbin_SCRIPTS)