debuggers.hg
annotate tools/libxutil/Makefile @ 3623:0c8d62df84ae
bitkeeper revision 1.1159.223.51 (41fac87bR5uD5TAFu58tuaTMLSmbrw)
Fix makefiles creating copies instead of symlinks of shared libs.
Signed-off-by: Arun Sharma <arun.sharma@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@intel.com>
Fix makefiles creating copies instead of symlinks of shared libs.
Signed-off-by: Arun Sharma <arun.sharma@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@intel.com>
author | kaf24@scramble.cl.cam.ac.uk |
---|---|
date | Fri Jan 28 23:19:23 2005 +0000 (2005-01-28) |
parents | 308203ddc173 |
children | c3c66a2762cb f9b3b23cf5ff |
rev | line source |
---|---|
mjw@1661 | 1 XEN_ROOT = ../.. |
iap10@3529 | 2 INSTALL = install |
iap10@3529 | 3 INSTALL_DATA = $(INSTALL) -m0644 |
iap10@3529 | 4 INSTALL_PROG = $(INSTALL) -m0755 |
iap10@3529 | 5 INSTALL_DIR = $(INSTALL) -d -m0755 |
iap10@3529 | 6 |
kaf24@3587 | 7 include $(XEN_ROOT)/tools/Rules.mk |
mjw@1661 | 8 |
mjw@1661 | 9 CC = gcc |
mjw@1661 | 10 |
mjw@1661 | 11 LIB_SRCS := |
mjw@1661 | 12 LIB_SRCS += allocate.c |
mjw@3116 | 13 LIB_SRCS += enum.c |
mjw@1661 | 14 LIB_SRCS += file_stream.c |
mjw@1661 | 15 LIB_SRCS += gzip_stream.c |
mjw@3116 | 16 LIB_SRCS += hash_table.c |
mjw@1661 | 17 LIB_SRCS += iostream.c |
mjw@3116 | 18 LIB_SRCS += lexis.c |
mjw@3116 | 19 LIB_SRCS += string_stream.c |
mjw@3116 | 20 LIB_SRCS += sxpr.c |
mjw@3116 | 21 LIB_SRCS += sxpr_parser.c |
mjw@3116 | 22 LIB_SRCS += sys_net.c |
mjw@1661 | 23 LIB_SRCS += sys_string.c |
mjw@3116 | 24 LIB_SRCS += util.c |
mjw@1661 | 25 |
mjw@1661 | 26 LIB_OBJS := $(LIB_SRCS:.c=.o) |
mjw@1661 | 27 |
kaf24@3575 | 28 CFLAGS += -Wall -Werror -O3 -fno-strict-aliasing |
kaf24@1664 | 29 |
mjw@1661 | 30 # Get gcc to generate the dependencies for us. |
mjw@1661 | 31 CFLAGS += -Wp,-MD,.$(@F).d |
mjw@1661 | 32 DEPS = .*.d |
mjw@1661 | 33 |
kaf24@3262 | 34 MAJOR := 2.0 |
kaf24@1664 | 35 MINOR := 0 |
kaf24@1664 | 36 LIB_NAME := libxutil |
kaf24@1664 | 37 LIB := $(LIB_NAME).so |
mjw@2326 | 38 LIB += $(LIB_NAME).so.$(MAJOR) |
mjw@2326 | 39 LIB += $(LIB_NAME).so.$(MAJOR).$(MINOR) |
mjw@3116 | 40 LIB += $(LIB_NAME).a |
mjw@1661 | 41 |
kaf24@2878 | 42 all: check-for-zlib |
kaf24@2878 | 43 $(MAKE) $(LIB) |
mjw@1661 | 44 |
mjw@2285 | 45 $(LIB_NAME).so: $(LIB_NAME).so.$(MAJOR) |
mjw@2285 | 46 ln -sf $^ $@ |
mjw@1661 | 47 |
mjw@2285 | 48 $(LIB_NAME).so.$(MAJOR): $(LIB_NAME).so.$(MAJOR).$(MINOR) |
mjw@2285 | 49 ln -sf $^ $@ |
mjw@1661 | 50 |
kaf24@3574 | 51 $(LIB_NAME).so.$(MAJOR).$(MINOR): $(LIB_OBJS) |
kaf24@3574 | 52 $(CC) -Wl,-soname -Wl,$(LIB_NAME).so.$(MAJOR) -shared -o $@ $^ |
mjw@1661 | 53 |
mjw@3116 | 54 $(LIB_NAME).a: $(LIB_OBJS) |
mjw@3116 | 55 $(AR) rc $@ $^ |
mjw@3116 | 56 |
mjw@1661 | 57 check-for-zlib: |
mjw@1661 | 58 @if [ ! -e /usr/include/zlib.h ]; then \ |
mjw@1661 | 59 echo "***********************************************************"; \ |
mjw@1661 | 60 echo "ERROR: install zlib header files (http://www.gzip.org/zlib)"; \ |
mjw@1661 | 61 echo "***********************************************************"; \ |
mjw@1661 | 62 false; \ |
mjw@1661 | 63 fi |
mjw@1661 | 64 |
mjw@1661 | 65 install: all |
cl349@3599 | 66 [ -d $(DESTDIR)/usr/lib ] || $(INSTALL_DIR) -p $(DESTDIR)/usr/lib |
kaf24@3623 | 67 $(INSTALL_PROG) $(LIB_NAME).so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/lib |
iap10@3537 | 68 ln -sf $(LIB_NAME).so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/lib/$(LIB_NAME).so.$(MAJOR) |
iap10@3537 | 69 ln -sf $(LIB_NAME).so.$(MAJOR) $(DESTDIR)/usr/lib/$(LIB_NAME).so |
mjw@1661 | 70 |
mjw@1661 | 71 clean: |
kaf24@3574 | 72 $(RM) *.a *.so *.so.* *.o *.rpm |
mjw@1661 | 73 $(RM) *~ |
mjw@1661 | 74 $(RM) $(DEPS) |
mjw@1661 | 75 |
mjw@1661 | 76 -include $(DEPS) |