direct-io.hg

view tools/xc/lib/Makefile @ 1603:6ad69c5289fb

bitkeeper revision 1.1023.1.3 (40e0441fshJIGN--orNXodxwL0-zXw)

Add rrobin.
author mjw@wray-m-3.hpl.hp.com
date Mon Jun 28 16:15:27 2004 +0000 (2004-06-28)
parents c5d25124f417
children 63fda094edbd
line source
2 MAJOR = 1.3
3 MINOR = 0
4 SONAME = libxc.so.$(MAJOR)
6 CC = gcc
8 XEN_ROOT = ../../..
10 vpath %.h $(XEN_ROOT)/xen/include/hypervisor-ifs
11 INCLUDES += -I $(XEN_ROOT)/xen/include/hypervisor-ifs
13 vpath %.h $(XEN_ROOT)/tools/xu/lib
14 INCLUDES += -I $(XEN_ROOT)/tools/xu/lib
16 vpath %h $(XEN_ROOT)/linux-xen-sparse/include
17 INCLUDES += -I $(XEN_ROOT)/linux-xen-sparse/include
19 vpath %c $(XEN_ROOT)/tools/lib
20 INCLUDES += -I $(XEN_ROOT)/tools/lib
22 LIB_SRCS :=
23 LIB_SRCS += allocate.c
24 #LIB_SRCS += enum.c
25 LIB_SRCS += file_stream.c
26 LIB_SRCS += gzip_stream.c
27 #LIB_SRCS += hash_table.c
28 LIB_SRCS += iostream.c
29 #LIB_SRCS += kernel_stream.c
30 #LIB_SRCS += lexis.c
31 #LIB_SRCS += lzi_stream.c
32 #LIB_SRCS += lzo_stream.c
33 #LIB_SRCS += marshal.c
34 #LIB_SRCS += socket_stream.c
35 #LIB_SRCS += string_stream.c
36 #LIB_SRCS += sxpr.c
37 #LIB_SRCS += sxpr_parser.c
38 LIB_SRCS += sys_net.c
39 LIB_SRCS += sys_string.c
40 #LIB_SRCS += xdr.c
42 SRCS :=
43 SRCS += xc_atropos.c
44 SRCS += xc_bvtsched.c
45 SRCS += xc_domain.c
46 SRCS += xc_evtchn.c
47 SRCS += xc_io.c
48 SRCS += xc_linux_build.c
49 SRCS += xc_linux_restore.c
50 SRCS += xc_linux_save.c
51 SRCS += xc_misc.c
52 SRCS += xc_netbsd_build.c
53 SRCS += xc_physdev.c
54 SRCS += xc_private.c
55 SRCS += xc_rrobin.c
57 SRCS += $(LIB_SRCS)
59 #CFLAGS += -I../../../xen/include/hypervisor-ifs
60 #CFLAGS += -I../../xu/lib
61 #CFLAGS += -I../../../linux-xen-sparse/include
63 CFLAGS += -Wall
64 CFLAGS += -Werror
65 CFLAGS += -g
66 CFLAGS += -O3
67 CFLAGS += -fno-strict-aliasing
68 CFLAGS += $(INCLUDES)
69 # Get gcc to generate the dependencies for us.
70 CFLAGS += -Wp,-MD,.$(@F).d
71 DEPS = .*.d
73 OBJS = $(patsubst %.c,%.o,$(SRCS))
75 LIB = libxc.so libxc.so.$(MAJOR) libxc.so.$(MAJOR).$(MINOR)
77 all: check-for-zlib $(LIB)
79 check-for-zlib:
80 @if [ ! -e /usr/include/zlib.h ]; then \
81 echo "***********************************************************"; \
82 echo "ERROR: install zlib header files (http://www.gzip.org/zlib)"; \
83 echo "***********************************************************"; \
84 false; \
85 fi
87 install: all
88 mkdir -p $(prefix)/usr/lib
89 mkdir -p $(prefix)/usr/include
90 install -m0755 $(LIB) $(prefix)/usr/lib
91 install -m0644 xc.h $(prefix)/usr/include
93 clean:
94 $(RM) *.a *.so *.o *.rpm $(LIB)
95 $(RM) *~
96 $(RM) $(DEPS)
98 rpm: all
99 rm -rf staging
100 mkdir staging
101 mkdir staging/i386
102 rpmbuild --define "staging$$PWD/staging" --define '_builddir.' \
103 --define "_rpmdir$$PWD/staging" -bb rpm.spec
104 mv staging/i386/*.rpm .
105 rm -rf staging
107 libxc.so:
108 ln -sf libxc.so.$(MAJOR) $@
109 libxc.so.$(MAJOR):
110 ln -sf libxc.so.$(MAJOR).$(MINOR) $@
111 libxc.so.$(MAJOR).$(MINOR): $(OBJS)
112 $(CC) -Wl,-soname -Wl,$(SONAME) -shared -o $@ $^ -lz
114 %.o: %.c Makefile
116 # $(CC) $(CFLAGS) -o $@ $<
118 -include $(DEPS)