Skip to content

Instantly share code, notes, and snippets.

@mmmunk
Last active November 11, 2016 08:22
Show Gist options
  • Save mmmunk/3502efc84379c7590004031874beadc0 to your computer and use it in GitHub Desktop.
Save mmmunk/3502efc84379c7590004031874beadc0 to your computer and use it in GitHub Desktop.
Guidelines for setting up libpng and libjpeg for embedding
For alle: Start med cd til roden af projekt-mappe
----- ZLIB -----
# wget -P ./download/ http://zlib.net/zlib-1.2.8.tar.gz
- Slet eksisterende zlib dir
- Udpak i zlib dir således at strukturen er: ./zlib/zlib.h
# cd zlib
# ./configure --static
# make static
# rm *.o
----- LIBPNG -----
# wget -P ./download/ ftp://ftp.simplesystems.org/pub/libpng/png/src/libpng16/libpng-1.6.22.tar.gz
Nyeste BETA: git clone git://git.code.sf.net/p/libpng/code libpng-beta
+ rm -rf .git
- Slet eksisterende libpng dir
- Udpak i libpng dir således at strukturen er: ./libpng/png.h
# cd libpng
( EVT:
# cp scripts/pnglibconf.h.prebuilt pnglibconf.h
- Ret evt. til følgende i pnglibconf.h:
#undef PNG_CONSOLE_IO_SUPPORTED
#undef PNG_SIMPLIFIED_WRITE_STDIO_SUPPORTED
#undef PNG_STDIO_SUPPORTED
)
# ./configure --enable-shared=no --enable-static=yes
# cp scripts/makefile.gcc Makefile
# make static
# rm *.o
----- LIBJPEG -----
# wget -P ./download/ http://ijg.org/files/jpegsrc.v9b.tar.gz
- Slet eksisterende libjpeg dir
- Udpak i libjpeg dir således at strukturen er: ./libjpeg/jpeglib.h
# cd libjpeg
# ./configure --enable-shared=no --enable-static=yes
# make
# mv .libs/*.a .
# make clean
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment