debuggers.hg

view tools/libxl/Makefile @ 21067:b4a1832a916f

Update Xen version to 4.0.0-rc6
author Keir Fraser <keir.fraser@citrix.com>
date Tue Mar 09 18:18:05 2010 +0000 (2010-03-09)
parents 1afa8d7bb9ad
children a167ea374f26
line source
1 #
2 # tools/libxl/Makefile
3 #
5 XEN_ROOT = ../..
6 include $(XEN_ROOT)/tools/Rules.mk
8 MAJOR = 1.0
9 MINOR = 0
11 XLUMAJOR = 1.0
12 XLUMINOR = 0
14 #CFLAGS += -Werror
15 CFLAGS += -I. -fPIC
16 CFLAGS += $(CFLAGS_libxenctrl) $(CFLAGS_libxenguest) $(CFLAGS_libxenstore)
18 LIBS = $(LDFLAGS_libxenctrl) $(LDFLAGS_libxenguest) $(LDFLAGS_libxenstore)
20 LIBXL_OBJS-y = osdeps.o
21 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)
23 AUTOINCS= libxlu_cfg_y.h libxlu_cfg_l.h
24 AUTOSRCS= libxlu_cfg_y.c libxlu_cfg_l.c
25 LIBXLU_OBJS = libxlu_cfg_y.o libxlu_cfg_l.o libxlu_cfg.o
27 CLIENTS = xl
29 .PHONY: all
30 all: $(CLIENTS) libxenlight.so libxenlight.a libxlutil.so libxlutil.a \
31 $(AUTOSRCS) $(AUTOINCS)
33 $(AUTOINCS): $(AUTOSRCS)
35 #%_y.h: %_y.c
36 #%_l.h: %_l.c
38 $(LIBXLU_OBJS): $(AUTOINCS)
40 %.c: %.y
41 $(BISON) --output=$@ $<
43 %.c: %.l
44 $(FLEX) --header-file=$*.h --outfile=$@ $<
46 libxenlight.so: libxenlight.so.$(MAJOR)
47 ln -sf $< $@
49 libxenlight.so.$(MAJOR): libxenlight.so.$(MAJOR).$(MINOR)
50 ln -sf $< $@
52 libxenlight.so.$(MAJOR).$(MINOR): $(LIBXL_OBJS)
53 $(CC) $(CFLAGS) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenlight.so.$(MAJOR) $(SHLIB_CFLAGS) -o $@ $^
55 libxenlight.a: $(LIBXL_OBJS)
56 $(AR) rcs libxenlight.a $^
58 libxlutil.so: libxlutil.so.$(XLUMAJOR)
59 ln -sf $< $@
61 libxlutil.so.$(XLUMAJOR): libxlutil.so.$(XLUMAJOR).$(XLUMINOR)
62 ln -sf $< $@
64 libxlutil.so.$(XLUMAJOR).$(XLUMINOR): $(LIBXLU_OBJS)
65 $(CC) $(CFLAGS) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxlutil.so.$(XLUMAJOR) $(SHLIB_CFLAGS) -o $@ $^
67 libxlutil.a: $(LIBXLU_OBJS)
68 $(AR) rcs libxlutil.a $^
70 xl.o: xl.c
71 $(CC) $(CFLAGS) -c xl.c
73 $(CLIENTS): xl.o libxlutil.so libxenlight.so
74 $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
76 .PHONY: install
77 install: all
78 $(INSTALL_PROG) xl $(DESTDIR)$(SBINDIR)
79 $(INSTALL_PROG) libxenlight.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)
80 ln -sf libxenlight.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)/libxenlight.so.$(MAJOR)
81 ln -sf libxenlight.so.$(MAJOR) $(DESTDIR)$(LIBDIR)/libxenlight.so
82 $(INSTALL_DATA) libxenlight.a $(DESTDIR)$(LIBDIR)
83 $(INSTALL_PROG) libxlutil.so.$(XLUMAJOR).$(XLUMINOR) $(DESTDIR)$(LIBDIR)
84 ln -sf libxlutil.so.$(XLUMAJOR).$(XLUMINOR) $(DESTDIR)$(LIBDIR)/libxlutil.so.$(XLUMAJOR)
85 ln -sf libxlutil.so.$(XLUMAJOR) $(DESTDIR)$(LIBDIR)/libxlutil.so
86 $(INSTALL_DATA) libxlutil.a $(DESTDIR)$(LIBDIR)
87 $(INSTALL_DATA) libxl.h $(DESTDIR)$(INCLUDEDIR)
89 .PHONY: clean
90 clean:
91 $(RM) -f *.o *.so* *.a $(CLIENTS) $(DEPS)
92 # $(RM) -f $(AUTOSRCS) $(AUTOINCS)
94 distclean: clean
96 -include $(DEPS)