diff options
Diffstat (limited to 'tools/libxen/Makefile')
-rw-r--r-- | tools/libxen/Makefile | 33 |
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" >>$@ |