Patch to remove segfault on the exiting of a service.
[openais.git] / test / Makefile
blobd1e587bd63ad35d528f5bde7d689969adef0c8c2
1 # Copyright (c) 2002-2004 MontaVista Software, Inc.
2 # Copyright (c) 2006-2008 Red Hat, Inc.
3 # Copyright (c) 2006 Sun Microsystems, Inc.
4 #
5 # All rights reserved.
6 #
7 # This software licensed under BSD license, the text of which follows:
8 #
9 # Redistribution and use in source and binary forms, with or without
10 # modification, are permitted provided that the following conditions are met:
12 # - Redistributions of source code must retain the above copyright notice,
13 # this list of conditions and the following disclaimer.
14 # - Redistributions in binary form must reproduce the above copyright notice,
15 # this list of conditions and the following disclaimer in the documentation
16 # and/or other materials provided with the distribution.
17 # - Neither the name of the MontaVista Software, Inc. nor the names of its
18 # contributors may be used to endorse or promote products derived from this
19 # software without specific prior written permission.
21 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22 # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
25 # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26 # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27 # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28 # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29 # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
31 # THE POSSIBILITY OF SUCH DAMAGE.
33 # Include configuration
35 include ../Makefile.inc
37 ifeq (${OPENAIS_COMPAT}, SOLARIS)
38 override LDFLAGS += -lnsl -lsocket -lrt
39 endif
41 LIBRARIES= ../lib/libSaClm.a ../lib/libSaAmf.a ../lib/libSaCkpt.a ../lib/libSaEvt.a ../lib/libSaLck.a ../lib/libSaMsg.a ../lib/libevs.a ../lib/libcpg.a ../lib/libcfg.a ../lib/libconfdb.a
42 LIBS = $(LIBRARIES)
43 BINARIES=testclm testamf1 \
44 testckpt ckptstress ckptbench \
45 ckptbenchth ckpt-rd ckpt-wr testevt testevs \
46 evsbench subscription publish evtbench unlink testclm2 testlck \
47 testmsg testcpg testcpg2 cpgbench testconfdb openais-cfgtool \
48 logsys_s logsys_t1 logsys_t2
50 override CFLAGS += -I../include
51 override LDFLAGS += -L../lib
53 EXTRA_CFLAGS = -I$(srcdir)include
54 TEST_SRC = testclm.c testamf1.c \
55 testamf4.c testamf5.c testamf6.c testamfth.c \
56 testckpt.c ckptstress.c ckptbench.c \
57 ckptbenchth.c testevt.c testevs.c evsbench.c \
58 subscription.c publish.c evtbench.c \
59 sa_error.c unlink.c testclm2.c testlck.c testmsg.c \
60 logsys_s1.c logsys_s2.c logsys_s.c logsys_t1.c logsys_t2.c
62 all: $(BINARIES)
64 testtimer: testtimer.o $(LIBRARIES)
65 $(CC) $(LDFLAGS) -o testtimer testtimer.o ../exec/timer.o
67 testamf: testamf.o $(LIBRARIES)
68 $(CC) $(LDFLAGS) -o testamf testamf.o $(LIBS)
70 testamf1: testamf1.o $(LIBRARIES)
71 $(CC) $(LDFLAGS) -o testamf1 testamf1.o $(LIBS)
73 testamf2: testamf2.o $(LIBRARIES)
74 $(CC) $(LDFLAGS) -o testamf2 testamf2.o $(LIBS)
76 testamf3: testamf3.o $(LIBRARIES)
77 $(CC) $(LDFLAGS) -o testamf3 testamf3.o $(LIBS)
79 testamf4: testamf4.o $(LIBRARIES)
80 $(CC) $(LDFLAGS) -o testamf4 testamf4.o $(LIBS)
82 testamf5: testamf5.o $(LIBRARIES)
83 $(CC) $(LDFLAGS) -o testamf5 testamf5.o $(LIBS)
85 testamf6: testamf6.o $(LIBRARIES)
86 $(CC) $(LDFLAGS) -o testamf6 testamf6.o $(LIBS)
88 testamfth: testamfth.o $(LIBRARIES)
89 $(CC) $(LDFLAGS) -o testamfth testamfth.o $(LIBS)
91 testevt: testevt.o sa_error.o $(LIBRARIES)
92 $(CC) $(LDFLAGS) -o testevt testevt.o sa_error.o $(LIBS)
94 testevs: testevs.o $(LIBS)
95 $(CC) $(LDFLAGS) -o testevs testevs.o $(LIBS)
97 testevsth: testevsth.o $(LIBS)
98 $(CC) $(LDFLAGS) -o testevsth testevsth.o $(LIBS)
100 evsbench: evsbench.o $(LIBS)
101 $(CC) $(LDFLAGS) -o evsbench evsbench.o $(LIBS)
103 testclm: testclm.o $(LIBRARIES)
104 $(CC) $(LDFLAGS) -o testclm testclm.o $(LIBS)
106 testckpt: testckpt.o sa_error.o $(LIBRARIES)
107 $(CC) $(LDFLAGS) -o testckpt testckpt.o sa_error.o $(LIBS)
109 ckptbench: ckptbench.o sa_error.o $(LIBRARIES)
110 $(CC) $(LDFLAGS) -o ckptbench ckptbench.o sa_error.o $(LIBS)
112 ckptbenchth: ckptbenchth.o sa_error.o $(LIBRARIES)
113 $(CC) $(LDFLAGS) -o ckptbenchth ckptbenchth.o sa_error.o $(LIBS)
115 ckptstress: ckptstress.o $(LIBRARIES)
116 $(CC) $(LDFLAGS) -o ckptstress ckptstress.o $(LIBS)
118 subscription: subscription.o sa_error.o $(LIBRARIES)
119 $(CC) $(LDFLAGS) -o subscription subscription.o sa_error.o $(LIBS)
121 publish: publish.o sa_error.o $(LIBRARIES)
122 $(CC) $(LDFLAGS) -o publish publish.o sa_error.o $(LIBS)
124 unlink: unlink.o sa_error.o $(LIBRARIES)
125 $(CC) $(LDFLAGS) -o unlink unlink.o sa_error.o $(LIBS)
127 evtbench: evtbench.o sa_error.o $(LIBRARIES)
128 $(CC) $(LDFLAGS) -o evtbench evtbench.o sa_error.o $(LIBS)
130 test: test.o $(LIBRARIES)
131 g++ $(LDFLAGS) -o test test.o $(LIBS)
133 ckpt-rd: ckpt-rd.o sa_error.o $(LIBRARIES)
134 $(CC) $(LDFLAGS) -o ckpt-rd ckpt-rd.o sa_error.o $(LIBS)
136 ckpt-wr: ckpt-wr.o sa_error.o $(LIBRARIES)
137 $(CC) $(LDFLAGS) -o ckpt-wr ckpt-wr.o sa_error.o $(LIBS)
139 testclm2: testclm2.o $(LIBRARIES)
140 $(CC) $(LDFLAGS) -o testclm2 testclm2.o $(LIBS)
142 testlck: testlck.o $(LIBRARIES)
143 $(CC) $(LDFLAGS) -o testlck testlck.o $(LIBS)
145 testmsg: testmsg.o $(LIBRARIES)
146 $(CC) $(LDFLAGS) -o testmsg testmsg.o $(LIBS)
148 testcpg: testcpg.o $(LIBRARIES)
149 $(CC) $(LDFLAGS) -o testcpg testcpg.o $(LIBS)
151 testcpg2: testcpg2.o $(LIBRARIES)
152 $(CC) $(LDFLAGS) -o testcpg2 testcpg2.o $(LIBS)
154 cpgbench: cpgbench.o $(LIBRARIES)
155 $(CC) $(LDFLAGS) -o cpgbench cpgbench.o $(LIBS)
157 testconfdb: testconfdb.o $(LIBRARIES)
158 $(CC) $(LDFLAGS) -o testconfdb testconfdb.o $(LIBS) -rdynamic
160 openais-cfgtool: openais-cfgtool.o $(LIBRARIES)
161 $(CC) $(LDFLAGS) -o openais-cfgtool openais-cfgtool.o $(LIBS)
163 logsys_s: logsys_s.o logsys_s1.o logsys_s2.o ../exec/liblogsys.a
164 $(CC) -o logsys_s logsys_s.o logsys_s1.o logsys_s2.o ../exec/liblogsys.a $(LDFLAGS)
166 logsys_t1: logsys_t1.o ../exec/liblogsys.a
167 $(CC) -o logsys_t1 logsys_t1.o ../exec/liblogsys.a $(LDFLAGS)
169 logsys_t2: logsys_t2.o ../exec/liblogsys.a
170 $(CC) -o logsys_t2 logsys_t2.o ../exec/liblogsys.a $(LDFLAGS)
172 clean:
173 rm -f *.o $(LIBRARIES) $(BINARIES)
175 %.o: %.c
176 $(CC) $(CFLAGS) $(CPPFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
178 depend:
179 makedepend -Y -- $(CFLAGS) $(CPPFLAGS) $(TEST_SRC) > /dev/null 2>&1
180 # DO NOT DELETE
182 testclm.o: ../include/saAis.h ../include/saClm.h
183 testamf.o: ../include/saAis.h ../include/saAmf.h ../include/saClm.h
184 testamf1.o: ../include/saAis.h ../include/saAmf.h
185 testamf2.o: ../include/saAis.h ../include/saAmf.h
186 testamf3.o: ../include/saAis.h ../include/saAmf.h
187 testamf4.o: ../include/saAis.h ../include/saAmf.h
188 testamf5.o: ../include/saAis.h ../include/saAmf.h
189 testamf6.o: ../include/saAis.h ../include/saAmf.h
190 testamfth.o: ../include/saAis.h ../include/saAmf.h ../include/saClm.h
191 testckpt.o: ../include/saAis.h ../include/saCkpt.h sa_error.h
192 ckptstress.o: ../include/saAis.h ../include/saCkpt.h
193 ckptbench.o: ../include/saAis.h ../include/saCkpt.h
194 ckptbenchth.o: ../include/saAis.h ../include/saCkpt.h
195 testevt.o: ../include/saAis.h ../include/saEvt.h
196 testevs.o: ../include/evs.h
197 evsbench.o: ../include/saAis.h ../include/evs.h
198 subscription.o: ../include/saAis.h ../include/saEvt.h
199 publish.o: ../include/saAis.h ../include/saEvt.h
200 evtbench.o: ../include/saAis.h ../include/saEvt.h
201 sa_error.o: ../include/saAis.h
202 unlink.o: ../include/saAis.h ../include/saEvt.h