Makefile 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  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. #LDFLAGS = -L../lib
  33. #LIBRARIES= ../lib/libais.a ../lib/libevs.a
  34. #LIBS = $(LIBRARIES) -lpthread
  35. # Debug mode flags
  36. CFLAGS = -c -g -Wall -DDEBUG -I../include
  37. LDFLAGS = -g -L../lib
  38. LIBRARIES= ../lib/libais.a ../lib/libevs.a
  39. LIBS = $(LIBRARIES) -lpthread
  40. # Profile mode flags
  41. #CFLAGS = -c -O3 -pg -DDEBUG -I../include
  42. #LDFLAGS = -pg -L../lib
  43. #LIBRARIES= ../lib/libais.a ../lib/libevs.a
  44. #LIBS = $(LIBRARIES)
  45. EXTRA_CFLAGS = -I../include
  46. TEST_SRC = testclm.c testamf.c testamf1.c testamf2.c testamf3.c \
  47. testamf4.c testamf5.c testamf6.c testamfth.c \
  48. testckpt.c ckptstress.c testparse.c ckptbench.c \
  49. ckptbenchth.c testevt.c testevs.c evsbench.c \
  50. subscription.c publish.c evtbench.c \
  51. sa_error.c
  52. all: testclm testamf testamf1 testamf2 testamf3 testamf4 testamf5 \
  53. testamf6 testamfth testckpt ckptstress testparse ckptbench \
  54. ckptbenchth testevt testevs evsbench subscription publish evtbench
  55. testparse: testparse.o $(LIBRARIES)
  56. $(CC) $(LDFLAGS) -o testparse testparse.o ../exec/parse.o ../exec/print.o ../exec/mempool.o
  57. testtimer: testtimer.o $(LIBRARIES)
  58. $(CC) $(LDFLAGS) -o testtimer testtimer.o ../exec/timer.o
  59. testamf: testamf.o $(LIBRARIES)
  60. $(CC) $(LDFLAGS) -o testamf testamf.o $(LIBS)
  61. testamf1: testamf1.o $(LIBRARIES)
  62. $(CC) $(LDFLAGS) -o testamf1 testamf1.o $(LIBS)
  63. testamf2: testamf2.o $(LIBRARIES)
  64. $(CC) $(LDFLAGS) -o testamf2 testamf2.o $(LIBS)
  65. testamf3: testamf3.o $(LIBRARIES)
  66. $(CC) $(LDFLAGS) -o testamf3 testamf3.o $(LIBS)
  67. testamf4: testamf4.o $(LIBRARIES)
  68. $(CC) $(LDFLAGS) -o testamf4 testamf4.o $(LIBS)
  69. testamf5: testamf5.o $(LIBRARIES)
  70. $(CC) $(LDFLAGS) -o testamf5 testamf5.o $(LIBS)
  71. testamf6: testamf6.o $(LIBRARIES)
  72. $(CC) $(LDFLAGS) -o testamf6 testamf6.o $(LIBS)
  73. testamfth: testamfth.o $(LIBRARIES)
  74. $(CC) $(LDFLAGS) -o testamfth testamfth.o $(LIBS)
  75. testevt: testevt.o sa_error.o $(LIBRARIES)
  76. $(CC) $(LDFLAGS) -o testevt testevt.o sa_error.o $(LIBS)
  77. testevs: testevs.o $(LIBS)
  78. $(CC) $(LDFLAGS) -o testevs testevs.o sa_error.o $(LIBS)
  79. evsbench: evsbench.o $(LIBS)
  80. $(CC) $(LDFLAGS) -o evsbench evsbench.o sa_error.o $(LIBS)
  81. testclm: testclm.o $(LIBRARIES)
  82. $(CC) $(LDFLAGS) -o testclm testclm.o $(LIBS)
  83. testckpt: testckpt.o $(LIBRARIES)
  84. $(CC) $(LDFLAGS) -o testckpt testckpt.o $(LIBS)
  85. ckptbench: ckptbench.o $(LIBRARIES)
  86. $(CC) $(LDFLAGS) -o ckptbench ckptbench.o $(LIBS)
  87. ckptbenchth: ckptbenchth.o $(LIBRARIES)
  88. $(CC) $(LDFLAGS) -o ckptbenchth ckptbenchth.o $(LIBS)
  89. ckptstress: ckptstress.o $(LIBRARIES)
  90. $(CC) $(LDFLAGS) -o ckptstress ckptstress.o $(LIBS)
  91. subscription: subscription.o sa_error.o $(LIBRARIES)
  92. $(CC) $(LDFLAGS) -o subscription subscription.o sa_error.o $(LIBS)
  93. publish: publish.o sa_error.o $(LIBRARIES)
  94. $(CC) $(LDFLAGS) -o publish publish.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. clean:
  98. rm -f *.o testclm testamf testamf1 testamf2 testamf3 testamf4 \
  99. testamf5 testamf6 testamfth testckpt ckptstress testparse testtimer \
  100. ckptbench ckptbenchth testevt testevs \
  101. evsbench subscription publish evtbench
  102. %.o: %.c
  103. $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
  104. depend:
  105. makedepend -Y -- $(CFLAGS) $(TEST_SRC) > /dev/null 2>&1
  106. # DO NOT DELETE
  107. testclm.o: ../include/ais_types.h ../include/ais_clm.h
  108. testamf.o: ../include/ais_types.h ../include/ais_amf.h ../include/ais_msg.h
  109. testamf.o: ../include/evs.h
  110. testamf1.o: ../include/ais_types.h ../include/ais_amf.h
  111. testamf2.o: ../include/ais_types.h ../include/ais_amf.h
  112. testamf3.o: ../include/ais_types.h ../include/ais_amf.h
  113. testamf4.o: ../include/ais_types.h ../include/ais_amf.h
  114. testamf5.o: ../include/ais_types.h ../include/ais_amf.h
  115. testamf6.o: ../include/ais_types.h ../include/ais_amf.h
  116. testamfth.o: ../include/ais_types.h ../include/ais_amf.h ../include/ais_msg.h
  117. testamfth.o: ../include/evs.h
  118. testckpt.o: ../include/ais_types.h ../include/ais_ckpt.h
  119. ckptstress.o: ../include/ais_types.h ../include/ais_ckpt.h
  120. testparse.o: ../include/ais_types.h ../exec/parse.h ../include/list.h
  121. testparse.o: ../exec/aispoll.h ../exec/gmi.h ../exec/print.h
  122. ckptbench.o: ../include/ais_types.h ../include/ais_ckpt.h
  123. ckptbenchth.o: ../include/ais_types.h ../include/ais_ckpt.h
  124. testevt.o: ../include/ais_types.h ../include/ais_evt.h
  125. testevs.o: ../include/evs.h
  126. evsbench.o: ../include/ais_types.h ../include/evs.h
  127. subscription.o: ../include/ais_types.h ../include/ais_evt.h
  128. publish.o: ../include/ais_types.h ../include/ais_evt.h
  129. evtbench.o: ../include/ais_types.h ../include/ais_evt.h
  130. sa_error.o: ../include/ais_types.h