Thread: DIY - KeK
View Single Post
Old 08-09-2012, 11:49 AM   #194
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,586
Karma: 6299993
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
zlib for Kek_Emu

For ref (PATH="/home/bin:/home/lib:/home/share:/home/include:/bin:/sbin:/sbin")

Zlib Walkthrough

Get thing

Follow the instructions above for getting the file and then

cd zlib (or cd ../zlib if you are following those instructions still)

Configure thing

Code:
(armv6l:1) /home/src/subversion-1.6.18/zlib # ./configure --help
usage:
  configure [--zprefix] [--prefix=PREFIX]  [--eprefix=EXPREFIX]
    [--static] [--64] [--libdir=LIBDIR] [--sharedlibdir=LIBDIR]
    [--includedir=INCLUDEDIR] [--archs="-arch i386 -arch x86_64"]
./configure --prefix=/home --libdir=/home/lib --static --includedir=/home/include

Code:
Checking for gcc...
Building static library libz.a version 1.2.6 with gcc.
Checking for off64_t... Yes.
Checking for fseeko... Yes.
Checking for unistd.h... Yes.
Checking for stdarg.h... Yes.
Checking whether to use vs[n]printf() or s[n]printf()... using vs[n]printf().
Checking for vsnprintf() in stdio.h... Yes.
Checking for return value of vsnprintf()... Yes.
Checking for attribute(visibility) support... Yes.
Make thing

make
Spoiler:

Code:
gcc -O3  -D_LARGEFILE64_SOURCE=1 -I. -c -o example.o test/example.c
gcc -O3  -D_LARGEFILE64_SOURCE=1   -c -o adler32.o adler32.c
gcc -O3  -D_LARGEFILE64_SOURCE=1   -c -o crc32.o crc32.c
gcc -O3  -D_LARGEFILE64_SOURCE=1   -c -o deflate.o deflate.c
gcc -O3  -D_LARGEFILE64_SOURCE=1   -c -o infback.o infback.c
gcc -O3  -D_LARGEFILE64_SOURCE=1   -c -o inffast.o inffast.c
gcc -O3  -D_LARGEFILE64_SOURCE=1   -c -o inflate.o inflate.c
gcc -O3  -D_LARGEFILE64_SOURCE=1   -c -o inftrees.o inftrees.c
gcc -O3  -D_LARGEFILE64_SOURCE=1   -c -o trees.o trees.c
gcc -O3  -D_LARGEFILE64_SOURCE=1   -c -o zutil.o zutil.c
gcc -O3  -D_LARGEFILE64_SOURCE=1   -c -o compress.o compress.c
gcc -O3  -D_LARGEFILE64_SOURCE=1   -c -o uncompr.o uncompr.c
gcc -O3  -D_LARGEFILE64_SOURCE=1   -c -o gzclose.o gzclose.c
gcc -O3  -D_LARGEFILE64_SOURCE=1   -c -o gzlib.o gzlib.c
gcc -O3  -D_LARGEFILE64_SOURCE=1   -c -o gzread.o gzread.c
gcc -O3  -D_LARGEFILE64_SOURCE=1   -c -o gzwrite.o gzwrite.c
ar rc libz.a adler32.o crc32.o deflate.o infback.o inffast.o inflate.o inftrees.o
 trees.o zutil.o compress.o uncompr.o gzclose.o gzlib.o gzread.o gzwrite.o 
gcc -O3  -D_LARGEFILE64_SOURCE=1 -o example example.o -L. libz.a
gcc -O3  -D_LARGEFILE64_SOURCE=1 -I. -c -o minigzip.o test/minigzip.c
gcc -O3  -D_LARGEFILE64_SOURCE=1 -o minigzip minigzip.o -L. libz.a
gcc -O3  -D_LARGEFILE64_SOURCE=1 -I. -D_FILE_OFFSET_BITS=64 -c -o example64.o test/example.c
gcc -O3  -D_LARGEFILE64_SOURCE=1 -o example64 example64.o -L. libz.a
gcc -O3  -D_LARGEFILE64_SOURCE=1 -I. -D_FILE_OFFSET_BITS=64 -c -o minigzip64.o test/minigzip.c
gcc -O3  -D_LARGEFILE64_SOURCE=1 -o minigzip64 minigzip64.o -L. libz.a


Install thing

make install

Code:
cp libz.a /home/lib
chmod 644 /home/lib/libz.a
cp zlib.3 /home/share/man/man3
chmod 644 /home/share/man/man3/zlib.3
cp zlib.pc /home/lib/pkgconfig
chmod 644 /home/lib/pkgconfig/zlib.pc
cp zlib.h zconf.h /home/include
chmod 644 /home/include/zlib.h /home/include/zconf.h
Doned

Note this was done with --static. I´m still not 100% certain that is correct, time will tell no doubt.
twobob is offline   Reply With Quote