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