ia64/xen-unstable

view tools/libxutil/Makefile @ 2621:9402048e2325

bitkeeper revision 1.1159.1.218 (416a8128OiHXHyk_Sy8FsA0YUQcEnA)

Merge freefall.cl.cam.ac.uk:/auto/groups/xeno/users/cl349/BK/xeno.bk-26dom0
into freefall.cl.cam.ac.uk:/local/scratch/cl349/xeno.bk-26dom0
author cl349@freefall.cl.cam.ac.uk
date Mon Oct 11 12:48:40 2004 +0000 (2004-10-11)
parents 91fe50be0e6c
children eaee2f25b189 5e2a9d23a580
line source
1 XEN_ROOT = ../..
2 include $(XEN_ROOT)/tools/Make.defs
4 CC = gcc
6 LIB_SRCS :=
7 LIB_SRCS += allocate.c
8 LIB_SRCS += file_stream.c
9 LIB_SRCS += gzip_stream.c
10 LIB_SRCS += iostream.c
11 #LIB_SRCS += sys_net.c
12 LIB_SRCS += sys_string.c
14 LIB_OBJS := $(LIB_SRCS:.c=.o)
16 CFLAGS += -Wall
17 CFLAGS += -Werror
18 CFLAGS += -g
19 CFLAGS += -O3
20 CFLAGS += -fno-strict-aliasing
22 # Get gcc to generate the dependencies for us.
23 CFLAGS += -Wp,-MD,.$(@F).d
24 DEPS = .*.d
26 MAJOR := 1.3
27 MINOR := 0
28 LIB_NAME := libxutil
29 LIB := $(LIB_NAME).so
30 LIB += $(LIB_NAME).so.$(MAJOR)
31 LIB += $(LIB_NAME).so.$(MAJOR).$(MINOR)
33 all: check-for-zlib $(LIB)
35 $(LIB_NAME).so: $(LIB_NAME).so.$(MAJOR)
36 ln -sf $^ $@
38 $(LIB_NAME).so.$(MAJOR): $(LIB_NAME).so.$(MAJOR).$(MINOR)
39 ln -sf $^ $@
41 $(LIB_NAME).so.$(MAJOR).$(MINOR): $(LIB_OBJS)
42 $(CC) -Wl,-soname -Wl,$(LIB_NAME).so.$(MAJOR) -shared -o $@ $^
44 check-for-zlib:
45 @if [ ! -e /usr/include/zlib.h ]; then \
46 echo "***********************************************************"; \
47 echo "ERROR: install zlib header files (http://www.gzip.org/zlib)"; \
48 echo "***********************************************************"; \
49 false; \
50 fi
52 install: all
53 mkdir -p $(prefix)/usr/lib
54 install -m0755 $(LIB) $(prefix)/usr/lib
56 clean:
57 $(RM) *.a *.so *.so.* *.o *.rpm
58 $(RM) *~
59 $(RM) $(DEPS)
61 -include $(DEPS)