ia64/xen-unstable

view tools/flask/libflask/Makefile @ 16894:b9004e222fde

Move generation of public header hierarchy into the tools.

This patch merges the two versions of public header generation
currently used in the build into one.

Signed-off-by: Bastian Blank <waldi@debian.org>
author Keir Fraser <keir.fraser@citrix.com>
date Sat Jan 26 10:38:44 2008 +0000 (2008-01-26)
parents 89995ccec15a
children bd78714b8594
line source
1 MAJOR = 1.0
2 MINOR = 0
4 XEN_ROOT = ../../..
5 include $(XEN_ROOT)/tools/Rules.mk
7 XEN_LIBXC = $(XEN_ROOT)/tools/libxc
9 SRCS :=
10 SRCS += flask_op.c
12 CFLAGS += -Werror
13 CFLAGS += -fno-strict-aliasing
14 CFLAGS += $(INCLUDES) -I./include -I$(XEN_LIBXC) -I$(XEN_INCLUDE)
16 # Get gcc to generate the dependencies for us.
17 CFLAGS += -Wp,-MD,.$(@F).d
18 LDFLAGS += -L.
19 DEPS = .*.d
21 LIB_OBJS := $(patsubst %.c,%.o,$(SRCS))
22 PIC_OBJS := $(patsubst %.c,%.opic,$(SRCS))
24 LIB := libflask.a
25 LIB += libflask.so libflask.so.$(MAJOR) libflask.so.$(MAJOR).$(MINOR)
27 .PHONY: all
28 all: build
30 .PHONY: build
31 build:
32 $(MAKE) $(LIB)
34 .PHONY: install
35 install: build
36 $(INSTALL_DIR) $(DESTDIR)$(LIBDIR)
37 $(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)
38 $(INSTALL_PROG) libflask.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)
39 $(INSTALL_DATA) libflask.a $(DESTDIR)$(LIBDIR)
40 ln -sf libflask.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)/libflask.so.$(MAJOR)
41 ln -sf libflask.so.$(MAJOR) $(DESTDIR)$(LIBDIR)/libflask.so
42 $(INSTALL_DATA) include/flask.h $(DESTDIR)$(INCLUDEDIR)
44 .PHONY: TAGS
45 TAGS:
46 etags -t *.c *.h
48 .PHONY: clean
49 clean:
50 rm -rf *.a *.so* *.o *.opic *.rpm $(LIB) *~ $(DEPS) xen
52 # libflask
54 libflask.a: $(LIB_OBJS)
55 $(AR) rc $@ $^
57 libflask.so: libflask.so.$(MAJOR)
58 ln -sf $< $@
59 libflask.so.$(MAJOR): libflask.so.$(MAJOR).$(MINOR)
60 ln -sf $< $@
62 libflask.so.$(MAJOR).$(MINOR): $(PIC_OBJS)
63 $(CC) $(CFLAGS) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libflask.so.$(MAJOR) $(SHLIB_CFLAGS) -o $@ $^
65 -include $(DEPS)