Message ID | 52e42efe0812180616q28c10c72nae087e214c014676@mail.gmail.com |
---|---|
State | New, archived |
Headers | show |
On Thu, Dec 18, 2008 at 03:16:12PM +0100, Sidney Amani wrote: >>From b557d3f22d16fc61788a85f5ec6cc02e0195c810 Mon Sep 17 00:00:00 2001 >From: Sidney Amani <amani_s@epitech.net> >Date: Wed, 17 Dec 2008 12:46:42 +0100 >Subject: [PATCH] Makefile export shared libraries > >Export shared libraries. Other userspace tools might >use them. > >Signed-off-by: Sidney Amani <amani_s@epitech.net> >Signed-off-by: Corentin Chary <chary_c@epitech.net> I don't see where you actually create a shared library here. There is no soname set, for example. I'm not opposed to creating shared libraries, but it should be done properly so that if the API/ABI changes then we can bump the soname, etc. josh
On Thu, Dec 18, 2008 at 8:12 PM, Josh Boyer <jwboyer@gmail.com> wrote: > > I don't see where you actually create a shared library here. There > is no soname set, for example. I'm not opposed to creating shared > libraries, but it should be done properly so that if the API/ABI > changes then we can bump the soname, etc. The rules which create the .so are: shared: $(addsuffix .so, $(LIBS)) %.pic.o: %.c $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $< -c -o $@ %.so: %.pic.o $(CC) $(LDFLAGS) -shared -o $@ $^ We forgot to add -Wl,-soname,foo . Is there anything else ? If it's ok we will re-send the patch tomorow.
diff --git a/ubi-utils/new-utils/Makefile b/ubi-utils/new-utils/Makefile index 9ba0d95..a975a99 100644 --- a/ubi-utils/new-utils/Makefile +++ b/ubi-utils/new-utils/Makefile @@ -7,6 +7,7 @@ DESTDIR := /usr/local SBINDIR=/usr/sbin MANDIR=/usr/man INCLUDEDIR=/usr/include +LIBDIR=/lib CC := $(CROSS)gcc AR := $(CROSS)ar @@ -22,7 +23,9 @@ UTILS = ubiupdatevol ubimkvol ubirmvol ubicrc32 ubinfo ubiattach \ vpath %.c src -all: $(UTILS) +all: $(UTILS) shared + +shared: $(addsuffix .so, $(LIBS)) # The below cancels existing implicite rule to make programs from .c files,