Update monolithic build

Signed-off-by: Lon Hohberger <lon@users.sourceforge.net>
This commit is contained in:
Lon Hohberger 2009-11-05 14:01:35 -05:00
parent 515e95a11b
commit 8dffcbd726
3 changed files with 26 additions and 13 deletions

View File

@ -94,6 +94,10 @@ typedef enum {
PLUGIN_BACKEND = 2
} plugin_type_t;
#ifdef __cplusplus
extern "C" {
#endif
int plugin_reg_backend(const backend_plugin_t *plugin);
int plugin_reg_listener(const listener_plugin_t *plugin);
const backend_plugin_t *plugin_find_backend(const char *name);
@ -105,3 +109,6 @@ int plugin_load(const char *filename);
int plugin_search(const char *pathname);
#endif
#ifdef __cplusplus
}
#endif

View File

@ -20,10 +20,11 @@ with_modules=@modules@
TARGETS=fence_virtd
MAIN_LIBS=-L../config -lsimpleconfig -ldl
AIS_LIBS=-L@libdir@/openais -lSaCkpt
COROSYNC_LIBS=-L@libdir@/corosync -lcpg
AIS_LIBS=-L/usr/lib64/openais -lSaCkpt
COROSYNC_LIBS=-L/usr/lib64/corosync -lcpg
CMAN_LIBS=-lcman
VIRT_LIBS=-lvirt
VIRT_QPID=-lqpidclient
VIRT_QPID=-lqmfconsole
NSS_LIBS=-lnss3
INCLUDES=-I../include `nss-config --cflags` `nspr-config --cflags`
@ -38,7 +39,7 @@ MODULE_PATH=${libdir}/${PACKAGE_NAME}
fence_virtd_SOURCES = main.c plugin.c
libvirt_so_SOURCES = libvirt.c
null_so_SOURCES = null.c
libvirt_qpid_so_SOURCES = libvirt-qpid.cpp
libvirt_qpid_cxx_so_SOURCES = libvirt-qpid.cpp
multicast_so_SOURCES = mcast.c history.c
checkpoint_so_SOURCES = virt.c vm_states.c history.c checkpoint.c cpg.c
@ -86,7 +87,11 @@ LIBS+=$(VIRT_LIBS)
endif
ifneq ($(mod_checkpoint),no)
fence_virtd_SOURCES+=${checkpoint_so_SOURCES}
LIBS+=$(AIS_LIBS) $(COROSYNC_LIBS)
LIBS+=$(AIS_LIBS) $(COROSYNC_LIBS) $(CMAN_LIBS)
endif
ifneq ($(mod_libvirt_qpid),no)
fence_virtd_cxx_SOURCES+=${libvirt_qpid_cxx_so_SOURCES}
LIBS+=$(VIRT_QPID)
endif
ifneq ($(mod_multicast),no)
fence_virtd_SOURCES+=${multicast_so_SOURCES}
@ -102,8 +107,8 @@ CFLAGS+=-DSYSCONFDIR=\"@sysconfdir@\"
all: ${TARGETS} ${MODULES}
fence_virtd: ${fence_virtd_SOURCES:.c=.o}
$(CC) -o $@ $^ $(LIBS) $(MAIN_LIBS)
fence_virtd: ${fence_virtd_SOURCES:.c=.o} ${fence_virtd_cxx_SOURCES:.cpp=.opp}
$(CXX) -o $@ $^ $(MAIN_LIBS) $(LIBS)
multicast.so: ${multicast_so_SOURCES:.c=.o}
$(CC) -o $@ $^ $(LIBS) -shared $(NSS_LIBS)
@ -111,14 +116,15 @@ multicast.so: ${multicast_so_SOURCES:.c=.o}
libvirt.so: ${libvirt_so_SOURCES:.c=.o}
$(CC) -o $@ $^ $(LIBS) -shared $(VIRT_LIBS)
libvirt-qpid.so: ${libvirt_qpid_so_SOURCES:.cpp=.opp}
$(CC) -o $@ $^ $(LIBS) -shared $(VIRT_QPID)
libvirt-qpid.so: ${libvirt_qpid_cxx_so_SOURCES:.cpp=.opp}
$(CXX) -o $@ $^ $(LIBS) -shared $(VIRT_QPID)
null.so: ${null_so_SOURCES:.c=.o}
$(CC) -o $@ $^ $(LIBS) -shared
checkpoint.so: ${checkpoint_so_SOURCES:.c=.o}
$(CC) -o $@ $^ $(LIBS) -shared $(AIS_LIBS) $(VIRT_LIBS) $(COROSYNC_LIBS)
$(CC) -o $@ $^ $(LIBS) -shared $(AIS_LIBS) $(VIRT_LIBS) \
$(COROSYNC_LIBS) $(CMAN_LIBS)
%.o: %.c
$(CC) $(CFLAGS) -c -o $@ $^ $(INCLUDES)

View File

@ -281,8 +281,8 @@ BACKEND_INFO_SYM(void)
}
#else
static void __attribute__((constructor))
null_register_plugin(void)
lq_register_plugin(void)
{
plugin_reg_backend(&null_plugin);
plugin_reg_backend(&lq_plugin);
}
#endif