bitkeeper revision 1.1159.223.39 (41f66ce0jpkVCVDUEA2oOsgUQP1D9A)
authorkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>
Tue, 25 Jan 2005 15:59:28 +0000 (15:59 +0000)
committerkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>
Tue, 25 Jan 2005 15:59:28 +0000 (15:59 +0000)
Cset exclude: iap10@labyrinth.cl.cam.ac.uk|ChangeSet|20050122213003|38297

tools/libxc/Makefile
tools/libxutil/Makefile

index 20714e0452ce781d2a98c9bf89f2eaea4763d0b6..3db364201d9832dc007365a1fd0c4248abfcd99e 100644 (file)
@@ -3,10 +3,9 @@ INSTALL_PROG   = $(INSTALL) -m0755
 INSTALL_DATA   = $(INSTALL) -m0644
 INSTALL_DIR    = $(INSTALL) -d -m0755
 
-MAJOR          := 2.0
-MINOR          := 0
-LIB_NAME       := libxc
-SONAME         := $(LIB_NAME).so.$(MAJOR)
+MAJOR    = 2.0
+MINOR    = 0
+SONAME   = libxc.so.$(MAJOR)
 
 CC       = gcc
 
@@ -40,10 +39,9 @@ CFLAGS   += $(INCLUDES) -I.
 CFLAGS   += -Wp,-MD,.$(@F).d
 DEPS     = .*.d
 
-OBJS     := $(patsubst %.c,%.o,$(SRCS))
-PIC_OBJS := $(patsubst %.c,%.opic,$(SRCS))
+OBJS     = $(patsubst %.c,%.o,$(SRCS))
 
-LIB            := $(LIB_NAME).a $(LIB_NAME).so $(LIB_NAME).so.$(MAJOR) $(LIB_NAME).so.$(MAJOR).$(MINOR)
+LIB      = libxc.so libxc.so.$(MAJOR) libxc.so.$(MAJOR).$(MINOR)
 
 all: check-for-zlib mk-symlinks
        $(MAKE) $(LIB)
@@ -76,7 +74,7 @@ install: all
        $(INSTALL_DATA) xc.h $(DESTDIR)/usr/include
 
 clean:
-       rm -rf *.a *.so *.o *.opic *.rpm $(LIB) *~ $(DEPS) xen
+       rm -rf *.a *.so *.o *.rpm $(LIB) *~ $(DEPS) xen
 
 rpm: all
        rm -rf staging
@@ -87,17 +85,11 @@ rpm: all
        mv staging/i386/*.rpm .
        rm -rf staging
 
-$(PIC_OBJS): %.opic: %.c
-       $(CC) $(CPPFLAGS) -DPIC $(CFLAGS) -fPIC -c -o $@ $<
-
-$(LIB_NAME).a: $(OBJS)
-       $(AR) rc $@ $^
-
-$(LIB_NAME).so: $(LIB_NAME).so.$(MAJOR)
-       ln -sf $< $@
-$(LIB_NAME).so.$(MAJOR): $(LIB_NAME).so.$(MAJOR).$(MINOR)
-       ln -sf $< $@
-$(LIB_NAME).so.$(MAJOR).$(MINOR): $(PIC_OBJS)
+libxc.so:
+       ln -sf libxc.so.$(MAJOR) $@
+libxc.so.$(MAJOR):
+       ln -sf libxc.so.$(MAJOR).$(MINOR) $@
+libxc.so.$(MAJOR).$(MINOR): $(OBJS)
        $(CC) -Wl,-soname -Wl,$(SONAME) -shared -o $@ $^ -L../libxutil -lxutil -lz
 
 -include $(DEPS)
index 9efb826b0b19db835243d56e8cde2ab08e19b64f..d68699de282311ee552e897e75139541712d1669 100644 (file)
@@ -24,7 +24,6 @@ LIB_SRCS += sys_string.c
 LIB_SRCS += util.c
 
 LIB_OBJS := $(LIB_SRCS:.c=.o)
-LIB_PIC_OBJS := $(LIB_SRCS:.c=.opic)
 
 CFLAGS   += -Wall
 CFLAGS   += -Werror
@@ -39,7 +38,6 @@ DEPS     = .*.d
 MAJOR    := 2.0
 MINOR    := 0
 LIB_NAME := libxutil
-SO_NAME  := $(LIB_NAME).so.$(MAJOR)
 LIB      := $(LIB_NAME).so 
 LIB      += $(LIB_NAME).so.$(MAJOR)
 LIB      += $(LIB_NAME).so.$(MAJOR).$(MINOR)
@@ -48,17 +46,14 @@ LIB      += $(LIB_NAME).a
 all: check-for-zlib
        $(MAKE) $(LIB)
 
-$(LIB_PIC_OBJS): %.opic: %.c
-       $(CC) $(CPPFLAGS) -DPIC $(CFLAGS) -fPIC -c -o $@ $<
-
 $(LIB_NAME).so: $(LIB_NAME).so.$(MAJOR)
        ln -sf $^ $@
 
 $(LIB_NAME).so.$(MAJOR): $(LIB_NAME).so.$(MAJOR).$(MINOR)
        ln -sf $^ $@
 
-$(LIB_NAME).so.$(MAJOR).$(MINOR): $(LIB_PIC_OBJS)
-       $(CC) -Wl,-soname -Wl,$(SO_NAME) -shared -o $@ $^
+$(LIB_NAME).so.$(MAJOR).$(MINOR): $(LIB_OBJS)
+       $(CC) -Wl,-soname -Wl,$(LIB_NAME).so.$(MAJOR) -shared -o $@ $^
 
 $(LIB_NAME).a: $(LIB_OBJS)
        $(AR) rc $@ $^
@@ -78,7 +73,7 @@ install: all
        ln -sf $(LIB_NAME).so.$(MAJOR) $(DESTDIR)/usr/lib/$(LIB_NAME).so
 
 clean:
-       $(RM) *.a *.so *.so.* *.o *.opic *.rpm 
+       $(RM) *.a *.so *.so.* *.o *.rpm 
        $(RM) *~
        $(RM) $(DEPS)