More build cleanups

Signed-off-by: Lon Hohberger <lhh@redhat.com>
This commit is contained in:
Lon Hohberger 2009-09-15 12:08:10 -04:00
parent e190d1e271
commit 1ddb9136d9
4 changed files with 22 additions and 20 deletions

View File

@ -16,16 +16,12 @@ TARGETS=fence_virt fence_xvm
fence_virt_SOURCES = mcast.c serial.c main.c options.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
INCLUDES=-I../include -I/usr/include/nss3 -I/usr/include/nspr4 \
-I/usr/include/libxml2
CFLAGS+=-DFENCE_RELEASE_NAME=\"devel\"
LIBS+=-L../../../cman/lib -L../../../ccs/lib -L${libdir}/openais \
-L../../../dlm/lib -lnss3 -lxml2
LIBS+=-lnss3 -lxml2
all: ${TARGETS}

View File

@ -6,6 +6,8 @@ AC_INIT(fence_virt, 0.1, lon@metamorphism.com)
AC_CONFIG_SRCDIR([server/main.c])
AC_CONFIG_HEADER([include/config.h])
AC_CANONICAL_SYSTEM
# Checks for programs.
AC_PROG_YACC
AC_PROG_CC
@ -26,6 +28,7 @@ AC_CHECK_LIB([virt], [virConnectOpen])
# FIXME: Replace `main' with a function in `-lxml2':
AC_CHECK_LIB([xml2], [main])
# Checks for header files.
AC_HEADER_DIRENT
AC_HEADER_STDC

View File

@ -1,6 +1,10 @@
#ifndef _FENCE_VIRT_H
#define _FENCE_VIRT_H
#define DEFAULT_CONFIG_FILE "/etc/fence_virt.conf"
#ifdef SYSCONFDIR
#define DEFAULT_CONFIG_FILE SYSCONFDIR "/fence_virt.conf"
#else
#define DEFAULT_CONFIG_FILE SYSCONFDIR "/etc/fence_virt.conf"
#endif
#endif

View File

@ -23,18 +23,17 @@ 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\
-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
INCLUDES=-I../include -I/usr/include/openais -I/usr/include/libvirt \
-I/usr/include/nss3 -I/usr/include/nspr4
CFLAGS+=-DFENCE_RELEASE_NAME=\"devel\" -D_MODULE
CFLAGS+=-DFENCE_RELEASE_NAME=\"devel\" -D_MODULE -DSYSCONFDIR=\"@sysconfdir@\"
LIBS+=-L/usr/lib64/openais -lnss3 -lxml2 -lSaCkpt -lvirt \
-L../common -lfence_virt -Wl,-wrap,syslog,-wrap,closelog -lpthread
LIBS+=-L../common -lfence_virt -Wl,-wrap,syslog,-wrap,closelog -lpthread
MAIN_LIBS=-L../config -lsimpleconfig
MAIN_LIBS=-L../config -lsimpleconfig -ldl
AIS_LIBS=-L@libdir@/openais -lSaCkpt
VIRT_LIBS=-lvirt
NSS_LIBS=-lnss3
all: ${TARGETS} ${MODULES}
@ -42,16 +41,16 @@ fence_virtd: ${fence_virtd_SOURCES:.c=.o}
gcc -o $@ $^ $(LIBS) $(MAIN_LIBS)
multicast.so: ${multicast_so_SOURCES:.c=.o}
gcc -o $@ $^ $(LIBS) -shared
gcc -o $@ $^ $(LIBS) -shared $(NSS_LIBS)
libvirt.so: ${libvirt_so_SOURCES:.c=.o}
gcc -o $@ $^ $(LIBS) -shared
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
gcc -o $@ $^ $(LIBS) -shared $(AIS_LIBS) $(VIRT_LIBS)
%.o: %.c
gcc $(CFLAGS) -c -o $@ $^ $(INCLUDES)