Makefile 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  1. # Copyright (c) 2002-2004 MontaVista Software, Inc.
  2. # Copyright (c) 2006-2007 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:
  11. #
  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.
  20. #
  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.
  32. # Include configuration
  33. #
  34. include ../Makefile.inc
  35. ifeq (${OPENAIS_COMPAT}, SOLARIS)
  36. override LDFLAGS += -lnsl -lsocket -lrt
  37. endif
  38. 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
  39. LIBS = $(LIBRARIES)
  40. override CFLAGS += -I../include
  41. override LDFLAGS += -L../lib
  42. EXTRA_CFLAGS = -I../include
  43. TEST_SRC = testclm.c testamf1.c \
  44. testamf4.c testamf5.c testamf6.c testamfth.c \
  45. testckpt.c ckptstress.c ckptbench.c \
  46. ckptbenchth.c testevt.c testevs.c evsbench.c \
  47. subscription.c publish.c evtbench.c \
  48. sa_error.c unlink.c testclm2.c testlck.c testmsg.c \
  49. logsys_s1.c logsys_s2.c logsys_s.c logsys_t1.c logsys_t2.c
  50. all: testclm testamf1 \
  51. testckpt ckptstress ckptbench \
  52. ckptbenchth ckpt-rd ckpt-wr testevt testevs \
  53. evsbench subscription publish evtbench unlink testclm2 testlck \
  54. testmsg testcpg testcpg2 cpgbench openais-cfgtool \
  55. logsys_s logsys_t1 logsys_t2
  56. testtimer: testtimer.o $(LIBRARIES)
  57. $(CC) $(LDFLAGS) -o testtimer testtimer.o ../exec/timer.o
  58. testamf: testamf.o $(LIBRARIES)
  59. $(CC) $(LDFLAGS) -o testamf testamf.o $(LIBS)
  60. testamf1: testamf1.o $(LIBRARIES)
  61. $(CC) $(LDFLAGS) -o testamf1 testamf1.o $(LIBS)
  62. testamf2: testamf2.o $(LIBRARIES)
  63. $(CC) $(LDFLAGS) -o testamf2 testamf2.o $(LIBS)
  64. testamf3: testamf3.o $(LIBRARIES)
  65. $(CC) $(LDFLAGS) -o testamf3 testamf3.o $(LIBS)
  66. testamf4: testamf4.o $(LIBRARIES)
  67. $(CC) $(LDFLAGS) -o testamf4 testamf4.o $(LIBS)
  68. testamf5: testamf5.o $(LIBRARIES)
  69. $(CC) $(LDFLAGS) -o testamf5 testamf5.o $(LIBS)
  70. testamf6: testamf6.o $(LIBRARIES)
  71. $(CC) $(LDFLAGS) -o testamf6 testamf6.o $(LIBS)
  72. testamfth: testamfth.o $(LIBRARIES)
  73. $(CC) $(LDFLAGS) -o testamfth testamfth.o $(LIBS)
  74. testevt: testevt.o sa_error.o $(LIBRARIES)
  75. $(CC) $(LDFLAGS) -o testevt testevt.o sa_error.o $(LIBS)
  76. testevs: testevs.o $(LIBS)
  77. $(CC) $(LDFLAGS) -o testevs testevs.o $(LIBS)
  78. testevsth: testevsth.o $(LIBS)
  79. $(CC) $(LDFLAGS) -o testevsth testevsth.o $(LIBS)
  80. evsbench: evsbench.o $(LIBS)
  81. $(CC) $(LDFLAGS) -o evsbench evsbench.o $(LIBS)
  82. testclm: testclm.o $(LIBRARIES)
  83. $(CC) $(LDFLAGS) -o testclm testclm.o $(LIBS)
  84. testckpt: testckpt.o sa_error.o $(LIBRARIES)
  85. $(CC) $(LDFLAGS) -o testckpt testckpt.o sa_error.o $(LIBS)
  86. ckptbench: ckptbench.o $(LIBRARIES)
  87. $(CC) $(LDFLAGS) -o ckptbench ckptbench.o sa_error.o $(LIBS)
  88. ckptbenchth: ckptbenchth.o $(LIBRARIES)
  89. $(CC) $(LDFLAGS) -o ckptbenchth ckptbenchth.o sa_error.o $(LIBS)
  90. ckptstress: ckptstress.o $(LIBRARIES)
  91. $(CC) $(LDFLAGS) -o ckptstress ckptstress.o $(LIBS)
  92. subscription: subscription.o sa_error.o $(LIBRARIES)
  93. $(CC) $(LDFLAGS) -o subscription subscription.o sa_error.o $(LIBS)
  94. publish: publish.o sa_error.o $(LIBRARIES)
  95. $(CC) $(LDFLAGS) -o publish publish.o sa_error.o $(LIBS)
  96. unlink: unlink.o sa_error.o $(LIBRARIES)
  97. $(CC) $(LDFLAGS) -o unlink unlink.o sa_error.o $(LIBS)
  98. evtbench: evtbench.o sa_error.o $(LIBRARIES)
  99. $(CC) $(LDFLAGS) -o evtbench evtbench.o sa_error.o $(LIBS)
  100. test: test.o $(LIBRARIES)
  101. g++ $(LDFLAGS) -o test test.o $(LIBS)
  102. ckpt-rd: ckpt-rd.o sa_error.o $(LIBRARIES)
  103. $(CC) $(LDFLAGS) -o ckpt-rd ckpt-rd.o sa_error.o $(LIBS)
  104. ckpt-wr: ckpt-wr.o sa_error.o $(LIBRARIES)
  105. $(CC) $(LDFLAGS) -o ckpt-wr ckpt-wr.o sa_error.o $(LIBS)
  106. testclm2: testclm2.o $(LIBRARIES)
  107. $(CC) $(LDFLAGS) -o testclm2 testclm2.o $(LIBS)
  108. testlck: testlck.o $(LIBRARIES)
  109. $(CC) $(LDFLAGS) -o testlck testlck.o $(LIBS)
  110. testmsg: testmsg.o $(LIBRARIES)
  111. $(CC) $(LDFLAGS) -o testmsg testmsg.o $(LIBS)
  112. testcpg: testcpg.o $(LIBRARIES)
  113. $(CC) $(LDFLAGS) -o testcpg testcpg.o $(LIBS)
  114. testcpg2: testcpg2.o $(LIBRARIES)
  115. $(CC) $(LDFLAGS) -o testcpg2 testcpg2.o $(LIBS)
  116. cpgbench: cpgbench.o $(LIBRARIES)
  117. $(CC) $(LDFLAGS) -o cpgbench cpgbench.o $(LIBS)
  118. openais-cfgtool: openais-cfgtool.o $(LIBRARIES)
  119. $(CC) $(LDFLAGS) -o openais-cfgtool openais-cfgtool.o $(LIBS)
  120. logsys_s: logsys_s.o logsys_s1.o logsys_s2.o ../exec/liblogsys.a
  121. $(CC) $(LDFLAGS) -o logsys_s logsys_s.o logsys_s1.o logsys_s2.o ../exec/liblogsys.a
  122. logsys_t1: logsys_t1.o ../exec/liblogsys.a
  123. $(CC) $(LDFLAGS) -o logsys_t1 logsys_t1.o ../exec/liblogsys.a
  124. logsys_t2: logsys_t2.o ../exec/liblogsys.a
  125. $(CC) $(LDFLAGS) -o logsys_t2 logsys_t2.o ../exec/liblogsys.a
  126. clean:
  127. rm -f *.o testclm testamf testamf1 testamf2 testamf3 testamf4 \
  128. testamf5 testamf6 testamfth testckpt ckptstress testtimer \
  129. ckptbench ckptbenchth testevt testevs ckpt-wr ckpt-rd \
  130. evsbench subscription publish evtbench unlink testmsg testcpg \
  131. testclm2 testlck
  132. %.o: %.c
  133. $(CC) $(CFLAGS) $(CPPFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
  134. depend:
  135. makedepend -Y -- $(CFLAGS) $(CPPFLAGS) $(TEST_SRC) > /dev/null 2>&1
  136. # DO NOT DELETE
  137. testclm.o: ../include/saAis.h ../include/saClm.h
  138. testamf.o: ../include/saAis.h ../include/saAmf.h ../include/saClm.h
  139. testamf1.o: ../include/saAis.h ../include/saAmf.h
  140. testamf2.o: ../include/saAis.h ../include/saAmf.h
  141. testamf3.o: ../include/saAis.h ../include/saAmf.h
  142. testamf4.o: ../include/saAis.h ../include/saAmf.h
  143. testamf5.o: ../include/saAis.h ../include/saAmf.h
  144. testamf6.o: ../include/saAis.h ../include/saAmf.h
  145. testamfth.o: ../include/saAis.h ../include/saAmf.h ../include/saClm.h
  146. testckpt.o: ../include/saAis.h ../include/saCkpt.h sa_error.h
  147. ckptstress.o: ../include/saAis.h ../include/saCkpt.h
  148. ckptbench.o: ../include/saAis.h ../include/saCkpt.h
  149. ckptbenchth.o: ../include/saAis.h ../include/saCkpt.h
  150. testevt.o: ../include/saAis.h ../include/saEvt.h
  151. testevs.o: ../include/evs.h
  152. evsbench.o: ../include/saAis.h ../include/evs.h
  153. subscription.o: ../include/saAis.h ../include/saEvt.h
  154. publish.o: ../include/saAis.h ../include/saEvt.h
  155. evtbench.o: ../include/saAis.h ../include/saEvt.h
  156. sa_error.o: ../include/saAis.h
  157. unlink.o: ../include/saAis.h ../include/saEvt.h