ia64/xen-unstable

view tools/libxc/Makefile @ 16909:7e5bae3586ee

libxc: Remove duplicate zlib check.

It is already checked in tools/check/check_zlib.

Signed-off-by: Bastian Blank <waldi@debian.org>
author Keir Fraser <keir.fraser@citrix.com>
date Sun Jan 27 12:53:56 2008 +0000 (2008-01-27)
parents b9004e222fde
children d5dd9a457337
line source
1 XEN_ROOT = ../..
2 include $(XEN_ROOT)/tools/Rules.mk
4 MAJOR = 3.2
5 MINOR = 0
7 CTRL_SRCS-y :=
8 CTRL_SRCS-y += xc_core.c
9 CTRL_SRCS-$(CONFIG_X86) += xc_core_x86.c
10 CTRL_SRCS-$(CONFIG_IA64) += xc_core_ia64.c
11 CTRL_SRCS-$(CONFIG_POWERPC) += xc_core_powerpc.c
12 CTRL_SRCS-y += xc_domain.c
13 CTRL_SRCS-y += xc_evtchn.c
14 CTRL_SRCS-y += xc_misc.c
15 CTRL_SRCS-y += xc_acm.c
16 CTRL_SRCS-y += xc_flask.c
17 CTRL_SRCS-y += xc_physdev.c
18 CTRL_SRCS-y += xc_private.c
19 CTRL_SRCS-y += xc_sedf.c
20 CTRL_SRCS-y += xc_csched.c
21 CTRL_SRCS-y += xc_tbuf.c
22 CTRL_SRCS-y += xc_resume.c
23 CTRL_SRCS-$(CONFIG_X86) += xc_pagetab.c
24 CTRL_SRCS-$(CONFIG_Linux) += xc_linux.c
25 CTRL_SRCS-$(CONFIG_SunOS) += xc_solaris.c
26 CTRL_SRCS-$(CONFIG_X86_Linux) += xc_ptrace.c xc_ptrace_core.c
27 CTRL_SRCS-$(CONFIG_NetBSD) += xc_netbsd.c
29 GUEST_SRCS-y :=
30 GUEST_SRCS-y += xg_private.c
31 GUEST_SRCS-$(CONFIG_MIGRATE) += xc_domain_restore.c xc_domain_save.c
32 GUEST_SRCS-$(CONFIG_HVM) += xc_hvm_build.c
34 VPATH = ../../xen/common/libelf
35 CFLAGS += -I../../xen/common/libelf
37 GUEST_SRCS-y += libelf-tools.c libelf-loader.c
38 GUEST_SRCS-y += libelf-dominfo.c libelf-relocate.c
40 # new domain builder
41 GUEST_SRCS-y += xc_dom_core.c xc_dom_boot.c
42 GUEST_SRCS-y += xc_dom_elfloader.c
43 GUEST_SRCS-y += xc_dom_binloader.c
44 GUEST_SRCS-y += xc_dom_compat_linux.c
46 GUEST_SRCS-$(CONFIG_X86) += xc_dom_x86.c
47 GUEST_SRCS-$(CONFIG_IA64) += xc_dom_ia64.c
48 GUEST_SRCS-$(CONFIG_POWERPC) += xc_dom_powerpc.c
50 -include $(XEN_TARGET_ARCH)/Makefile
52 CFLAGS += -Werror -Wmissing-prototypes
53 CFLAGS += $(INCLUDES) -I. -I../xenstore -I../include
55 # Needed for posix_fadvise64() in xc_linux.c
56 CFLAGS-$(CONFIG_Linux) += -D_GNU_SOURCE
58 # Define this to make it possible to run valgrind on code linked with these
59 # libraries.
60 #CFLAGS += -DVALGRIND -O0 -ggdb3
62 # Get gcc to generate the dependencies for us.
63 CFLAGS += -Wp,-MD,.$(@F).d
64 LDFLAGS += -L.
65 DEPS = .*.d
67 CTRL_LIB_OBJS := $(patsubst %.c,%.o,$(CTRL_SRCS-y))
68 CTRL_PIC_OBJS := $(patsubst %.c,%.opic,$(CTRL_SRCS-y))
70 GUEST_LIB_OBJS := $(patsubst %.c,%.o,$(GUEST_SRCS-y))
71 GUEST_PIC_OBJS := $(patsubst %.c,%.opic,$(GUEST_SRCS-y))
73 LIB := libxenctrl.a
74 LIB += libxenctrl.so libxenctrl.so.$(MAJOR) libxenctrl.so.$(MAJOR).$(MINOR)
76 LIB += libxenguest.a
77 LIB += libxenguest.so libxenguest.so.$(MAJOR) libxenguest.so.$(MAJOR).$(MINOR)
79 .PHONY: all
80 all: build
82 .PHONY: build
83 build: $(LIB)
84 $(MAKE) $(LIB)
86 .PHONY: install
87 install: build
88 $(INSTALL_DIR) $(DESTDIR)$(LIBDIR)
89 $(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)
90 $(INSTALL_PROG) libxenctrl.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)
91 $(INSTALL_DATA) libxenctrl.a $(DESTDIR)$(LIBDIR)
92 ln -sf libxenctrl.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)/libxenctrl.so.$(MAJOR)
93 ln -sf libxenctrl.so.$(MAJOR) $(DESTDIR)$(LIBDIR)/libxenctrl.so
94 $(INSTALL_DATA) xenctrl.h $(DESTDIR)$(INCLUDEDIR)
96 $(INSTALL_PROG) libxenguest.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)
97 $(INSTALL_DATA) libxenguest.a $(DESTDIR)$(LIBDIR)
98 ln -sf libxenguest.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)/libxenguest.so.$(MAJOR)
99 ln -sf libxenguest.so.$(MAJOR) $(DESTDIR)$(LIBDIR)/libxenguest.so
100 $(INSTALL_DATA) xenguest.h $(DESTDIR)$(INCLUDEDIR)
102 .PHONY: TAGS
103 TAGS:
104 etags -t *.c *.h
106 .PHONY: clean
107 clean:
108 rm -rf *.rpm $(LIB) *~ $(DEPS) \
109 $(CTRL_LIB_OBJS) $(CTRL_PIC_OBJS) \
110 $(GUEST_LIB_OBJS) $(GUEST_PIC_OBJS)
112 .PHONY: rpm
113 rpm: build
114 rm -rf staging
115 mkdir staging
116 mkdir staging/i386
117 rpmbuild --define "staging$$PWD/staging" --define '_builddir.' \
118 --define "_rpmdir$$PWD/staging" -bb rpm.spec
119 mv staging/i386/*.rpm .
120 rm -rf staging
122 # libxenctrl
124 libxenctrl.a: $(CTRL_LIB_OBJS)
125 $(AR) rc $@ $^
127 libxenctrl.so: libxenctrl.so.$(MAJOR)
128 ln -sf $< $@
129 libxenctrl.so.$(MAJOR): libxenctrl.so.$(MAJOR).$(MINOR)
130 ln -sf $< $@
132 libxenctrl.so.$(MAJOR).$(MINOR): $(CTRL_PIC_OBJS)
133 $(CC) $(CFLAGS) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenctrl.so.$(MAJOR) $(SHLIB_CFLAGS) -o $@ $^ -lpthread
135 # libxenguest
137 libxenguest.a: $(GUEST_LIB_OBJS)
138 $(AR) rc $@ $^
140 libxenguest.so: libxenguest.so.$(MAJOR)
141 ln -sf $< $@
142 libxenguest.so.$(MAJOR): libxenguest.so.$(MAJOR).$(MINOR)
143 ln -sf $< $@
145 libxenguest.so.$(MAJOR).$(MINOR): $(GUEST_PIC_OBJS) libxenctrl.so
146 $(CC) $(CFLAGS) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenguest.so.$(MAJOR) $(SHLIB_CFLAGS) -o $@ $(GUEST_PIC_OBJS) -lz -lxenctrl -lpthread
148 -include $(DEPS)