aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2010-02-04 19:40:19 +0000
committerKeir Fraser <keir.fraser@citrix.com>2010-02-04 19:40:19 +0000
commitaf43e76ed68566dbceedefaac89924070842edec (patch)
tree090a7da7ece128de1c8e3fe16cac92aad6cbe821
parente670c28c9f0b284c05e4e8a6c4001899b13129c8 (diff)
downloadxen-af43e76ed68566dbceedefaac89924070842edec.tar.gz
xen-af43e76ed68566dbceedefaac89924070842edec.tar.bz2
xen-af43e76ed68566dbceedefaac89924070842edec.zip
Revert changeset 20898:8c1889297084
-rwxr-xr-xtools/check/check_libconfig_devel6
-rw-r--r--tools/libxl/Makefile23
2 files changed, 19 insertions, 10 deletions
diff --git a/tools/check/check_libconfig_devel b/tools/check/check_libconfig_devel
deleted file mode 100755
index b35571b43f..0000000000
--- a/tools/check/check_libconfig_devel
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-# CHECK-BUILD
-
-. ./funcs.sh
-
-has_header libconfig.h || fail "missing libconfig headers (package libconfig-devel)"
diff --git a/tools/libxl/Makefile b/tools/libxl/Makefile
index 7bf3199cd8..3ddcd48513 100644
--- a/tools/libxl/Makefile
+++ b/tools/libxl/Makefile
@@ -14,6 +14,11 @@ CFLAGS += $(CFLAGS_libxenctrl) $(CFLAGS_libxenguest) $(CFLAGS_libxenstore)
LIBS = $(LDFLAGS_libxenctrl) $(LDFLAGS_libxenguest) $(LDFLAGS_libxenstore)
+#LIBCONFIG_URL ?= http://www.hyperrealm.com/libconfig
+LIBCONFIG_URL = $(XEN_EXTFILES_URL)
+LIBCONFIG_SOURCE = libconfig-1.3.2
+LIBCONFIG_OUTPUT = $(LIBCONFIG_SOURCE)/.libs
+
LIBXL_OBJS-y = osdeps.o
LIBXL_OBJS = flexarray.o libxl.o libxl_dom.o libxl_exec.o libxl_xshelp.o libxl_device.o libxl_internal.o xenguest.o libxl_utils.o $(LIBXL_OBJS-y)
@@ -34,11 +39,18 @@ libxenlight.so.$(MAJOR).$(MINOR): $(LIBXL_OBJS)
libxenlight.a: $(LIBXL_OBJS)
$(AR) rcs libxenlight.a $^
-xl.o: xl.c
- $(CC) $(CFLAGS) -c xl.c
+$(LIBCONFIG_SOURCE).tar.gz:
+ $(WGET) $(LIBCONFIG_URL)/$@
+
+$(LIBCONFIG_OUTPUT)/libconfig.so: $(LIBCONFIG_SOURCE).tar.gz
+ [ ! -d "$(LIBCONFIG_SOURCE)" ] && tar xzf $<
+ cd $(LIBCONFIG_SOURCE) && ./configure --prefix=$(PREFIX) --libdir=$(LIBDIR) --disable-cxx && $(MAKE)
+
+xl.o: $(LIBCONFIG_OUTPUT)/libconfig.so xl.c
+ $(CC) $(CFLAGS) -I$(LIBCONFIG_SOURCE) -c xl.c
-$(CLIENTS): xl.o libxenlight.so
- $(CC) $(LDFLAGS) -o $@ $< $(LIBS) -L . -lxenlight -lconfig
+$(CLIENTS): xl.o libxenlight.so $(LIBCONFIG_OUTPUT)/libconfig.so
+ $(CC) $(LDFLAGS) -o $@ $< $(LIBS) -L . -lxenlight -L$(LIBCONFIG_OUTPUT) -lconfig
.PHONY: install
install: all
@@ -48,11 +60,14 @@ install: all
ln -sf libxenlight.so.$(MAJOR) $(DESTDIR)$(LIBDIR)/libxenlight.so
$(INSTALL_DATA) libxenlight.a $(DESTDIR)$(LIBDIR)
$(INSTALL_DATA) libxl.h $(DESTDIR)$(INCLUDEDIR)
+ cd $(LIBCONFIG_SOURCE) && DESTDIR=$(DESTDIR) $(MAKE) install
.PHONY: clean
clean:
$(RM) -f *.o *.so* *.a $(CLIENTS) $(DEPS)
+ $(RM) -rf $(LIBCONFIG_SOURCE)
distclean: clean
+ $(RM) -f $(LIBCONFIG_SOURCE).tar.gz
-include $(DEPS)