| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242 |
- # Copyright (c) 2002-2006 MontaVista Software, Inc.
- #
- # All rights reserved.
- #
- # This software licensed under BSD license, the text of which follows:
- #
- # Redistribution and use in source and binary forms, with or without
- # modification, are permitted provided that the following conditions are met:
- #
- # - Redistributions of source code must retain the above copyright notice,
- # this list of conditions and the following disclaimer.
- # - Redistributions in binary form must reproduce the above copyright notice,
- # this list of conditions and the following disclaimer in the documentation
- # and/or other materials provided with the distribution.
- # - Neither the name of the MontaVista Software, Inc. nor the names of its
- # contributors may be used to endorse or promote products derived from this
- # software without specific prior written permission.
- #
- # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- # THE POSSIBILITY OF SUCH DAMAGE.
- # BUILD_DYNAMIC can be defined to 1 to build for dynamic loading of service
- # handler modules. If the developer intends to debug, building without
- # dynamic modules should provide an easier route.
- BUILD_DYNAMIC=1
- # Production mode flags
- CFLAGS = -O3 -Wall -fomit-frame-pointer
- LDFLAGS = -lpthread
- # Debug mode flags
- #CFLAGS = -g -Wall
- #LDFLAGS = -g -lpthread
- # Profile mode flags
- #CFLAGS = -O3 -pg
- #LDFLAGS = -pg -lpthread
- # Code Coverage with lcov flgs
- #CFLAGS = -ftest-coverage -fprofile-arcs
- #LDFLAGS = -g
- # Totem objects
- TOTEM_SRC = aispoll.c totemip.c totemnet.c totemrrp.c totemsrp.c totemmrp.c totempg.c totemconfig.c tlist.c crypto.c wthread.c
- TOTEM_OBJS = aispoll.o totemip.o totemnet.o totemrrp.o totemsrp.o totemmrp.o totempg.o totemconfig.o tlist.o crypto.o wthread.o
- EXEC_LIBS = libtotem_pg.a
- # service handler objects
- SERV_SRC = evs.c clm.c amf.c ckpt.c evt.c lck.c msg.c cfg.c
- SERV_OBJS = evs.o clm.o amf.o ckpt.o evt.o lck.o msg.o cfg.o
- # main executive objects
- MAIN_SRC = main.c print.c mempool.c \
- util.c sync.c ykd.c mainconfig.c amfconfig.o
- MAIN_OBJS = main.o print.o mempool.o \
- util.o sync.o ykd.o mainconfig.o amfconfig.o
- ifeq (${BUILD_DYNAMIC}, 1)
- EXEC_OBJS = $(TOTEM_OBJS) $(MAIN_OBJS)
- CFLAGS += -DBUILD_DYNAMIC=1 -fPIC
- LDFLAGS += -ldl -rdynamic
- EXEC_LIBS += ../lcr/lcr_ifact.o
- all:libtotem_pg.a libtotem_pg.so.1.0 ../lcr/lcr_ifact.o \
- service_evs.lcrso service_clm.lcrso service_amf.lcrso \
- service_ckpt.lcrso service_evt.lcrso service_lck.lcrso \
- service_msg.lcrso service_cfg.lcrso \
- aisexec keygen openais-instantiate
- else
- EXEC_OBJS = $(TOTEM_OBJS) $(MAIN_OBJS) $(SERV_OBJS)
- all: libtotem_pg.a aisexec keygen openais-instantiate
- endif
- service_evs.lcrso: evs.o
- $(CC) -shared -Wl,-soname,service_evs.lcrso evs.o -o $@
- service_clm.lcrso: clm.o
- $(CC) -shared -Wl,-soname,service_clm.lcrso clm.o -o $@
- service_amf.lcrso: amf.o
- $(CC) -shared -Wl,-soname,service_amf.lcrso amf.o -o $@
- service_ckpt.lcrso: ckpt.o
- $(CC) -shared -Wl,-soname,service_ckpt.lcrso ckpt.o -o $@
- service_evt.lcrso: evt.o
- $(CC) -shared -Wl,-soname,service_evt.lcrso evt.o -o $@
- service_lck.lcrso: lck.o
- $(CC) -shared -Wl,-soname,service_lck.lcrso lck.o -o $@
- service_msg.lcrso: msg.o
- $(CC) -shared -Wl,-soname,service_msg.lcrso msg.o -o $@
- service_cfg.lcrso: cfg.o
- $(CC) -shared -Wl,-soname,service_cfg.lcrso cfg.o -o $@
- aisexec: $(EXEC_OBJS) libtotem_pg.a
- $(CC) $(LDFLAGS) $(EXEC_OBJS) $(EXEC_LIBS) -o aisexec
- libtotem_pg.a: $(TOTEM_OBJS)
- $(AR) -rc libtotem_pg.a $(TOTEM_OBJS)
- libtotem_pg.so.1.0: $(TOTEM_OBJS)
- $(CC) -shared -Wl,-soname,libtotem_pg.so.1 $(TOTEM_OBJS) -o $@
- rm -f libtotem_pg.so.1 libtotem_pg.so
- ln -s libtotem_pg.so.1.0 libtotem_pg.so.1
- ln -s libtotem_pg.so.1.0 libtotem_pg.so
- keygen: keygen.o
- $(CC) $(LDFLAGS) keygen.o -o keygen
- openais-instantiate: openais-instantiate.o
- $(CC) $(LDFLAGS) openais-instantiate.o -o openais-instantiate
- clean:
- rm -f aisexec $(OBJS) *.o *.lcrso libtotem_pg.so.1.0 libtotem_pg.so.1 libtotem_pg.so libtotem_pg.a gmon.out keygen keygen.o openais-instantiate *.da *.bb *.bbg
- depend:
- makedepend -Y -- $(CFLAGS) $(EXEC_SRC) $(TOTEM_SRC) > /dev/null 2>&1
- # - fPIC rules required for service handler shared objects
- ../lcr/lcr_ifact.o: ../lcr/lcr_ifact.c
- $(CC) $(CFLAGS) -I../lcr -c -o $@ ../lcr/lcr_ifact.c
- evs.o: evs.c
- $(CC) $(CFLAGS) -c -o $@ $(*F).c
- clm.o: clm.c
- $(CC) $(CFLAGS) -c -o $@ $(*F).c
- amf.o: amf.c
- $(CC) $(CFLAGS) -c -o $@ $(*F).c
- ckpt.o: ckpt.c
- $(CC) $(CFLAGS) -c -o $@ $(*F).c
- evt.o: evt.c
- $(CC) $(CFLAGS) -c -o $@ $(*F).c
- lck.o: lck.c
- $(CC) $(CFLAGS) -c -o $@ $(*F).c
- msg.o: msg.c
- $(CC) $(CFLAGS) -c -o $@ $(*F).c
- cfg.o: cfg.c
- $(CC) $(CFLAGS) -c -o $@ $(*F).c
- # -fPIC rules required for lib totem
- aispoll.o: aispoll.c
- $(CC) $(CFLAGS) -fPIC -c -o $@ $(*F).c
- totempg.o: totempg.c
- $(CC) $(CFLAGS) -fPIC -c -o $@ $(*F).c
- totemsrp.o: totemsrp.c
- $(CC) $(CFLAGS) -fPIC -c -o $@ $(*F).c
- totemrrp.o: totemrrp.c
- $(CC) $(CFLAGS) -fPIC -c -o $@ $(*F).c
- totemip.o: totemip.c
- $(CC) $(CFLAGS) -fPIC -c -o $@ $(*F).c
- totemnet.o: totemnet.c
- $(CC) $(CFLAGS) -fPIC -c -o $@ $(*F).c
- wthread.o: wthread.c
- $(CC) $(CFLAGS) -fPIC -c -o $@ $(*F).c
- tlist.o: tlist.c
- $(CC) $(CFLAGS) -fPIC -c -o $@ $(*F).c
- crypto.o: crypto.c
- $(CC) $(CFLAGS) -fPIC -c -o $@ $(*F).c
- totemmrp.o: totemmrp.c
- $(CC) $(CFLAGS) -fPIC -c -o $@ $(*F).c
- totemconfig.o: totemconfig.c
- $(CC) $(CFLAGS) -fPIC -c -o $@ $(*F).c
- # DO NOT DELETE
- main.o: ../include/saAis.h ../include/ipc_evs.h ../include/saAis.h
- main.o: ../include/saClm.h ../include/ipc_gen.h ../include/list.h
- main.o: ../include/queue.h totempg.h aispoll.h totemsrp.h mempool.h amfconfig.h
- main.o: main.h clm.h ../include/saClm.h amf.h handlers.h ckpt.h evt.h
- main.o: ../include/saEvt.h swab.h print.h
- clm.o: ../include/saAis.h ../include/saClm.h ../include/saAis.h
- clm.o: ../include/ipc_evs.h ../include/saClm.h ../include/ipc_gen.h
- clm.o: ../include/ipc_clm.h ../include/list.h ../include/queue.h aispoll.h
- clm.o: totempg.h totemsrp.h amfconfig.h main.h clm.h amf.h handlers.h ckpt.h
- clm.o: evt.h ../include/saEvt.h mempool.h print.h
- amf.o: ../include/saAis.h ../include/ipc_evs.h ../include/saAis.h
- amf.o: ../include/saClm.h ../include/ipc_gen.h ../include/list.h
- amf.o: ../include/queue.h totempg.h aispoll.h totemsrp.h mempool.h util.h
- amf.o: amfconfig.h main.h clm.h ../include/saClm.h amf.h handlers.h ckpt.h evt.h
- amf.o: ../include/saEvt.h print.h
- ckpt.o: ../include/saAis.h ../include/ipc_evs.h ../include/saAis.h
- ckpt.o: ../include/saClm.h ../include/ipc_gen.h ../include/list.h
- ckpt.o: ../include/queue.h aispoll.h mempool.h util.h amfconfig.h totempg.h
- ckpt.o: totemsrp.h main.h clm.h ../include/saClm.h amf.h handlers.h ckpt.h
- ckpt.o: evt.h ../include/saEvt.h print.h
- evt.o: ../include/ipc_evt.h ../include/saAis.h ../include/saEvt.h
- evt.o: ../include/saClm.h ../include/ipc_gen.h ../include/list.h
- evt.o: ../include/queue.h util.h ../include/saAis.h aispoll.h mempool.h
- evt.o: amfconfig.h totempg.h totemsrp.h main.h clm.h ../include/saClm.h
- evt.o: amf.h ../include/ipc_evs.h handlers.h ckpt.h evt.h
- evt.o: ../include/saEvt.h swab.h print.h
- evs.o: ../include/saAis.h ../include/ipc_evs.h ../include/saAis.h
- evs.o: ../include/saClm.h ../include/ipc_gen.h ../include/list.h
- evs.o: ../include/queue.h aispoll.h totempg.h totemsrp.h amfconfig.h main.h clm.h
- evs.o: ../include/saClm.h amf.h handlers.h ckpt.h evt.h
- evs.o: ../include/saEvt.h mempool.h print.h
- amfconfig.o: ../include/saAis.h ../include/list.h util.h amfconfig.h aispoll.h
- amfconfig.o: totempg.h totemsrp.h mempool.h print.h ../include/saClm.h
- amfconfig.o: ../include/saAis.h
- print.o: print.h ../include/saAis.h ../include/saClm.h
- print.o: ../include/saAis.h amfconfig.h ../include/list.h aispoll.h totempg.h
- print.o: totemsrp.h
- mempool.o: ../include/list.h mempool.h
- util.o: ../include/saAis.h ../include/list.h util.h
- aispoll.o: aispoll.h ../include/list.h ../include/saAis.h tlist.h
- totemsrp.o: aispoll.h totemsrp.h ../include/queue.h ../include/sq.h
- totemsrp.o: ../include/list.h ../include/saAis.h swab.h crypto.h
- totempg.o: totempg.h aispoll.h totemsrp.h swab.h
- tlist.o: ../include/list.h tlist.h
- hdb.o: ../include/saAis.h
- crypto.o: crypto.h
|