Makefile 6.6 KB

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