ia64/xen-unstable

view tools/libxc/Makefile @ 2422:2274a0386cc9

bitkeeper revision 1.1159.69.5 (4138e882jA1YaR_OfTfNHe_uT4PDIg)

trivial
author iap10@labyrinth.cl.cam.ac.uk
date Fri Sep 03 21:56:18 2004 +0000 (2004-09-03)
parents dae98734f12e
children c084a63b2b64 0a4b76b6b5a0
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 %c $(XEN_LIBXUTIL)
18 INCLUDES += -I $(XEN_LIBXUTIL)
20 SRCS :=
21 SRCS += xc_atropos.c
22 SRCS += xc_bvtsched.c
23 SRCS += xc_fbvtsched.c
24 SRCS += xc_domain.c
25 SRCS += xc_evtchn.c
26 SRCS += xc_io.c
27 SRCS += xc_linux_build.c
28 SRCS += xc_linux_restore.c
29 SRCS += xc_linux_save.c
30 SRCS += xc_misc.c
31 SRCS += xc_netbsd_build.c
32 SRCS += xc_physdev.c
33 SRCS += xc_private.c
34 SRCS += xc_rrobin.c
36 CFLAGS += -Wall
37 CFLAGS += -Werror
38 CFLAGS += -O3
39 CFLAGS += -fno-strict-aliasing
40 CFLAGS += $(INCLUDES)
41 # Get gcc to generate the dependencies for us.
42 CFLAGS += -Wp,-MD,.$(@F).d
43 DEPS = .*.d
45 OBJS = $(patsubst %.c,%.o,$(SRCS))
47 LIB = libxc.so libxc.so.$(MAJOR) libxc.so.$(MAJOR).$(MINOR)
49 all: check-for-zlib $(LIB)
51 check-for-zlib:
52 @if [ ! -e /usr/include/zlib.h ]; then \
53 echo "***********************************************************"; \
54 echo "ERROR: install zlib header files (http://www.gzip.org/zlib)"; \
55 echo "***********************************************************"; \
56 false; \
57 fi
59 install: all
60 mkdir -p $(prefix)/usr/lib
61 mkdir -p $(prefix)/usr/include
62 install -m0755 $(LIB) $(prefix)/usr/lib
63 install -m0644 xc.h $(prefix)/usr/include
65 clean:
66 $(RM) *.a *.so *.o *.rpm $(LIB)
67 $(RM) *~
68 $(RM) $(DEPS)
70 rpm: all
71 rm -rf staging
72 mkdir staging
73 mkdir staging/i386
74 rpmbuild --define "staging$$PWD/staging" --define '_builddir.' \
75 --define "_rpmdir$$PWD/staging" -bb rpm.spec
76 mv staging/i386/*.rpm .
77 rm -rf staging
79 libxc.so:
80 ln -sf libxc.so.$(MAJOR) $@
81 libxc.so.$(MAJOR):
82 ln -sf libxc.so.$(MAJOR).$(MINOR) $@
83 libxc.so.$(MAJOR).$(MINOR): $(OBJS)
84 $(CC) -Wl,-soname -Wl,$(SONAME) -shared -o $@ $^ -L../libxutil -lxutil -lz
86 -include $(DEPS)