debuggers.hg

view tools/flask/libflask/Makefile @ 22848:6341fe0f4e5a

Added tag 4.1.0-rc2 for changeset 9dca60d88c63
author Keir Fraser <keir@xen.org>
date Tue Jan 25 14:06:55 2011 +0000 (2011-01-25)
parents d3de6f484610
children
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.
20 LIB_OBJS := $(patsubst %.c,%.o,$(SRCS))
21 PIC_OBJS := $(patsubst %.c,%.opic,$(SRCS))
23 LIB := libflask.a
24 LIB += libflask.so libflask.so.$(MAJOR) libflask.so.$(MAJOR).$(MINOR)
26 .PHONY: all
27 all: build
29 .PHONY: build
30 build:
31 $(MAKE) $(LIB)
33 .PHONY: install
34 install: build
35 $(INSTALL_DIR) $(DESTDIR)$(LIBDIR)
36 $(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)
37 $(INSTALL_PROG) libflask.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)
38 $(INSTALL_DATA) libflask.a $(DESTDIR)$(LIBDIR)
39 ln -sf libflask.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)/libflask.so.$(MAJOR)
40 ln -sf libflask.so.$(MAJOR) $(DESTDIR)$(LIBDIR)/libflask.so
41 $(INSTALL_DATA) include/libflask.h $(DESTDIR)$(INCLUDEDIR)/xen/xsm
43 .PHONY: TAGS
44 TAGS:
45 etags -t *.c *.h
47 .PHONY: clean
48 clean:
49 rm -rf *.a *.so* *.o *.opic *.rpm $(LIB) *~ $(DEPS) xen
51 # libflask
53 libflask.a: $(LIB_OBJS)
54 $(AR) rc $@ $^
56 libflask.so: libflask.so.$(MAJOR)
57 ln -sf $< $@
58 libflask.so.$(MAJOR): libflask.so.$(MAJOR).$(MINOR)
59 ln -sf $< $@
61 libflask.so.$(MAJOR).$(MINOR): $(PIC_OBJS)
62 $(CC) $(CFLAGS) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libflask.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $^
64 -include $(DEPS)