aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxen/Makefile
diff options
context:
space:
mode:
authorewan@localhost.localdomain <ewan@localhost.localdomain>2007-04-21 12:21:06 -0700
committerewan@localhost.localdomain <ewan@localhost.localdomain>2007-04-21 12:21:06 -0700
commite83be1159570416909d74bca47175a30a13534f8 (patch)
tree19f11bd4afd52f260e4fef177a4938fcae43e8a4 /tools/libxen/Makefile
parent5c8b4287a45c0f0215d188769ab46458399351f5 (diff)
downloadxen-e83be1159570416909d74bca47175a30a13534f8.tar.gz
xen-e83be1159570416909d74bca47175a30a13534f8.tar.bz2
xen-e83be1159570416909d74bca47175a30a13534f8.zip
Move all internal header files to a separate directory, so that it's clear what
forms the public API. Tidy up a couple of macros in xen_internal.h. Remove test_hvm_bindings, which no longer builds, and which has had its functionality subsumed into test_bindings. Bump the library version to 0.9. Signed-off-by: Ewan Mellor <ewan@xensource.com>
Diffstat (limited to 'tools/libxen/Makefile')
-rw-r--r--tools/libxen/Makefile33
1 files changed, 20 insertions, 13 deletions
diff --git a/tools/libxen/Makefile b/tools/libxen/Makefile
index 51062d7c5b..d91be3c33d 100644
--- a/tools/libxen/Makefile
+++ b/tools/libxen/Makefile
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2006, XenSource Inc.
+# Copyright (c) 2006-2007, XenSource Inc.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -18,20 +18,21 @@
XEN_ROOT=../..
include $(XEN_ROOT)/tools/Rules.mk
-MAJOR = 0.1
-MINOR = 0
+MAJOR = 0.9
+MINOR = 1
CFLAGS = -Iinclude \
- $(shell xml2-config --cflags) \
+ $(shell xml2-config --cflags) \
$(shell curl-config --cflags) \
-W -Wall -Wmissing-prototypes -Werror -std=c99 -O2 -fPIC
LDFLAGS = $(shell xml2-config --libs) \
$(shell curl-config --libs)
-LIBXENAPI_HDRS = $(wildcard include/*.h)
+LIBXENAPI_HDRS = $(wildcard include/xen/api/*.h) include/xen/api/xen_all.h
LIBXENAPI_OBJS = $(patsubst %.c, %.o, $(wildcard src/*.c))
+TEST_PROGRAMS = test/test_bindings test/test_event_handling
.PHONY: all
all: libxenapi.so libxenapi.a
@@ -48,13 +49,7 @@ libxenapi.so.$(MAJOR).$(MINOR): $(LIBXENAPI_OBJS)
libxenapi.a: $(LIBXENAPI_OBJS)
$(AR) rcs libxenapi.a $^
-test/test_bindings: test/test_bindings.o libxenapi.so
- $(CC) $(LDFLAGS) -o $@ $< -L . -lxenapi
-
-test/test_event_handling: test/test_event_handling.o libxenapi.so
- $(CC) $(LDFLAGS) -o $@ $< -L . -lxenapi
-
-test/test_hvm_bindings: test/test_hvm_bindings.o libxenapi.so
+$(TEST_PROGRAMS): test/%: test/%.o libxenapi.so
$(CC) $(LDFLAGS) -o $@ $< -L . -lxenapi
@@ -70,9 +65,21 @@ install: all
$(INSTALL_DATA) $$i $(DESTDIR)/usr/include/xen/api; \
done
+
.PHONY: clean
clean:
rm -f `find -name *.o`
rm -f libxenapi.so*
rm -f libxenapi.a
- rm -f test/test_bindings
+ rm -f $(TEST_PROGRAMS)
+
+
+.PHONY: uberheader
+uberheader: include/xen/api/xen_all.h
+include/xen/api/xen_all.h::
+ echo "/* This file is autogenerated */" >$@
+ echo "#ifndef XEN_API_XEN_ALL_H" >>$@
+ echo "#define XEN_API_XEN_ALL_H" >>$@
+ ls include/xen/api/*.h | grep -v xen_all.h | grep -v _decl.h | \
+ sed 's,^include/\(.*\)$$,#include <\1>,g' >>$@
+ echo "#endif" >>$@