More build cleanups
Signed-off-by: Lon Hohberger <lhh@redhat.com>
This commit is contained in:
parent
e190d1e271
commit
1ddb9136d9
@ -16,16 +16,12 @@ TARGETS=fence_virt fence_xvm
|
|||||||
|
|
||||||
fence_virt_SOURCES = mcast.c serial.c main.c options.c
|
fence_virt_SOURCES = mcast.c serial.c main.c options.c
|
||||||
|
|
||||||
INCLUDES=-I../include\
|
INCLUDES=-I../include -I/usr/include/nss3 -I/usr/include/nspr4 \
|
||||||
-I/usr/include/openais -I/usr/include/libvirt \
|
-I/usr/include/libxml2
|
||||||
-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\"
|
CFLAGS+=-DFENCE_RELEASE_NAME=\"devel\"
|
||||||
|
|
||||||
LIBS+=-L../../../cman/lib -L../../../ccs/lib -L${libdir}/openais \
|
LIBS+=-lnss3 -lxml2
|
||||||
-L../../../dlm/lib -lnss3 -lxml2
|
|
||||||
|
|
||||||
all: ${TARGETS}
|
all: ${TARGETS}
|
||||||
|
|
||||||
|
@ -6,6 +6,8 @@ AC_INIT(fence_virt, 0.1, lon@metamorphism.com)
|
|||||||
AC_CONFIG_SRCDIR([server/main.c])
|
AC_CONFIG_SRCDIR([server/main.c])
|
||||||
AC_CONFIG_HEADER([include/config.h])
|
AC_CONFIG_HEADER([include/config.h])
|
||||||
|
|
||||||
|
AC_CANONICAL_SYSTEM
|
||||||
|
|
||||||
# Checks for programs.
|
# Checks for programs.
|
||||||
AC_PROG_YACC
|
AC_PROG_YACC
|
||||||
AC_PROG_CC
|
AC_PROG_CC
|
||||||
@ -26,6 +28,7 @@ AC_CHECK_LIB([virt], [virConnectOpen])
|
|||||||
# FIXME: Replace `main' with a function in `-lxml2':
|
# FIXME: Replace `main' with a function in `-lxml2':
|
||||||
AC_CHECK_LIB([xml2], [main])
|
AC_CHECK_LIB([xml2], [main])
|
||||||
|
|
||||||
|
|
||||||
# Checks for header files.
|
# Checks for header files.
|
||||||
AC_HEADER_DIRENT
|
AC_HEADER_DIRENT
|
||||||
AC_HEADER_STDC
|
AC_HEADER_STDC
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
#ifndef _FENCE_VIRT_H
|
#ifndef _FENCE_VIRT_H
|
||||||
#define _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
|
#endif
|
||||||
|
@ -23,18 +23,17 @@ null_so_SOURCES = null.c
|
|||||||
multicast_so_SOURCES = mcast.c history.c
|
multicast_so_SOURCES = mcast.c history.c
|
||||||
checkpoint_so_SOURCES = virt.c vm_states.c history.c checkpoint.c
|
checkpoint_so_SOURCES = virt.c vm_states.c history.c checkpoint.c
|
||||||
|
|
||||||
INCLUDES=-I../include\
|
INCLUDES=-I../include -I/usr/include/openais -I/usr/include/libvirt \
|
||||||
-I/usr/include/openais -I/usr/include/libvirt \
|
-I/usr/include/nss3 -I/usr/include/nspr4
|
||||||
-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\" -D_MODULE
|
CFLAGS+=-DFENCE_RELEASE_NAME=\"devel\" -D_MODULE -DSYSCONFDIR=\"@sysconfdir@\"
|
||||||
|
|
||||||
LIBS+=-L/usr/lib64/openais -lnss3 -lxml2 -lSaCkpt -lvirt \
|
LIBS+=-L../common -lfence_virt -Wl,-wrap,syslog,-wrap,closelog -lpthread
|
||||||
-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}
|
all: ${TARGETS} ${MODULES}
|
||||||
|
|
||||||
@ -42,16 +41,16 @@ fence_virtd: ${fence_virtd_SOURCES:.c=.o}
|
|||||||
gcc -o $@ $^ $(LIBS) $(MAIN_LIBS)
|
gcc -o $@ $^ $(LIBS) $(MAIN_LIBS)
|
||||||
|
|
||||||
multicast.so: ${multicast_so_SOURCES:.c=.o}
|
multicast.so: ${multicast_so_SOURCES:.c=.o}
|
||||||
gcc -o $@ $^ $(LIBS) -shared
|
gcc -o $@ $^ $(LIBS) -shared $(NSS_LIBS)
|
||||||
|
|
||||||
libvirt.so: ${libvirt_so_SOURCES:.c=.o}
|
libvirt.so: ${libvirt_so_SOURCES:.c=.o}
|
||||||
gcc -o $@ $^ $(LIBS) -shared
|
gcc -o $@ $^ $(LIBS) -shared $(VIRT_LIBS)
|
||||||
|
|
||||||
null.so: ${null_so_SOURCES:.c=.o}
|
null.so: ${null_so_SOURCES:.c=.o}
|
||||||
gcc -o $@ $^ $(LIBS) -shared
|
gcc -o $@ $^ $(LIBS) -shared
|
||||||
|
|
||||||
checkpoint.so: ${checkpoint_so_SOURCES:.c=.o}
|
checkpoint.so: ${checkpoint_so_SOURCES:.c=.o}
|
||||||
gcc -o $@ $^ $(LIBS) -shared
|
gcc -o $@ $^ $(LIBS) -shared $(AIS_LIBS) $(VIRT_LIBS)
|
||||||
|
|
||||||
%.o: %.c
|
%.o: %.c
|
||||||
gcc $(CFLAGS) -c -o $@ $^ $(INCLUDES)
|
gcc $(CFLAGS) -c -o $@ $^ $(INCLUDES)
|
||||||
|
Loading…
Reference in New Issue
Block a user