Makefile.am 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  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. if BUILD_INSTALL_QNETD_IN_SBIN
  40. sbin_PROGRAMS += corosync-qnetd corosync-qnetd-tool
  41. sbin_SCRIPTS += corosync-qnetd-certutil
  42. else
  43. bin_PROGRAMS += corosync-qnetd corosync-qnetd-tool
  44. bin_SCRIPTS += corosync-qnetd-certutil
  45. endif
  46. corosync_qnetd_SOURCES = corosync-qnetd.c \
  47. dynar.c dynar.h msg.c msg.h msgio.c msgio.h \
  48. nss-sock.c nss-sock.h qnetd-client.c qnetd-client.h \
  49. qnetd-client-list.c qnetd-client-list.h log.c log.h \
  50. pr-poll-array.c pr-poll-array.h timer-list.c timer-list.h tlv.c tlv.h \
  51. log-common.c log-common.h \
  52. send-buffer-list.c send-buffer-list.h node-list.c node-list.h \
  53. qnetd-algo-test.c qnetd-algo-test.h qnetd-algorithm.c qnetd-algorithm.h \
  54. qnetd-algo-utils.c qnetd-algo-utils.h \
  55. qnetd-algo-ffsplit.c qnetd-algo-ffsplit.h \
  56. qnetd-cluster.c qnetd-cluster.h \
  57. qnetd-cluster-list.c qnetd-cluster-list.h \
  58. qnetd-client-send.c qnetd-client-send.h \
  59. qnetd-algo-2nodelms.c qnetd-algo-2nodelms.h qnetd-algo-lms.c qnetd-algo-lms.h \
  60. utils.c utils.h qnetd-instance.c qnetd-instance.h \
  61. qnetd-client-net.c qnetd-client-net.h \
  62. qnetd-client-msg-received.c qnetd-client-msg-received.h \
  63. qnetd-log-debug.c qnetd-log-debug.h \
  64. qnetd-client-algo-timer.c qnetd-client-algo-timer.h \
  65. qnetd-client-dpd-timer.c qnetd-client-dpd-timer.h \
  66. qnetd-ipc.c qnetd-ipc.h unix-socket-ipc.c unix-socket-ipc.h \
  67. dynar-simple-lex.c dynar-simple-lex.h dynar-str.c dynar-str.h \
  68. unix-socket-client.c unix-socket-client.h \
  69. unix-socket-client-list.c unix-socket-client-list.h \
  70. unix-socket.c unix-socket.h qnetd-ipc-cmd.c qnetd-ipc-cmd.h \
  71. qnet-config.h dynar-getopt-lex.c \
  72. dynar-getopt-lex.h qnetd-advanced-settings.c qnetd-advanced-settings.h \
  73. pr-poll-loop.c pr-poll-loop.h
  74. corosync_qnetd_tool_SOURCES = corosync-qnetd-tool.c unix-socket.c unix-socket.h dynar.c dynar.h \
  75. dynar-str.c dynar-str.h utils.c utils.h
  76. corosync_qnetd_CFLAGS = $(nss_CFLAGS) $(libsystemd_CFLAGS)
  77. corosync_qnetd_LDADD = $(nss_LIBS) $(libsystemd_LIBS)
  78. corosync-qnetd-certutil: corosync-qnetd-certutil.sh
  79. sed -e 's#@''DATADIR@#${datadir}#g' \
  80. -e 's#@''BASHPATH@#${BASHPATH}#g' \
  81. -e 's#@''COROSYSCONFDIR@#${COROSYSCONFDIR}#g' \
  82. $< > $@
  83. endif
  84. if BUILD_QDEVICES
  85. sbin_PROGRAMS += corosync-qdevice corosync-qdevice-tool
  86. sbin_SCRIPTS += corosync-qdevice-net-certutil
  87. corosync_qdevice_SOURCES = corosync-qdevice.c \
  88. qdevice-cmap.c qdevice-cmap.h \
  89. qdevice-instance.c qdevice-instance.h node-list.c node-list.h \
  90. utils.c utils.h qdevice-log.c qdevice-log.h \
  91. log-common.c log-common.h \
  92. qdevice-votequorum.c qdevice-votequorum.h \
  93. qdevice-model.c qdevice-model.h qdevice-model-net.c qdevice-model-net.h \
  94. qdevice-net-instance.c qdevice-net-instance.h dynar.c dynar.h \
  95. send-buffer-list.c send-buffer-list.h timer-list.c timer-list.h \
  96. msg.c msg.h msgio.c msgio.h nss-sock.c nss-sock.h tlv.c tlv.h \
  97. unix-socket.c unix-socket.h unix-socket-client.c unix-socket-client.h \
  98. unix-socket-client-list.c unix-socket-client-list.h \
  99. unix-socket-ipc.c unix-socket-ipc.h qdevice-ipc.c qdevice-ipc.h \
  100. pr-poll-array.c pr-poll-array.h dynar-simple-lex.c dynar-simple-lex.h \
  101. dynar-str.c dynar-str.h qdevice-ipc-cmd.c qdevice-ipc-cmd.h \
  102. qdevice-net-ipc-cmd.c qdevice-net-ipc-cmd.h \
  103. qdevice-net-send.c qdevice-net-send.h \
  104. qdevice-net-votequorum.c qdevice-net-votequorum.h \
  105. qdevice-net-socket.c qdevice-net-socket.h \
  106. qdevice-net-nss.c qdevice-net-nss.h \
  107. qdevice-net-msg-received.c qdevice-net-msg-received.h \
  108. qdevice-net-cast-vote-timer.c qdevice-net-cast-vote-timer.h \
  109. qdevice-net-echo-request-timer.c qdevice-net-echo-request-timer.h \
  110. qdevice-net-algorithm.c qdevice-net-algorithm.h \
  111. qdevice-net-algo-test.c qdevice-net-algo-test.h \
  112. qdevice-net-algo-ffsplit.c qdevice-net-algo-ffsplit.h \
  113. qdevice-net-algo-2nodelms.c qdevice-net-algo-2nodelms.h \
  114. qdevice-net-algo-lms.c qdevice-net-algo-lms.h \
  115. qdevice-config.h qnet-config.h qdevice-net-disconnect-reason.h \
  116. qdevice-model-type.h qdevice-advanced-settings.c \
  117. qdevice-advanced-settings.h dynar-getopt-lex.c dynar-getopt-lex.h \
  118. qdevice-heuristics.h qdevice-heuristics.c \
  119. qdevice-heuristics-worker.h qdevice-heuristics-worker.c \
  120. qdevice-heuristics-io.h qdevice-heuristics-io.c \
  121. qdevice-heuristics-worker-instance.h \
  122. qdevice-heuristics-worker-log.h qdevice-heuristics-worker-log.c \
  123. qdevice-heuristics-log.h qdevice-heuristics-log.c \
  124. qdevice-heuristics-instance.h qdevice-heuristics-instance.c \
  125. qdevice-heuristics-mode.h qdevice-heuristics-mode.c \
  126. qdevice-heuristics-exec-list.c qdevice-heuristics-exec-list.h \
  127. qdevice-heuristics-cmd.c qdevice-heuristics-cmd.h \
  128. qdevice-heuristics-worker-cmd.c qdevice-heuristics-worker-cmd.h \
  129. qdevice-heuristics-cmd-str.h \
  130. qdevice-heuristics-exec-result.c qdevice-heuristics-exec-result.h \
  131. process-list.h process-list.c \
  132. qdevice-net-heuristics.c qdevice-net-heuristics.h \
  133. qdevice-heuristics-result-notifier.c qdevice-heuristics-result-notifier.h \
  134. log.c log.h pr-poll-loop.c pr-poll-loop.h \
  135. qdevice-pr-poll-loop-cb.c qdevice-pr-poll-loop-cb.h \
  136. qdevice-pr-poll-loop.c qdevice-pr-poll-loop.h
  137. corosync_qdevice_tool_SOURCES = corosync-qdevice-tool.c unix-socket.c unix-socket.h dynar.c dynar.h \
  138. dynar-str.c dynar-str.h utils.c utils.h
  139. corosync_qdevice_CFLAGS = $(nss_CFLAGS) $(libsystemd_CFLAGS) $(cmap_CFLAGS) \
  140. $(votequorum_CFLAGS) $(corosync_common_CFLAGS)
  141. corosync_qdevice_LDADD = $(nss_LIBS) $(libsystemd_LIBS) $(cmap_LIBS) \
  142. $(votequorum_LIBS) $(corosync_common_LIBS)
  143. corosync-qdevice-net-certutil: corosync-qdevice-net-certutil.sh
  144. sed -e 's#@''DATADIR@#${datadir}#g' \
  145. -e 's#@''BASHPATH@#${BASHPATH}#g' \
  146. -e 's#@''COROSYSCONFDIR@#${COROSYSCONFDIR}#g' \
  147. $< > $@
  148. TESTS = qnetd-cluster-list.test dynar.test dynar-simple-lex.test \
  149. dynar-getopt-lex.test process-list.test utils.test \
  150. log.test pr-poll-loop.test timer-list.test
  151. check_PROGRAMS = qnetd-cluster-list.test dynar.test dynar-simple-lex.test \
  152. dynar-getopt-lex.test process-list.test utils.test \
  153. log.test pr-poll-loop.test timer-list.test
  154. qnetd_cluster_list_test_SOURCES = test-qnetd-cluster-list.c qnetd-cluster-list.c qnetd-cluster-list.h \
  155. qnetd-cluster.c qnetd-cluster.h \
  156. qnetd-client-list.c qnetd-client-list.h \
  157. qnetd-client.c qnetd-client.h dynar.c dynar.h \
  158. node-list.c node-list.h send-buffer-list.c send-buffer-list.h
  159. qnetd_cluster_list_test_CFLAGS = $(nss_CFLAGS)
  160. qnetd_cluster_list_test_LDADD = $(nss_LIBS)
  161. dynar_test_SOURCES = test-dynar.c dynar.c dynar.h dynar-str.c dynar-str.h
  162. dynar_simple_lex_test_SOURCES = test-dynar-simple-lex.c dynar.c dynar.h dynar-str.c dynar-str.h \
  163. dynar-simple-lex.c dynar-simple-lex.h
  164. dynar_getopt_lex_test_SOURCES = test-dynar-getopt-lex.c dynar.c dynar.h dynar-str.c dynar-str.h \
  165. dynar-getopt-lex.c dynar-getopt-lex.h
  166. process_list_test_SOURCES = test-process-list.c dynar.c dynar.h dynar-str.c dynar-str.h \
  167. dynar-simple-lex.c dynar-simple-lex.h process-list.c process-list.h
  168. utils_test_SOURCES = test-utils.c utils.c utils.h
  169. log_test_SOURCES = test-log.c log.c log.h
  170. pr_poll_loop_test_SOURCES = test-pr-poll-loop.c pr-poll-loop.c pr-poll-loop.h \
  171. pr-poll-array.c pr-poll-array.h timer-list.c timer-list.h
  172. pr_poll_loop_test_CFLAGS = $(nss_CFLAGS)
  173. pr_poll_loop_test_LDADD = $(nss_LIBS)
  174. timer_list_test_SOURCES = test-timer-list.c timer-list.c timer-list.h
  175. timer_list_test_CFLAGS = $(nss_CFLAGS)
  176. timer_list_test_LDADD = $(nss_LIBS)
  177. endif
  178. clean-local:
  179. rm -rf $(bin_SCRIPTS) $(sbin_SCRIPTS)