fence-virt/client/Makefile.in
2019-05-07 15:46:33 +03:00

59 lines
1.5 KiB
Makefile

###############################################################################
###############################################################################
##
## 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 tcp.c vsock.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` -Wl,-z,now
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) $(CFLAGS) $(LDFLAGS) -pie -o $@ $^ $(LIBS) -L../common -lfence_virt
%.o: %.c
$(CC) $(CFLAGS) -fPIC -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 *~