Add temporary 'make install' target

This commit is contained in:
Lon Hohberger 2009-08-21 14:05:48 -04:00
parent 138fed47d9
commit d7f7dec3ec
4 changed files with 19 additions and 8 deletions

View File

@ -17,6 +17,11 @@ all:
make -C client
make -C server
install:
make -C config install
make -C client install
make -C server install
clean:
make -C config clean
make -C common clean

View File

@ -39,10 +39,11 @@ fence_virt: ${fence_virt_SOURCES:.c=.o}
gcc $(CFLAGS) -c -o $@ $^ $(INCLUDES)
install: all
if [ ! -d ${sbindir} ]; then \
install -d ${sbindir}; \
# XXX hardcoded sbin
if [ ! -d /usr/sbin; then \
install -d /usr/sbin; \
fi
install -m755 ${TARGETS} ${sbindir}
install -m755 ${TARGETS} /usr/sbin
clean:
rm -f ${TARGETS} *.o *.d *~

View File

@ -46,4 +46,6 @@ clean:
rm -f ${TARGETS} *~ *.o testprog config.tab.c config.tab.h config.c
install:
install -m 0644 example.conf /etc/fence_virtd.conf

View File

@ -13,7 +13,9 @@
include ../Makefile.top
TARGETS=fence_virtd libvirt.so checkpoint.so
TARGETS=fence_virtd
MODULES=libvirt.so checkpoint.so
fence_virtd_SOURCES = mcast.c main.c plugin.c
@ -34,7 +36,7 @@ LIBS+=-L/usr/lib64/openais -lnss3 -lxml2 -lSaCkpt -lccs -lvirt -lcman \
MAIN_LIBS=-L../config -lsimpleconfig
all: ${TARGETS}
all: ${TARGETS} ${MODULES}
fence_virtd: ${fence_virtd_SOURCES:.c=.o}
gcc -o $@ $^ $(LIBS) $(MAIN_LIBS)
@ -49,10 +51,11 @@ checkpoint.so: ${checkpoint_so_SOURCES:.c=.o}
gcc $(CFLAGS) -c -o $@ $^ $(INCLUDES)
install: all
if [ ! -d ${sbindir} ]; then \
install -d ${sbindir}; \
# XXX hardcoded sbin
if [ ! -d /usr/sbin ]; then \
install -d /usr/sbin; \
fi
install -m755 ${TARGETS} ${sbindir}
install -m755 ${TARGETS} /usr/sbin
clean:
rm -f ${TARGETS} *.o *.d *~