Makefile 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. # Copyright (c) 2002-2004 MontaVista Software, Inc.
  2. #
  3. # All rights reserved.
  4. #
  5. # This software licensed under BSD license, the text of which follows:
  6. #
  7. # Redistribution and use in source and binary forms, with or without
  8. # modification, are permitted provided that the following conditions are met:
  9. #
  10. # - Redistributions of source code must retain the above copyright notice,
  11. # this list of conditions and the following disclaimer.
  12. # - Redistributions in binary form must reproduce the above copyright notice,
  13. # this list of conditions and the following disclaimer in the documentation
  14. # and/or other materials provided with the distribution.
  15. # - Neither the name of the MontaVista Software, Inc. nor the names of its
  16. # contributors may be used to endorse or promote products derived from this
  17. # software without specific prior written permission.
  18. #
  19. # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  20. # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  21. # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  22. # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
  23. # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  24. # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  25. # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  26. # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  27. # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  28. # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
  29. # THE POSSIBILITY OF SUCH DAMAGE.
  30. # Production mode flags
  31. #CFLAGS = -c -O3 -Wall -I../include
  32. #CFLAGS = -c -O3 -Wall -I../include
  33. #LDFLAGS = -L../lib
  34. #LIBRARIES= ../lib/libais.a ../lib/libevs.a
  35. #LIBS = $(LIBRARIES) -lpthread
  36. # Debug mode flags
  37. CFLAGS = -c -g -Wall -DDEBUG -I../include
  38. CPPFLAGS = -c -g -Wall -DDEBUG -I../include
  39. LDFLAGS = -g -L../lib
  40. LIBRARIES= ../lib/libais.a ../lib/libevs.a
  41. LIBS = $(LIBRARIES) -lpthread
  42. # Profile mode flags
  43. #CFLAGS = -c -O3 -pg -DDEBUG -I../include
  44. #LDFLAGS = -pg -L../lib
  45. #LIBRARIES= ../lib/libais.a ../lib/libevs.a
  46. #LIBS = $(LIBRARIES)
  47. EXTRA_CFLAGS = -I../include
  48. TEST_SRC = testclm.c testamf.c testamf1.c testamf2.c testamf3.c \
  49. testamf4.c testamf5.c testamf6.c testamfth.c \
  50. testckpt.c ckptstress.c testparse.c ckptbench.c \
  51. ckptbenchth.c testevt.c testevs.c evsbench.c \
  52. subscription.c publish.c evtbench.c \
  53. sa_error.c
  54. all: testclm testamf testamf1 testamf2 testamf3 testamf4 testamf5 \
  55. testamf6 testamfth testckpt ckptstress testparse ckptbench \
  56. ckptbenchth testevt testevs evsbench subscription publish evtbench
  57. testparse: testparse.o $(LIBRARIES)
  58. $(CC) $(LDFLAGS) -o testparse testparse.o ../exec/parse.o ../exec/print.o ../exec/mempool.o ../exec/util.o
  59. testtimer: testtimer.o $(LIBRARIES)
  60. $(CC) $(LDFLAGS) -o testtimer testtimer.o ../exec/timer.o
  61. testamf: testamf.o $(LIBRARIES)
  62. $(CC) $(LDFLAGS) -o testamf testamf.o $(LIBS)
  63. testamf1: testamf1.o $(LIBRARIES)
  64. $(CC) $(LDFLAGS) -o testamf1 testamf1.o $(LIBS)
  65. testamf2: testamf2.o $(LIBRARIES)
  66. $(CC) $(LDFLAGS) -o testamf2 testamf2.o $(LIBS)
  67. testamf3: testamf3.o $(LIBRARIES)
  68. $(CC) $(LDFLAGS) -o testamf3 testamf3.o $(LIBS)
  69. testamf4: testamf4.o $(LIBRARIES)
  70. $(CC) $(LDFLAGS) -o testamf4 testamf4.o $(LIBS)
  71. testamf5: testamf5.o $(LIBRARIES)
  72. $(CC) $(LDFLAGS) -o testamf5 testamf5.o $(LIBS)
  73. testamf6: testamf6.o $(LIBRARIES)
  74. $(CC) $(LDFLAGS) -o testamf6 testamf6.o $(LIBS)
  75. testamfth: testamfth.o $(LIBRARIES)
  76. $(CC) $(LDFLAGS) -o testamfth testamfth.o $(LIBS)
  77. testevt: testevt.o sa_error.o $(LIBRARIES)
  78. $(CC) $(LDFLAGS) -o testevt testevt.o sa_error.o $(LIBS)
  79. testevs: testevs.o $(LIBS)
  80. $(CC) $(LDFLAGS) -o testevs testevs.o $(LIBS)
  81. evsbench: evsbench.o $(LIBS)
  82. $(CC) $(LDFLAGS) -o evsbench evsbench.o $(LIBS)
  83. testclm: testclm.o $(LIBRARIES)
  84. $(CC) $(LDFLAGS) -o testclm testclm.o $(LIBS)
  85. testckpt: testckpt.o $(LIBRARIES)
  86. $(CC) $(LDFLAGS) -o testckpt testckpt.o $(LIBS)
  87. ckptbench: ckptbench.o $(LIBRARIES)
  88. $(CC) $(LDFLAGS) -o ckptbench ckptbench.o $(LIBS)
  89. ckptbenchth: ckptbenchth.o $(LIBRARIES)
  90. $(CC) $(LDFLAGS) -o ckptbenchth ckptbenchth.o $(LIBS)
  91. ckptstress: ckptstress.o $(LIBRARIES)
  92. $(CC) $(LDFLAGS) -o ckptstress ckptstress.o $(LIBS)
  93. subscription: subscription.o sa_error.o $(LIBRARIES)
  94. $(CC) $(LDFLAGS) -o subscription subscription.o sa_error.o $(LIBS)
  95. publish: publish.o sa_error.o $(LIBRARIES)
  96. $(CC) $(LDFLAGS) -o publish publish.o sa_error.o $(LIBS)
  97. evtbench: evtbench.o sa_error.o $(LIBRARIES)
  98. $(CC) $(LDFLAGS) -o evtbench evtbench.o sa_error.o $(LIBS)
  99. test: test.o $(LIBRARIES)
  100. g++ $(LDFLAGS) -o test test.o $(LIBS)
  101. clean:
  102. rm -f *.o testclm testamf testamf1 testamf2 testamf3 testamf4 \
  103. testamf5 testamf6 testamfth testckpt ckptstress testparse testtimer \
  104. ckptbench ckptbenchth testevt testevs \
  105. evsbench subscription publish evtbench
  106. %.o: %.c
  107. $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
  108. depend:
  109. makedepend -Y -- $(CFLAGS) $(TEST_SRC) > /dev/null 2>&1
  110. # DO NOT DELETE
  111. testclm.o: ../include/ais_types.h ../include/saClm.h
  112. testamf.o: ../include/ais_types.h ../include/ais_amf.h ../include/ais_msg.h
  113. testamf.o: ../include/evs.h
  114. testamf1.o: ../include/ais_types.h ../include/ais_amf.h
  115. testamf2.o: ../include/ais_types.h ../include/ais_amf.h
  116. testamf3.o: ../include/ais_types.h ../include/ais_amf.h
  117. testamf4.o: ../include/ais_types.h ../include/ais_amf.h
  118. testamf5.o: ../include/ais_types.h ../include/ais_amf.h
  119. testamf6.o: ../include/ais_types.h ../include/ais_amf.h
  120. testamfth.o: ../include/ais_types.h ../include/ais_amf.h ../include/ais_msg.h
  121. testamfth.o: ../include/evs.h
  122. testckpt.o: ../include/ais_types.h ../include/ais_ckpt.h
  123. ckptstress.o: ../include/ais_types.h ../include/ais_ckpt.h
  124. testparse.o: ../include/ais_types.h ../exec/parse.h ../include/list.h
  125. testparse.o: ../exec/aispoll.h ../exec/totemsrp.h ../exec/print.h
  126. ckptbench.o: ../include/ais_types.h ../include/ais_ckpt.h
  127. ckptbenchth.o: ../include/ais_types.h ../include/ais_ckpt.h
  128. testevt.o: ../include/ais_types.h ../include/ais_evt.h
  129. testevs.o: ../include/evs.h
  130. evsbench.o: ../include/ais_types.h ../include/evs.h
  131. subscription.o: ../include/ais_types.h ../include/ais_evt.h
  132. publish.o: ../include/ais_types.h ../include/ais_evt.h
  133. evtbench.o: ../include/ais_types.h ../include/ais_evt.h
  134. sa_error.o: ../include/ais_types.h