ia64/xen-unstable

view tools/libxc/Makefile @ 10691:dab0a5650e6d

[IA64] Creates tools/libxc/ia64 directory.

Split and move xc_ia64_stubs.c into ia64/xc_ia64_hvm_build.c and
ia64/xc_ia64_stubs.c
Creates ia64/Makefile.
Clean up (static in const) in xc_ia64_hvm_build.c

Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
[whitespace cleanups in new files]
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
author awilliam@xenbuild.aw
date Tue Jul 11 11:29:25 2006 -0600 (2006-07-11)
parents 1a52829fd60e
children f7b43e5c42b9
line source
2 INSTALL = install
3 INSTALL_PROG = $(INSTALL) -m0755
4 INSTALL_DATA = $(INSTALL) -m0644
5 INSTALL_DIR = $(INSTALL) -d -m0755
7 MAJOR = 3.0
8 MINOR = 0
10 XEN_ROOT = ../..
11 include $(XEN_ROOT)/tools/Rules.mk
13 CTRL_SRCS-y :=
14 CTRL_SRCS-y += xc_bvtsched.c
15 CTRL_SRCS-y += xc_core.c
16 CTRL_SRCS-y += xc_domain.c
17 CTRL_SRCS-y += xc_evtchn.c
18 CTRL_SRCS-y += xc_misc.c
19 CTRL_SRCS-y += xc_acm.c
20 CTRL_SRCS-y += xc_physdev.c
21 CTRL_SRCS-y += xc_private.c
22 CTRL_SRCS-y += xc_sedf.c
23 CTRL_SRCS-y += xc_csched.c
24 CTRL_SRCS-y += xc_tbuf.c
25 CTRL_SRCS-$(CONFIG_X86) += xc_ptrace.c xc_ptrace_core.c xc_pagetab.c
26 CTRL_SRCS-$(CONFIG_Linux) += xc_linux.c
28 GUEST_SRCS-y :=
29 GUEST_SRCS-y += xc_linux_build.c
30 GUEST_SRCS-y += xc_load_bin.c
31 GUEST_SRCS-y += xc_load_elf.c
32 GUEST_SRCS-y += xg_private.c
33 GUEST_SRCS-$(CONFIG_MIGRATE) += xc_linux_restore.c xc_linux_save.c
34 GUEST_SRCS-$(CONFIG_HVM) += xc_hvm_build.c
36 # This Makefile only adds files if CONFIG_IA64 is y.
37 include ia64/Makefile
39 CFLAGS += -Werror
40 CFLAGS += -fno-strict-aliasing
41 CFLAGS += $(INCLUDES) -I.
43 # Define this to make it possible to run valgrind on code linked with these
44 # libraries.
45 #CFLAGS += -DVALGRIND -O0 -ggdb3
47 # Get gcc to generate the dependencies for us.
48 CFLAGS += -Wp,-MD,.$(@F).d
49 LDFLAGS += -L.
50 DEPS = .*.d
52 CTRL_LIB_OBJS := $(patsubst %.c,%.o,$(CTRL_SRCS-y))
53 CTRL_PIC_OBJS := $(patsubst %.c,%.opic,$(CTRL_SRCS-y))
55 GUEST_LIB_OBJS := $(patsubst %.c,%.o,$(GUEST_SRCS-y))
56 GUEST_PIC_OBJS := $(patsubst %.c,%.opic,$(GUEST_SRCS-y))
58 LIB := libxenctrl.a
59 LIB += libxenctrl.so libxenctrl.so.$(MAJOR) libxenctrl.so.$(MAJOR).$(MINOR)
61 LIB += libxenguest.a
62 LIB += libxenguest.so libxenguest.so.$(MAJOR) libxenguest.so.$(MAJOR).$(MINOR)
64 .PHONY: all
65 all: build
67 .PHONY: build
68 build: check-for-zlib mk-symlinks
69 $(MAKE) $(LIB)
71 .PHONY: check-for-zlib
72 check-for-zlib:
73 @if [ ! -e /usr/include/zlib.h ]; then \
74 echo "***********************************************************"; \
75 echo "ERROR: install zlib header files (http://www.gzip.org/zlib)"; \
76 echo "***********************************************************"; \
77 false; \
78 fi
80 .PHONY: install
81 install: build
82 [ -d $(DESTDIR)/usr/$(LIBDIR) ] || $(INSTALL_DIR) $(DESTDIR)/usr/$(LIBDIR)
83 [ -d $(DESTDIR)/usr/include ] || $(INSTALL_DIR) $(DESTDIR)/usr/include
84 $(INSTALL_PROG) libxenctrl.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/$(LIBDIR)
85 $(INSTALL_DATA) libxenctrl.a $(DESTDIR)/usr/$(LIBDIR)
86 ln -sf libxenctrl.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/$(LIBDIR)/libxenctrl.so.$(MAJOR)
87 ln -sf libxenctrl.so.$(MAJOR) $(DESTDIR)/usr/$(LIBDIR)/libxenctrl.so
88 $(INSTALL_DATA) xenctrl.h $(DESTDIR)/usr/include
90 $(INSTALL_PROG) libxenguest.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/$(LIBDIR)
91 $(INSTALL_DATA) libxenguest.a $(DESTDIR)/usr/$(LIBDIR)
92 ln -sf libxenguest.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/$(LIBDIR)/libxenguest.so.$(MAJOR)
93 ln -sf libxenguest.so.$(MAJOR) $(DESTDIR)/usr/$(LIBDIR)/libxenguest.so
94 $(INSTALL_DATA) xenguest.h $(DESTDIR)/usr/include
96 .PHONY: TAGS
97 TAGS:
98 etags -t *.c *.h
100 .PHONY: clean
101 clean:
102 rm -rf *.a *.so* *.o *.opic *.rpm $(LIB) *~ $(DEPS) xen
103 rm -rf ia64/*.o ia64/*.opic
105 .PHONY: rpm
106 rpm: build
107 rm -rf staging
108 mkdir staging
109 mkdir staging/i386
110 rpmbuild --define "staging$$PWD/staging" --define '_builddir.' \
111 --define "_rpmdir$$PWD/staging" -bb rpm.spec
112 mv staging/i386/*.rpm .
113 rm -rf staging
115 # libxenctrl
117 libxenctrl.a: $(CTRL_LIB_OBJS)
118 $(AR) rc $@ $^
120 libxenctrl.so: libxenctrl.so.$(MAJOR)
121 ln -sf $< $@
122 libxenctrl.so.$(MAJOR): libxenctrl.so.$(MAJOR).$(MINOR)
123 ln -sf $< $@
125 libxenctrl.so.$(MAJOR).$(MINOR): $(CTRL_PIC_OBJS)
126 $(CC) $(CFLAGS) $(LDFLAGS) -Wl,-soname -Wl,libxenctrl.so.$(MAJOR) -shared -o $@ $^
128 # libxenguest
130 libxenguest.a: $(GUEST_LIB_OBJS)
131 $(AR) rc $@ $^
133 libxenguest.so: libxenguest.so.$(MAJOR)
134 ln -sf $< $@
135 libxenguest.so.$(MAJOR): libxenguest.so.$(MAJOR).$(MINOR)
136 ln -sf $< $@
138 libxenguest.so.$(MAJOR).$(MINOR): $(GUEST_PIC_OBJS) libxenctrl.so
139 $(CC) $(CFLAGS) $(LDFLAGS) -Wl,-soname -Wl,libxenguest.so.$(MAJOR) -shared -o $@ $^ -lz -lxenctrl
141 -include $(DEPS)