Makefile 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  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 = -O3 -Wall -fomit-frame-pointer -fPIC
  32. LDFLAGS =
  33. # Debug mode flags
  34. #CFLAGS = -g -Wall -fPIC
  35. ##-DDEBUG
  36. #LDFLAGS = -g -fPIC
  37. # Profile mode flags
  38. #CFLAGS = -O2 -pg -fPIC
  39. #LDFLAGS = -pg
  40. # Code Coverage with lcov flgs
  41. #CFLAGS = -ftest-coverage -fprofile-arcs
  42. #LDFLAGS = -g
  43. TOTEM_SRC = aispoll.c totemsrp.c totempg.c tlist.c hdb.c crypto.c
  44. TOTEM_OBJS = aispoll.o totemsrp.o totempg.o tlist.o hdb.o crypto.o
  45. EXEC_SRC = main.c clm.c amf.c ckpt.c evt.c evs.c parse.c print.c mempool.c \
  46. util.c
  47. EXEC_OBJS = main.o clm.o amf.o ckpt.o evt.o evs.o parse.o print.o mempool.o \
  48. util.o libtotem.a
  49. OBJS = $(TOTEM_OBJS) $(EXEC_OBJS)
  50. all:libtotem.a libtotem.so.1.0 aisexec keygen
  51. aisexec: $(EXEC_OBJS)
  52. $(CC) $(LDFLAGS) $(EXEC_OBJS) $(LIBS) -o aisexec
  53. libtotem.a: $(TOTEM_OBJS)
  54. $(AR) -rc libtotem.a $(TOTEM_OBJS)
  55. libtotem.so.1.0: $(TOTEM_OBJS)
  56. $(CC) -shared -Wl,-soname,libtotem.so.1 $(TOTEM_OBJS) -o $@
  57. rm -f libtotem.so.1 libtotem.so
  58. ln -s libtotem.so.1.0 libtotem.so.1
  59. ln -s libtotem.so.1.0 libtotem.so
  60. keygen: keygen.o
  61. $(CC) $(LDFLAGS) keygen.o -o keygen
  62. clean:
  63. rm -f aisexec $(OBJS) libtotem.so.1.0 libtotem.so.1 libtotem.so libtotem.a gmon.out keygen keygen.o *.da *.bb *.bbg
  64. depend:
  65. makedepend -Y -- $(CFLAGS) $(EXEC_SRC) $(TOTEM_SRC) > /dev/null 2>&1
  66. %.o: %.c
  67. $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
  68. # DO NOT DELETE
  69. main.o: ../include/ais_types.h ../include/ais_msg.h ../include/ais_types.h
  70. main.o: evs.h ../include/saClm.h ../include/ipc_gen.h ../include/list.h
  71. main.o: ../include/queue.h totempg.h aispoll.h totemsrp.h mempool.h parse.h
  72. main.o: main.h clm.h ../include/saClm.h amf.h handlers.h ckpt.h evt.h hdb.h
  73. main.o: ../include/saEvt.h swab.h print.h
  74. clm.o: ../include/ais_types.h ../include/saClm.h ../include/ais_types.h
  75. clm.o: ../include/ais_msg.h evs.h ../include/saClm.h ../include/ipc_gen.h
  76. clm.o: ../include/ipc_clm.h ../include/list.h ../include/queue.h aispoll.h
  77. clm.o: totempg.h totemsrp.h parse.h main.h clm.h amf.h handlers.h ckpt.h
  78. clm.o: evt.h hdb.h ../include/saEvt.h mempool.h print.h
  79. amf.o: ../include/ais_types.h ../include/ais_msg.h ../include/ais_types.h
  80. amf.o: evs.h ../include/saClm.h ../include/ipc_gen.h ../include/list.h
  81. amf.o: ../include/queue.h totempg.h aispoll.h totemsrp.h mempool.h util.h
  82. amf.o: parse.h main.h clm.h ../include/saClm.h amf.h handlers.h ckpt.h evt.h
  83. amf.o: hdb.h ../include/saEvt.h print.h
  84. ckpt.o: ../include/ais_types.h ../include/ais_msg.h ../include/ais_types.h
  85. ckpt.o: evs.h ../include/saClm.h ../include/ipc_gen.h ../include/list.h
  86. ckpt.o: ../include/queue.h aispoll.h mempool.h util.h parse.h totempg.h
  87. ckpt.o: totemsrp.h main.h clm.h ../include/saClm.h amf.h handlers.h ckpt.h
  88. ckpt.o: evt.h hdb.h ../include/saEvt.h print.h
  89. evt.o: ../include/ipc_evt.h ../include/ais_types.h ../include/saEvt.h
  90. evt.o: ../include/saClm.h ../include/ipc_gen.h ../include/list.h
  91. evt.o: ../include/queue.h util.h ../include/ais_types.h aispoll.h mempool.h
  92. evt.o: parse.h totempg.h totemsrp.h main.h evs.h clm.h ../include/saClm.h
  93. evt.o: amf.h ../include/ais_msg.h handlers.h ckpt.h evt.h hdb.h
  94. evt.o: ../include/saEvt.h swab.h print.h
  95. evs.o: ../include/ais_types.h ../include/ais_msg.h ../include/ais_types.h
  96. evs.o: evs.h ../include/saClm.h ../include/ipc_gen.h ../include/list.h
  97. evs.o: ../include/queue.h aispoll.h totempg.h totemsrp.h parse.h main.h clm.h
  98. evs.o: ../include/saClm.h amf.h handlers.h ckpt.h evt.h hdb.h
  99. evs.o: ../include/saEvt.h mempool.h print.h
  100. parse.o: ../include/ais_types.h ../include/list.h util.h parse.h aispoll.h
  101. parse.o: totempg.h totemsrp.h mempool.h print.h ../include/saClm.h
  102. parse.o: ../include/ais_types.h
  103. print.o: print.h ../include/ais_types.h ../include/saClm.h
  104. print.o: ../include/ais_types.h parse.h ../include/list.h aispoll.h totempg.h
  105. print.o: totemsrp.h
  106. mempool.o: ../include/list.h mempool.h
  107. util.o: ../include/ais_types.h ../include/list.h util.h
  108. aispoll.o: aispoll.h ../include/list.h hdb.h ../include/ais_types.h tlist.h
  109. totemsrp.o: aispoll.h totemsrp.h ../include/queue.h ../include/sq.h
  110. totemsrp.o: ../include/list.h hdb.h ../include/ais_types.h swab.h crypto.h
  111. totempg.o: totempg.h aispoll.h totemsrp.h swab.h
  112. tlist.o: ../include/list.h tlist.h
  113. hdb.o: hdb.h ../include/ais_types.h
  114. crypto.o: crypto.h