On 08/08/2022 12.20, Sean Nyekjaer wrote:
On Mon, Jul 18, 2022 at 04:12:25PM +0000, Ross Burton wrote:
This still seems overkill. You can build minizip from inside the zlib recipe
by fixing the minizip Makefile (fix posted to
https://github.com/madler/zlib/pull/681) and then adding one line to do_compile:
oe_runmake -C contrib/minizip CC="${CC}" CFLAGS="${CFLAGS}"
LDFLAGS="${LDFLAGS}"
A corresponding manual do_install too, obviously.
Ross
Hi Ross,
Thanks for the patch :)
However this will create a minizip that is statically linked with zlib :(
Guess we need to add some more to the Makefile (or just use the
autotools generated one)
Something along this:
diff --git a/contrib/minizip/Makefile b/contrib/minizip/Makefile
index 4a0465f..cf9e79a 100644
--- a/contrib/minizip/Makefile
+++ b/contrib/minizip/Makefile
@@ -1,13 +1,26 @@
CPPFLAGS = -I../..
-UNZ_OBJS = miniunz.o unzip.o ioapi.o ../../libz.a
-ZIP_OBJS = minizip.o zip.o ioapi.o ../../libz.a
+libminizip_so_SOURCES = \
+ ioapi.c \
+ mztools.c \
+ unzip.c \
+ zip.c
-all: miniunz minizip
+miniunzip_SOURCES = miniunz.c
+miniunzip_LDADD = libminizip.so
+minizip_SOURCES = minizip.c
+minizip_LDADD = libminizip.so -lz
-miniunz: $(UNZ_OBJS)
+all: libminizip.so miniunz minizip
-minizip: $(ZIP_OBJS)
+libminizip.so:
+ $(CC) -fPIC -shared $(libminizip_so_SOURCES) -o libminizip.so
+
+miniunz: libminizip.so
+ $(CC) $(miniunzip_SOURCES) $(miniounzip_LDADD) -o miniunz
+
+minizip: libminizip.so
+ $(CC) $(minizip_SOURCES) $(minizip_LDADD) -o minizip
test: miniunz minizip
@rm -f test.*
Or?
Hi Ross, Richard
Back from vacation? :)
/Sean
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#169836):
https://lists.openembedded.org/g/openembedded-core/message/169836
Mute This Topic: https://lists.openembedded.org/mt/92398812/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-