Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Xen: ARM

[PATCH 4/5] blktap2/libvhd: Build shared objects using -fPIC.

 

 

Xen arm RSS feed   Index | Next | Previous | View Threaded


ian.campbell at citrix

Jan 16, 2012, 4:10 AM

Post #1 of 2 (286 views)
Permalink
[PATCH 4/5] blktap2/libvhd: Build shared objects using -fPIC.

Signed-off-by: Ian Campbell <ian.campbell [at] citrix>
---
tools/blktap2/vhd/lib/Makefile | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/tools/blktap2/vhd/lib/Makefile b/tools/blktap2/vhd/lib/Makefile
index 97379c1..8ee169e 100644
--- a/tools/blktap2/vhd/lib/Makefile
+++ b/tools/blktap2/vhd/lib/Makefile
@@ -45,27 +45,32 @@ LIB-SRCS += atomicio.c
LIB-OBJS = $(patsubst %.c,%.o,$(LIB-SRCS))
LIB-OBJS += $(LVM-UTIL-OBJ)

+LIB-PICOBJS = $(patsubst %.o,%.opic,$(LIB-OBJS))
+
LIBVHD = libvhd.a libvhd.so.$(LIBVHD-MAJOR).$(LIBVHD-MINOR)

all: build

-build: $(LIBVHD-BUILD)
+build: libvhd.a libvhd.so.$(LIBVHD-MAJOR).$(LIBVHD-MINOR)

libvhd.a: $(LIB-OBJS)
+ $(AR) rc $@ $^
+
+libvhd.so.$(LIBVHD-MAJOR).$(LIBVHD-MINOR): $(LIB-PICOBJS)
$(CC) -Wl,$(SONAME_LDFLAG),$(LIBVHD-SONAME) $(SHLIB_LDFLAGS) \
$(LDFLAGS) -o libvhd.so.$(LIBVHD-MAJOR).$(LIBVHD-MINOR) $^ $(LIBS)
ln -sf libvhd.so.$(LIBVHD-MAJOR).$(LIBVHD-MINOR) libvhd.so.$(LIBVHD-MAJOR)
ln -sf libvhd.so.$(LIBVHD-MAJOR) libvhd.so
- $(AR) rc $@ $^

install: all
$(INSTALL_DIR) -p $(DESTDIR)$(INST-DIR)
- $(INSTALL_PROG) $(LIBVHD) $(DESTDIR)$(INST-DIR)
+ $(INSTALL_PROG) libvhd.a $(DESTDIR)$(INST-DIR)
+ $(INSTALL_PROG) libvhd.so.$(LIBVHD-MAJOR).$(LIBVHD-MINOR) $(DESTDIR)$(INST-DIR)
ln -sf libvhd.so.$(LIBVHD-MAJOR).$(LIBVHD-MINOR) $(DESTDIR)$(INST-DIR)/libvhd.so.$(LIBVHD-MAJOR)
ln -sf libvhd.so.$(LIBVHD-MAJOR) $(DESTDIR)$(INST-DIR)/libvhd.so

clean:
- rm -rf *.a *.so* *.o *~ $(DEPS) $(LIBVHD)
+ rm -rf *.a *.so* *.o *.opic *~ $(DEPS) $(LIBVHD)

.PHONY: all build clean install libvhd

--
1.7.8.3


_______________________________________________
Xen-arm mailing list
Xen-arm [at] lists
http://lists.xensource.com/mailman/listinfo/xen-arm


ian.campbell at citrix

Jan 16, 2012, 4:16 AM

Post #2 of 2 (281 views)
Permalink
[PATCH 4/5] blktap2/libvhd: Build shared objects using -fPIC. [In reply to]

Signed-off-by: Ian Campbell <ian.campbell [at] citrix>
---
tools/blktap2/vhd/lib/Makefile | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/tools/blktap2/vhd/lib/Makefile b/tools/blktap2/vhd/lib/Makefile
index 97379c1..8ee169e 100644
--- a/tools/blktap2/vhd/lib/Makefile
+++ b/tools/blktap2/vhd/lib/Makefile
@@ -45,27 +45,32 @@ LIB-SRCS += atomicio.c
LIB-OBJS = $(patsubst %.c,%.o,$(LIB-SRCS))
LIB-OBJS += $(LVM-UTIL-OBJ)

+LIB-PICOBJS = $(patsubst %.o,%.opic,$(LIB-OBJS))
+
LIBVHD = libvhd.a libvhd.so.$(LIBVHD-MAJOR).$(LIBVHD-MINOR)

all: build

-build: $(LIBVHD-BUILD)
+build: libvhd.a libvhd.so.$(LIBVHD-MAJOR).$(LIBVHD-MINOR)

libvhd.a: $(LIB-OBJS)
+ $(AR) rc $@ $^
+
+libvhd.so.$(LIBVHD-MAJOR).$(LIBVHD-MINOR): $(LIB-PICOBJS)
$(CC) -Wl,$(SONAME_LDFLAG),$(LIBVHD-SONAME) $(SHLIB_LDFLAGS) \
$(LDFLAGS) -o libvhd.so.$(LIBVHD-MAJOR).$(LIBVHD-MINOR) $^ $(LIBS)
ln -sf libvhd.so.$(LIBVHD-MAJOR).$(LIBVHD-MINOR) libvhd.so.$(LIBVHD-MAJOR)
ln -sf libvhd.so.$(LIBVHD-MAJOR) libvhd.so
- $(AR) rc $@ $^

install: all
$(INSTALL_DIR) -p $(DESTDIR)$(INST-DIR)
- $(INSTALL_PROG) $(LIBVHD) $(DESTDIR)$(INST-DIR)
+ $(INSTALL_PROG) libvhd.a $(DESTDIR)$(INST-DIR)
+ $(INSTALL_PROG) libvhd.so.$(LIBVHD-MAJOR).$(LIBVHD-MINOR) $(DESTDIR)$(INST-DIR)
ln -sf libvhd.so.$(LIBVHD-MAJOR).$(LIBVHD-MINOR) $(DESTDIR)$(INST-DIR)/libvhd.so.$(LIBVHD-MAJOR)
ln -sf libvhd.so.$(LIBVHD-MAJOR) $(DESTDIR)$(INST-DIR)/libvhd.so

clean:
- rm -rf *.a *.so* *.o *~ $(DEPS) $(LIBVHD)
+ rm -rf *.a *.so* *.o *.opic *~ $(DEPS) $(LIBVHD)

.PHONY: all build clean install libvhd

--
1.7.8.3


_______________________________________________
Xen-arm mailing list
Xen-arm [at] lists
http://lists.xensource.com/mailman/listinfo/xen-arm

Xen arm RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.