f796c64fc3
Signed-off-by: Lon Hohberger <lhh@redhat.com>
72 lines
2.0 KiB
Makefile
72 lines
2.0 KiB
Makefile
###############################################################################
|
|
###############################################################################
|
|
##
|
|
## Copyright (C) 2006 Red Hat, Inc.
|
|
##
|
|
## This copyrighted material is made available to anyone wishing to use,
|
|
## modify, copy, or redistribute it subject to the terms and conditions
|
|
## of the GNU General Public License v.2.
|
|
##
|
|
###############################################################################
|
|
###############################################################################
|
|
|
|
include ../Makefile.top
|
|
|
|
|
|
TARGETS=fence_virtd
|
|
|
|
MODULES=libvirt.so checkpoint.so multicast.so null.so
|
|
|
|
fence_virtd_SOURCES = main.c plugin.c
|
|
libvirt_so_SOURCES = libvirt.c
|
|
null_so_SOURCES = null.c
|
|
multicast_so_SOURCES = mcast.c history.c
|
|
checkpoint_so_SOURCES = virt.c vm_states.c history.c checkpoint.c
|
|
|
|
INCLUDES=-I../include `nss-config --cflags` `nspr-config --cflags`
|
|
|
|
CFLAGS+=-DFENCE_RELEASE_NAME=\"devel\" -D_MODULE -DSYSCONFDIR=\"@sysconfdir@\"
|
|
|
|
LIBS+=-L../common -lfence_virt -Wl,-wrap,syslog,-wrap,closelog -lpthread
|
|
|
|
MAIN_LIBS=-L../config -lsimpleconfig -ldl
|
|
AIS_LIBS=-L@libdir@/openais -lSaCkpt
|
|
COROSYNC_LIBS=-L@libdir@/corosync -lcpg
|
|
VIRT_LIBS=-lvirt
|
|
NSS_LIBS=-lnss3
|
|
|
|
all: ${TARGETS} ${MODULES}
|
|
|
|
fence_virtd: ${fence_virtd_SOURCES:.c=.o}
|
|
gcc -o $@ $^ $(LIBS) $(MAIN_LIBS)
|
|
|
|
multicast.so: ${multicast_so_SOURCES:.c=.o}
|
|
gcc -o $@ $^ $(LIBS) -shared $(NSS_LIBS)
|
|
|
|
libvirt.so: ${libvirt_so_SOURCES:.c=.o}
|
|
gcc -o $@ $^ $(LIBS) -shared $(VIRT_LIBS)
|
|
|
|
null.so: ${null_so_SOURCES:.c=.o}
|
|
gcc -o $@ $^ $(LIBS) -shared
|
|
|
|
checkpoint.so: ${checkpoint_so_SOURCES:.c=.o}
|
|
gcc -o $@ $^ $(LIBS) -shared $(AIS_LIBS) $(VIRT_LIBS) $(COROSYNC_LIBS)
|
|
|
|
%.o: %.c
|
|
gcc $(CFLAGS) -c -o $@ $^ $(INCLUDES)
|
|
|
|
install: all
|
|
# XXX hardcoded sbin
|
|
if [ ! -d /usr/sbin ]; then \
|
|
install -d /usr/sbin; \
|
|
fi
|
|
install -m755 ${TARGETS} /usr/sbin
|
|
# XXX hardcoded sbin
|
|
if [ ! -d /usr/lib64/fence_virt ]; then \
|
|
install -d /usr/lib64/fence_virt ; \
|
|
fi
|
|
install -m755 ${MODULES} /usr/lib64/fence_virt
|
|
|
|
clean:
|
|
rm -f ${TARGETS} ${MODULES} *.o *.d *~
|