ia64/xen-unstable

view tools/libxc/Makefile @ 1921:24ecc060e9d7

bitkeeper revision 1.1108.21.1 (41062740xHG36OEbpVAmVX5N9WCaNw)

make vmlinuz really stripped
author cl349@freefall.cl.cam.ac.uk
date Tue Jul 27 09:58:24 2004 +0000 (2004-07-27)
parents 083178f6cdfa
children 01ddb3c0f57e dae98734f12e
line source
2 MAJOR = 1.3
3 MINOR = 0
4 SONAME = libxc.so.$(MAJOR)
6 CC = gcc
8 XEN_ROOT = ../..
9 include $(XEN_ROOT)/tools/Make.defs
11 vpath %.h $(XEN_HYPERVISOR_IFS)
12 INCLUDES += -I $(XEN_HYPERVISOR_IFS)
14 vpath %h $(XEN_LINUX_INCLUDE)
15 INCLUDES += -I $(XEN_LINUX_INCLUDE)
17 vpath %.h $(XEN_XU)
18 INCLUDES += -I $(XEN_XU)
20 vpath %c $(XEN_LIBXUTIL)
21 INCLUDES += -I $(XEN_LIBXUTIL)
23 SRCS :=
24 SRCS += xc_atropos.c
25 SRCS += xc_bvtsched.c
26 SRCS += xc_fbvtsched.c
27 SRCS += xc_domain.c
28 SRCS += xc_evtchn.c
29 SRCS += xc_io.c
30 SRCS += xc_linux_build.c
31 SRCS += xc_linux_restore.c
32 SRCS += xc_linux_save.c
33 SRCS += xc_misc.c
34 SRCS += xc_netbsd_build.c
35 SRCS += xc_physdev.c
36 SRCS += xc_private.c
37 SRCS += xc_rrobin.c
39 CFLAGS += -Wall
40 CFLAGS += -Werror
41 CFLAGS += -O3
42 CFLAGS += -fno-strict-aliasing
43 CFLAGS += $(INCLUDES)
44 # Get gcc to generate the dependencies for us.
45 CFLAGS += -Wp,-MD,.$(@F).d
46 DEPS = .*.d
48 OBJS = $(patsubst %.c,%.o,$(SRCS))
50 LIB = libxc.so libxc.so.$(MAJOR) libxc.so.$(MAJOR).$(MINOR)
52 all: check-for-zlib $(LIB)
54 check-for-zlib:
55 @if [ ! -e /usr/include/zlib.h ]; then \
56 echo "***********************************************************"; \
57 echo "ERROR: install zlib header files (http://www.gzip.org/zlib)"; \
58 echo "***********************************************************"; \
59 false; \
60 fi
62 install: all
63 mkdir -p $(prefix)/usr/lib
64 mkdir -p $(prefix)/usr/include
65 install -m0755 $(LIB) $(prefix)/usr/lib
66 install -m0644 xc.h $(prefix)/usr/include
68 clean:
69 $(RM) *.a *.so *.o *.rpm $(LIB)
70 $(RM) *~
71 $(RM) $(DEPS)
73 rpm: all
74 rm -rf staging
75 mkdir staging
76 mkdir staging/i386
77 rpmbuild --define "staging$$PWD/staging" --define '_builddir.' \
78 --define "_rpmdir$$PWD/staging" -bb rpm.spec
79 mv staging/i386/*.rpm .
80 rm -rf staging
82 libxc.so:
83 ln -sf libxc.so.$(MAJOR) $@
84 libxc.so.$(MAJOR):
85 ln -sf libxc.so.$(MAJOR).$(MINOR) $@
86 libxc.so.$(MAJOR).$(MINOR): $(OBJS)
87 $(CC) -Wl,-soname -Wl,$(SONAME) -shared -o $@ $^ -L../libxutil -lxutil -lz
89 -include $(DEPS)