############################################################################### ############################################################################### ## ## Copyright (C) 2009 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 # Serial mode TARGET=fence_virt # XVM/Multicast mode compatibility link LINK=fence_xvm fence_virt_SOURCES = mcast.c serial.c main.c options.c INCLUDES=-I../include `nss-config --cflags` `nspr-config --cflags` \ `xml2-config --cflags` # nss sucks in way too much stuff LIBS+=-lnss3 `xml2-config --libs` TARGETS=${TARGET} # From configure script xvm_compat=@xvm_compat@ ifeq ($(xvm_compat),yes) TARGETS+=${LINK} endif all: ${TARGETS} fence_xvm: ${TARGET} ln -snf $^ $@ fence_virt: ${fence_virt_SOURCES:.c=.o} $(CC) -o $@ $^ $(LIBS) -L../common -lfence_virt %.o: %.c $(CC) $(CFLAGS) -c -o $@ $^ $(INCLUDES) install: all if [ ! -d ${DESTDIR}/${sbindir} ]; then \ install -d ${DESTDIR}/${sbindir} ; \ fi install -m755 ${TARGET} ${DESTDIR}/${sbindir} ifeq ($(xvm_compat),yes) cp -a ${LINK} ${DESTDIR}/${sbindir} endif clean: rm -f ${TARGET} ${LINK} *.o *.d *~