Changeset 4815 for libcaca


Ignore:
Timestamp:
Jun 13, 2012, 2:01:12 AM (6 years ago)
Author:
Sam Hocevar
Message:

build: fix Win32 build and allow to build Win64 binaries from Linux, and
ship the static library and includes too.

Location:
libcaca/trunk
Files:
3 edited
1 copied

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/Makefile.am

    r4799 r4815  
    55DIST_SUBDIRS = $(SUBDIRS) win32
    66
    7 EXTRA_DIST = NOTES COPYING.GPL COPYING.ISC COPYING.LGPL bootstrap build-dos build-kernel build-win32 caca-config.in libcaca.spec libcaca.sln
     7EXTRA_DIST = NOTES COPYING.GPL COPYING.ISC COPYING.LGPL bootstrap build-dos build-kernel build-win32 build-win64 caca-config.in libcaca.spec libcaca.sln
    88AUTOMAKE_OPTIONS = dist-bzip2
    99
  • libcaca/trunk/build-win32

    r4333 r4815  
    88# Clean up our working directory
    99SRCDIR="`pwd`"
    10 DIRNAME="libpipi-win32-`sed -ne 's/^AC_INIT(.*, \(.*\)).*/\1/p' configure.ac`"
     10DIRNAME="libcaca-win32-`sed -ne 's/^AC_INIT(.*, \(.*\)).*/\1/p' configure.ac`"
    1111INSTALLDIR="`pwd`/${DIRNAME}"
    1212BUILDDIR="${INSTALLDIR}/build"
     
    2020cd "${BUILDDIR}"
    2121# Build for win32
    22 "${SRCDIR}/configure" --host=i586-mingw32msvc --prefix=/ --bindir=/bin --libdir=/lib --disable-imlib2 --disable-java --disable-doc "$@"
    23 make pkglibdir=/lib pkgdatadir=/data bindir=/bin
     22"${SRCDIR}/configure" --host=i686-w64-mingw32 --build=none --prefix=/ --bindir=/bin --libdir=/lib --disable-imlib2 --disable-java --disable-doc "$@"
     23make -j4 pkglibdir=/lib pkgdatadir=/data bindir=/bin
    2424# Install into our private directory
    25 make install DESTDIR="${INSTALLDIR}" pkglibdir=/lib/ pkgdatadir=/ bindir=/bin/
     25make -j4 install DESTDIR="${INSTALLDIR}" pkglibdir=/lib/ pkgdatadir=/ bindir=/bin/
    2626cd "${SRCDIR}"
    2727rm -Rf "${BUILDDIR}"
    2828
    2929mv "${INSTALLDIR}/bin/"* "${INSTALLDIR}/"
     30rmdir "${INSTALLDIR}/bin"
    3031mv "${INSTALLDIR}/lib/"* "${INSTALLDIR}/"
     32for f in libcaca libcaca++; do
     33   mv "${INSTALLDIR}/${f}.a" "${INSTALLDIR}/lib/${f}.lib"
     34done
    3135rm -f "${INSTALLDIR}/caca-config.exe" # Just in case. *sigh*.
    32 i586-mingw32msvc-strip "${INSTALLDIR}/"*.exe || true
    33 i586-mingw32msvc-strip "${INSTALLDIR}/"*.dll || true
    34 rmdir "${INSTALLDIR}/bin"
    35 rmdir "${INSTALLDIR}/lib"
     36i686-w64-mingw32-strip "${INSTALLDIR}/"*.exe || true
     37i686-w64-mingw32-strip "${INSTALLDIR}/"*.dll || true
    3638
    3739mkdir "${INSTALLDIR}/doc"
     
    4244rm -Rf "${INSTALLDIR}/share"
    4345rm -Rf "${INSTALLDIR}/man"
    44 rm -Rf "${INSTALLDIR}/include"
    45 rm -Rf "${INSTALLDIR}/pkg-config"
     46rm -Rf "${INSTALLDIR}/pkgconfig"
    4647rm -f "${INSTALLDIR}/caca-config"
    4748rm -f "${INSTALLDIR}/"*.a
  • libcaca/trunk/build-win64

    r4814 r4815  
    88# Clean up our working directory
    99SRCDIR="`pwd`"
    10 DIRNAME="libpipi-win32-`sed -ne 's/^AC_INIT(.*, \(.*\)).*/\1/p' configure.ac`"
     10DIRNAME="libcaca-win64-`sed -ne 's/^AC_INIT(.*, \(.*\)).*/\1/p' configure.ac`"
    1111INSTALLDIR="`pwd`/${DIRNAME}"
    1212BUILDDIR="${INSTALLDIR}/build"
     
    1919
    2020cd "${BUILDDIR}"
    21 # Build for win32
    22 "${SRCDIR}/configure" --host=i586-mingw32msvc --prefix=/ --bindir=/bin --libdir=/lib --disable-imlib2 --disable-java --disable-doc "$@"
    23 make pkglibdir=/lib pkgdatadir=/data bindir=/bin
     21# Build for win64
     22"${SRCDIR}/configure" --host=x86_64-w64-mingw32 --build=none --prefix=/ --bindir=/bin --libdir=/lib --disable-imlib2 --disable-java --disable-doc "$@"
     23make -j4 pkglibdir=/lib pkgdatadir=/data bindir=/bin
    2424# Install into our private directory
    25 make install DESTDIR="${INSTALLDIR}" pkglibdir=/lib/ pkgdatadir=/ bindir=/bin/
     25make -j4 install DESTDIR="${INSTALLDIR}" pkglibdir=/lib/ pkgdatadir=/ bindir=/bin/
    2626cd "${SRCDIR}"
    2727rm -Rf "${BUILDDIR}"
    2828
    2929mv "${INSTALLDIR}/bin/"* "${INSTALLDIR}/"
     30rmdir "${INSTALLDIR}/bin"
    3031mv "${INSTALLDIR}/lib/"* "${INSTALLDIR}/"
     32for f in libcaca libcaca++; do
     33   mv "${INSTALLDIR}/${f}.a" "${INSTALLDIR}/lib/${f}.lib"
     34done
    3135rm -f "${INSTALLDIR}/caca-config.exe" # Just in case. *sigh*.
    32 i586-mingw32msvc-strip "${INSTALLDIR}/"*.exe || true
    33 i586-mingw32msvc-strip "${INSTALLDIR}/"*.dll || true
    34 rmdir "${INSTALLDIR}/bin"
    35 rmdir "${INSTALLDIR}/lib"
     36x86_64-w64-mingw32-strip "${INSTALLDIR}/"*.exe || true
     37x86_64-w64-mingw32-strip "${INSTALLDIR}/"*.dll || true
    3638
    3739mkdir "${INSTALLDIR}/doc"
     
    4244rm -Rf "${INSTALLDIR}/share"
    4345rm -Rf "${INSTALLDIR}/man"
    44 rm -Rf "${INSTALLDIR}/include"
    45 rm -Rf "${INSTALLDIR}/pkg-config"
     46rm -Rf "${INSTALLDIR}/pkgconfig"
    4647rm -f "${INSTALLDIR}/caca-config"
    4748rm -f "${INSTALLDIR}/"*.a
  • libcaca/trunk/caca/caca.h

    r4806 r4815  
    721721__extern caca_canvas_t * cucul_import_canvas(cucul_buffer_t *,
    722722                                              char const *) CACA_DEPRECATED;
     723#if !defined _WIN32 || !defined __GNUC__
    723724__extern ssize_t caca_import_memory(caca_canvas_t *, void const *, size_t,
    724725                                    char const *) CACA_DEPRECATED;
     
    727728__extern void *caca_export_memory(caca_canvas_t const *, char const *,
    728729                                  size_t *) CACA_DEPRECATED;
     730#endif
    729731__extern int cucul_rotate(caca_canvas_t *) CACA_DEPRECATED;
    730732__extern int cucul_set_dither_invert(caca_dither_t *, int) CACA_DEPRECATED;
Note: See TracChangeset for help on using the changeset viewer.