2009-08-17 16:53:58 -04:00
###############################################################################
###############################################################################
##
2009-09-23 12:04:32 -04:00
## Copyright (C) 2009 Red Hat, Inc.
2009-08-17 16:53:58 -04:00
##
## 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.
##
###############################################################################
###############################################################################
i n c l u d e . . / M a k e f i l e . t o p
2009-09-15 11:25:02 -04:00
LEX = @LEX@
YACC = @YACC@
2009-08-17 16:53:58 -04:00
TARGETS = libsimpleconfig.a
2009-09-15 11:25:02 -04:00
libsimpleconfig_a_SOURCE = y.tab.c \
2009-08-17 16:53:58 -04:00
config.c simpleconfig.c
INCLUDES = -I../include \
-I/usr/include/openais -I/usr/include/libvirt \
-I/usr/include/nss3 -I/usr/include/nspr4 \
-I../../../cman/lib -I../../../ccs/lib -I/usr/include/libxml2 \
-I/usr/include/libvirt
CFLAGS += -DFENCE_RELEASE_NAME= \" devel\" -Wno-unused
LIBS += -L../../../cman/lib -L../../../ccs/lib -L${ libdir } /openais \
-L../../../dlm/lib -lnss3 -lxml2
all : ${TARGETS }
libsimpleconfig.a : ${libsimpleconfig_a_SOURCE :.c =.o }
ar rc $@ $^
2009-09-15 11:25:02 -04:00
y.tab.c y.tab.h : config .y
$( YACC) -d $^
2009-08-17 16:53:58 -04:00
2009-09-15 11:25:02 -04:00
config.c : y .tab .h config .l
$( LEX) -oconfig.c config.l
2009-08-17 16:53:58 -04:00
%.o : %.c
2019-04-09 15:38:06 +02:00
$( CC) $( CFLAGS) -fPIE -c -o $@ $^ $( INCLUDES)
2009-08-17 16:53:58 -04:00
clean :
rm -f ${ TARGETS } *~ *.o testprog config.tab.c config.tab.h config.c
install :
2009-09-17 15:21:14 -04:00
if [ ! -d ${ DESTDIR } /${ sysconfdir } ] ; then \
install -d ${ DESTDIR } /${ sysconfdir } ; \
fi
if [ ! -f ${ DESTDIR } /${ sysconfdir } /fence_virt.conf ] ; then \
install -m 0644 example.conf ${ DESTDIR } /${ sysconfdir } /fence_virt.conf; \
2009-08-21 14:16:44 -04:00
fi