--disable-sse2 - Compile without SSE2 support (default: on)
--arch='arch' - Compile for a specific architecture (default: none)
--cpu='cpu' - Compile for a specific CPU (default: none)
+ --target-os='os' - Cross-compile to a specific OS (default: $(uname -s))
+ --target-arch='arch' - Cross-compile to a specific CPU architecture
Module disable options:
echo "LARGE_FILE=-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE"
+ [ "$amd64" = "true" ] && echo "ARCH_X86_64=1" && echo "CFLAGS+=-DARCH_X86_64"
[ "$arch" != "" ] && echo "TARGETARCH=-march=$arch"
[ "$cpu" != "" ] && echo "TARGETCPU=-mcpu=$cpu"
if [ "$optimisations" = "true" ]
case $targetos in
Darwin)
- sysctl -a hw | grep "x86_64: 1" > /dev/null && echo "ARCH_X86_64=1" && echo "CFLAGS+=-DARCH_X86_64"
echo "CFLAGS+=-fPIC -D__DARWIN__ `sdl-config --cflags`"
echo "SHFLAGS=-dynamiclib"
echo "LDFLAGS+=`sdl-config --libs`"
;;
Linux|GNU/kFreeBSD|GNU)
- [ "$(uname -m)" = "x86_64" ] && echo "ARCH_X86_64=1" && echo "CFLAGS+=-DARCH_X86_64"
[ "$optimisations" = "true" ] &&
echo "OPTIMISATIONS+=-ffast-math"
echo "CFLAGS+=-fPIC -pthread"
echo "LDFLAGS+=-Wl,--no-undefined -Wl,--as-needed"
;;
FreeBSD)
- [ "$(uname -m)" = "amd64" -o "$(uname -m)" = "x86_64" ] && echo "ARCH_X86_64=1" && echo "CFLAGS+=-DARCH_X86_64"
[ "$optimisations" = "true" ] &&
echo "OPTIMISATIONS+=-ffast-math"
echo "CFLAGS+=-fPIC -pthread"
echo "LDFLAGS+=-Wl,--no-undefined -Wl,--as-needed"
;;
NetBSD)
- [ "$(uname -m)" = "amd64" ] && echo "ARCH_X86_64=1" && echo "CFLAGS+=-DARCH_X86_64"
[ "$optimisations" = "true" ] &&
echo "OPTIMISATIONS+=-ffast-math"
echo "CFLAGS+=-pthread"
echo "LDFLAGS+=-Wl,--no-undefined -Wl,--as-needed"
;;
MinGW)
- [ "$(uname -m)" = "x86_64" ] && echo "ARCH_X86_64=1" && echo "CFLAGS+=-DARCH_X86_64"
[ "$optimisations" = "true" ] &&
echo "OPTIMISATIONS+=-ffast-math"
echo "SHFLAGS=-shared"
export gpl3=false
export arch=
export cpu=
-export targetos=
-
-# Determine OS
-targetos=$(uname -s)
-# Chose appropriate suffix for libraries
-case $targetos in
- Darwin)
- LIBSUF=".dylib"
- ;;
- Linux|FreeBSD|NetBSD)
- LIBSUF=".so"
- ;;
- MINGW32_NT-*)
- targetos="MinGW"
- LIBSUF=".dll"
- ;;
- *)
- LIBSUF=".so"
- ;;
-esac
-export LIBSUF
+export targetos=$(uname -s)
+export targetarch=
+export amd64=false
# Iterate through arguments
for i in "$@"
do
case $i in
- --help ) help=1 ;;
+ --help ) help=1 ;;
--prefix=* ) prefix="${i#--prefix=}" ;;
--libdir=* ) libdir="${i#--libdir=}" ;;
--datadir=* ) datadir="${i#--datadir=}" ;;
--disable-sse2 ) sse2=false ;;
--enable-gpl ) gpl=true ;;
--enable-gpl3 ) gpl3=true ;;
- --arch=* ) arch="${i#--arch=}" ;;
- --cpu=* ) cpu="${i#--cpu=}" ;;
+ --arch=* ) arch="${i#--arch=}" ;;
+ --cpu=* ) cpu="${i#--cpu=}" ;;
+ --target-os=* ) targetos="${i#--target-os=}" ;;
+ --target-arch=* ) targetarch="${i#--target-arch=}" ;;
esac
done
+# Chose appropriate suffix for libraries
+case $targetos in
+ Darwin)
+ LIBSUF=".dylib"
+ if [ "$targetarch" = "" ]
+ then
+ sysctl -a hw | grep "x86_64: 1" > /dev/null
+ [ "$?" = "0" ] && targetarch="amd64"
+ fi
+ ;;
+ Linux|FreeBSD|NetBSD)
+ LIBSUF=".so"
+ ;;
+ MINGW32_NT-*|MinGW|mingw)
+ targetos="MinGW"
+ LIBSUF=".dll"
+ ;;
+ *)
+ LIBSUF=".so"
+ ;;
+esac
+export LIBSUF
+
+# Determine if we are compiling for 64-bit Intel architecture
+[ "$targetarch" = "" ] && targetarch=$(uname -m)
+[ "$targetarch" = "amd64" -o "$targetarch" = "x86_64" ] && amd64=true
+
# Determine the libdir if it's not specified in the args
[ "$libdir" = "" ] && libdir=$prefix/lib
[ "$datadir" = "" ] && datadir=$prefix/share
/**
- * \file mlt_profile.c
+ * \file mlt_cache.c
* \brief least recently used cache
* \see mlt_profile_s
*
- * Copyright (C) 2007-2009 Ushodaya Enterprises Limited
+ * Copyright (C) 2007-2012 Ushodaya Enterprises Limited
* \author Dan Dennedy <dan@dennedy.org>
*
* This library is free software; you can redistribute it and/or
#include "mlt_log.h"
#include "mlt_properties.h"
#include "mlt_cache.h"
+#include "mlt_frame.h"
#include <stdlib.h>
#include <pthread.h>
}
/** Put a chunk of data in the cache.
+ *
+ * This function and mlt_cache_get() are not scalable with a large volume
+ * of unique \p object paramter values. Therefore, it does not make sense
+ * to use it for a frame/image cache using the frame position for \p object.
+ * Instead, use mlt_cache_put_frame() for that.
*
* \public \memberof mlt_cache_s
* \param cache a cache object
return result;
}
+
+/** Shuffle the cache entries between the two arrays and return the frame for a position.
+ *
+ * \private \memberof mlt_cache_s
+ * \param cache a cache object
+ * \param position the position of the frame that you want
+ * \return a frame if there was a hit or NULL for a miss
+ */
+
+static mlt_frame* shuffle_get_frame( mlt_cache cache, mlt_position position )
+{
+ int i = cache->count;
+ int j = cache->count - 1;
+ mlt_frame *hit = NULL;
+ mlt_frame *alt = (mlt_frame*) ( cache->current == cache->A ? cache->B : cache->A );
+
+ if ( cache->count > 0 && cache->count < cache->size )
+ {
+ // first determine if we have a hit
+ while ( i-- && !hit )
+ {
+ mlt_frame *o = (mlt_frame*) &cache->current[ i ];
+ if ( mlt_frame_get_position( *o ) == position )
+ hit = o;
+ }
+ // if there was no hit, we will not be shuffling out an entry
+ // and are still filling the cache
+ if ( !hit )
+ ++j;
+ // reset these
+ i = cache->count;
+ hit = NULL;
+ }
+
+ // shuffle the existing entries to the alternate array
+ while ( i-- )
+ {
+ mlt_frame *o = (mlt_frame*) &cache->current[ i ];
+
+ if ( !hit && mlt_frame_get_position( *o ) == position )
+ {
+ hit = o;
+ }
+ else if ( j > 0 )
+ {
+ alt[ --j ] = *o;
+// mlt_log( NULL, MLT_LOG_DEBUG, "%s: shuffle %d = %p\n", __FUNCTION__, j, alt[j] );
+ }
+ }
+ return hit;
+}
+
+/** Put a frame in the cache.
+ *
+ * Unlike mlt_cache_put() this version is more suitable for caching frames
+ * and their data - like images. However, this version does not use reference
+ * counting and garbage collection. Rather, frames are cloned with deep copy
+ * to avoid those things.
+ *
+ * \public \memberof mlt_cache_s
+ * \param cache a cache object
+ * \param frame the frame to cache
+ * \see mlt_frame_get_frame
+ */
+
+void mlt_cache_put_frame( mlt_cache cache, mlt_frame frame )
+{
+ pthread_mutex_lock( &cache->mutex );
+ mlt_frame *hit = shuffle_get_frame( cache, mlt_frame_get_position( frame ) );
+ mlt_frame *alt = (mlt_frame*) ( cache->current == cache->A ? cache->B : cache->A );
+
+ // add the frame to the cache
+ if ( hit )
+ {
+ // release the old data
+ mlt_frame_close( *hit );
+ // the MRU end gets the updated data
+ hit = &alt[ cache->count - 1 ];
+ }
+ else if ( cache->count < cache->size )
+ {
+ // more room in cache, add it to MRU end
+ hit = &alt[ cache->count++ ];
+ }
+ else
+ {
+ // release the entry at the LRU end
+ mlt_frame_close( cache->current[0] );
+
+ // The MRU end gets the new item
+ hit = &alt[ cache->count - 1 ];
+ }
+ *hit = mlt_frame_clone( frame, 1 );
+ mlt_log( NULL, MLT_LOG_DEBUG, "%s: put %d = %p\n", __FUNCTION__, cache->count - 1, frame );
+
+ // swap the current array
+ cache->current = (void**) alt;
+ pthread_mutex_unlock( &cache->mutex );
+}
+
+/** Get a frame from the cache.
+ *
+ * You must call mlt_frame_close() on the frame you receive from this.
+ *
+ * \public \memberof mlt_cache_s
+ * \param cache a cache object
+ * \param position the position of the frame that you want
+ * \return a frame if found or NULL if not found or has been flushed from the cache
+ * \see mlt_frame_put_frame
+ */
+
+mlt_frame mlt_cache_get_frame( mlt_cache cache, mlt_position position )
+{
+ mlt_frame result = NULL;
+ pthread_mutex_lock( &cache->mutex );
+ mlt_frame *hit = shuffle_get_frame( cache, position );
+ mlt_frame *alt = (mlt_frame*) ( cache->current == cache->A ? cache->B : cache->A );
+
+ if ( hit )
+ {
+ // copy the hit to the MRU end
+ alt[ cache->count - 1 ] = *hit;
+ hit = &alt[ cache->count - 1 ];
+
+ result = mlt_frame_clone( *hit, 1 );
+ mlt_log( NULL, MLT_LOG_DEBUG, "%s: get %d = %p\n", __FUNCTION__, cache->count - 1, *hit );
+
+ // swap the current array
+ cache->current = (void**) alt;
+ }
+ pthread_mutex_unlock( &cache->mutex );
+
+ return result;
+}
* \brief least recently used cache
* \see mlt_cache_s
*
- * Copyright (C) 2007-2009 Ushodaya Enterprises Limited
+ * Copyright (C) 2007-2012 Ushodaya Enterprises Limited
* \author Dan Dennedy <dan@dennedy.org>
*
* This library is free software; you can redistribute it and/or
extern void mlt_cache_purge( mlt_cache cache, void *object );
extern void mlt_cache_put( mlt_cache cache, void *object, void* data, int size, mlt_destructor destructor );
extern mlt_cache_item mlt_cache_get( mlt_cache cache, void *object );
+extern void mlt_cache_put_frame( mlt_cache cache, mlt_frame frame );
+extern mlt_frame mlt_cache_get_frame( mlt_cache cache, mlt_position position );
#endif
MinGW)
echo LIBSUF=.dll
echo "CXXFLAGS+=-Wall $WARNINGS -DPIC"
- echo "LIBFLAGS=-enable-auto-import -shared"
+ echo "LIBFLAGS=-Wl,-enable-auto-import -shared"
;;
esac >> config.mak
}
if ( self->image_cache )
{
- mlt_cache_item item = mlt_cache_get( self->image_cache, (void*) position );
- uint8_t *original = mlt_cache_item_data( item, (int*) format );
+ mlt_frame original = mlt_cache_get_frame( self->image_cache, mlt_frame_get_position( frame ) );
if ( original )
{
// Set the resolution
if ( *height == 1088 && mlt_profile_dar( mlt_service_profile( MLT_PRODUCER_SERVICE( producer ) ) ) == 16.0/9.0 )
*height = 1080;
- // Cache hit
- int size = mlt_image_format_size( *format, *width, *height, NULL );
- if ( writable )
- {
- *buffer = mlt_pool_alloc( size );
- mlt_frame_set_image( frame, *buffer, size, mlt_pool_release );
- memcpy( *buffer, original, size );
- mlt_cache_item_close( item );
- }
- else
- {
- *buffer = original;
- mlt_properties_set_data( frame_properties, "avformat.image_cache", item, 0, ( mlt_destructor )mlt_cache_item_close, NULL );
- mlt_frame_set_image( frame, *buffer, size, NULL );
- }
+ int size = 0;
+ *buffer = mlt_properties_get_data( MLT_FRAME_PROPERTIES( original ), "alpha", &size );
+ if (*buffer)
+ mlt_frame_set_alpha( frame, *buffer, size, NULL );
+ *buffer = mlt_properties_get_data( MLT_FRAME_PROPERTIES( original ), "image", &size );
+ mlt_frame_set_image( frame, *buffer, size, NULL );
+ mlt_properties_set_data( frame_properties, "avformat.image_cache", original, 0, (mlt_destructor) mlt_frame_close, NULL );
got_picture = 1;
- // check for alpha
- item = mlt_cache_get( self->alpha_cache, (void*) position );
- original = mlt_cache_item_data( item, &size );
- if ( original )
- {
- alpha = mlt_pool_alloc( size );
- memcpy( alpha, original, size );
- mlt_cache_item_close( item );
- }
-
goto exit_get_image;
}
}
}
}
+ // set alpha
+ if ( alpha )
+ mlt_frame_set_alpha( frame, alpha, (*width) * (*height), mlt_pool_release );
+
if ( image_size > 0 && self->image_cache )
- {
- // Copy buffer to image cache
- uint8_t *image = mlt_pool_alloc( image_size );
- memcpy( image, *buffer, image_size );
- mlt_cache_put( self->image_cache, (void*) position, image, *format, mlt_pool_release );
- if ( alpha )
- {
- int alpha_size = (*width) * (*height);
- image = mlt_pool_alloc( alpha_size );
- memcpy( image, alpha, alpha_size );
- mlt_cache_put( self->alpha_cache, (void*) position, image, alpha_size, mlt_pool_release );
- }
- }
+ mlt_cache_put_frame( self->image_cache, frame );
// Try to duplicate last image if there was a decoding failure
// TODO: with multithread decoding a partial frame decoding resulting
mlt_properties_set_int( properties, "meta.media.progressive", mlt_properties_get_int( frame_properties, "progressive" ) );
mlt_service_unlock( MLT_PRODUCER_SERVICE( producer ) );
- // set alpha
- if ( alpha )
- mlt_frame_set_alpha( frame, alpha, (*width) * (*height), mlt_pool_release );
-
return !got_picture;
}
mlt_frame getFrame()
{
- mlt_frame frame = NULL;
struct timeval now;
struct timespec tm;
double fps = mlt_producer_get_fps( getProducer() );
mlt_position position = mlt_producer_position( getProducer() );
- mlt_cache_item cached = mlt_cache_get( m_cache, (void*) position );
+ mlt_frame frame = mlt_cache_get_frame( m_cache, position );
// Allow the buffer to fill to the requested initial buffer level.
if ( m_isBuffering )
pthread_mutex_unlock( &m_mutex );
}
- if ( cached )
- {
- // Copy cached frame instead of pulling from queue
- frame = mlt_frame_clone( (mlt_frame) mlt_cache_item_data( cached, NULL ), 0 );
- mlt_cache_item_close( cached );
- }
- else
+ if ( !frame )
{
// Wait if queue is empty
pthread_mutex_lock( &m_mutex );
// add to cache
if ( frame )
- mlt_cache_put( m_cache, (void*) position, mlt_frame_clone( frame, 1 ), 0,
- (mlt_destructor) mlt_frame_close );
+ {
+ mlt_frame_set_position( frame, position );
+ mlt_cache_put_frame( m_cache, frame );
+ }
}
// Set frame timestamp and properties
*frame = mlt_frame_init( MLT_PRODUCER_SERVICE(producer) );
// Calculate the next timecode
- mlt_frame_set_position( *frame, mlt_producer_position( producer ) );
mlt_producer_prepare_next( producer );
// Close DeckLink if at end
ifdef USE_GTK2
OBJS += consumer_gtk2.o
-CFLAGS += `pkg-config gtk+-2.0 --cflags`
-LDFLAGS += `pkg-config gtk+-2.0 --libs`
+CFLAGS += `pkg-config $(PKGCONFIG_PREFIX) --cflags gtk+-2.0`
+LDFLAGS += `pkg-config $(PKGCONFIG_PREFIX) --libs gtk+-2.0`
endif
ifdef USE_PIXBUF
OBJS += producer_pixbuf.o pixops.o filter_rescale.o
-CFLAGS += `pkg-config gdk-pixbuf-2.0 --cflags`
-LDFLAGS += `pkg-config gdk-pixbuf-2.0 --libs`
+CFLAGS += `pkg-config $(PKGCONFIG_PREFIX) --cflags gdk-pixbuf-2.0`
+LDFLAGS += `pkg-config $(PKGCONFIG_PREFIX) --libs gdk-pixbuf-2.0`
endif
ifdef USE_EXIF
ifdef USE_PANGO
OBJS += producer_pango.o
OBJS += filter_dynamictext.o
-CFLAGS += `pkg-config pangoft2 --cflags`
-LDFLAGS += `pkg-config pangoft2 --libs`
+CFLAGS += `pkg-config $(PKGCONFIG_PREFIX) --cflags pangoft2`
+LDFLAGS += `pkg-config $(PKGCONFIG_PREFIX) --libs pangoft2`
ifeq ($(targetos),Darwin)
LDFLAGS += -liconv
endif
#!/bin/sh
-if [ "$help" != "1" ]
+if [ "$help" = "1" ]
then
+ cat << EOF
+GTK+ options:
- pkg-config gtk+-2.0 2> /dev/null
+ --gtk2-prefix=path - Override the gtk+-2.0 prefix for pkg-config
+
+EOF
+
+else
+ pkgconfig_prefix=
+ for i in "$@"
+ do
+ case $i in
+ --gtk2-prefix=* ) pkgconfig_prefix="${i#--gtk2-prefix=}" ;;
+ esac
+ done
+ [ "$pkgconfig_prefix" != "" ] && pkgconfig_prefix="--define-variable=prefix=\"$pkgconfig_prefix\""
+
+ pkg-config $pkgconfig_prefix gtk+-2.0 2> /dev/null
disable_gtk2=$?
- pkg-config gdk-pixbuf-2.0 2> /dev/null
+ pkg-config $pkgconfig_prefix gdk-pixbuf-2.0 2> /dev/null
disable_pixbuf=$?
- pkg-config gdk-pixbuf-2.0 pangoft2 2> /dev/null
+ pkg-config $pkgconfig_prefix gdk-pixbuf-2.0 pangoft2 2> /dev/null
disable_pango=$?
if [ "$disable_gtk2" != "0" -a "$disable_pixbuf" != 0 -a "$disable_pango" != "0" ]
[ "$disable_pixbuf" = "0" ] && echo "USE_PIXBUF=1" >> config.mak
[ "$disable_pango" = "0" ] && echo "USE_PANGO=1" >> config.mak
+ [ "$pkgconfig_prefix" != "" ] && echo "PKGCONFIG_PREFIX=$pkgconfig_prefix" >> config.mak
+
pkg-config --exists 'libexif'
if [ $? -eq 0 ]
then
*/
.file "scale_line_22_yuv_mmx.S"
.version "01.01"
- .section .note.GNU-stack,"",%progbits
.extern printf
.align 16
#if !defined(__MINGW32__) && !defined(__CYGWIN__)
-
+
+ .section .note.GNU-stack,"",%progbits
+
.globl pixops_scale_line_22_yuv_mmx
.type pixops_scale_line_22_yuv_mmx,@function
pixops_scale_line_22_yuv_mmx:
OBJS += $(GPL_OBJS)
CFLAGS += -DGPL
CFLAGS += `pkg-config --cflags libxml-2.0`
-CFLAGS += `pkg-config --cflags glib-2.0`
+CFLAGS += `pkg-config $(PKGCONFIG_PREFIX) --cflags glib-2.0`
LDFLAGS += $(LIBDL)
LDFLAGS += `pkg-config --libs libxml-2.0`
-LDFLAGS += `pkg-config --libs glib-2.0`
+LDFLAGS += `pkg-config $(PKGCONFIG_PREFIX) --libs glib-2.0`
LDFLAGS += -lm
YML_FILES = *.yml
#!/bin/sh
-if [ "$help" != "1" ]
+if [ "$help" = "1" ]
then
+ cat << EOF
+JACK Rack options:
+
+ --gtk2-prefix=path - Override the gtk+-2.0 prefix for pkg-config
+
+EOF
+
+else
pkg-config jack
disable_jack=$?
fi
disable_ladspa=`[ -f "$ladspa_prefix/include/ladspa.h" ] && echo 0 || echo 1`
echo GPL=1 > config.mak
+
+ for i in "$@"
+ do
+ case $i in
+ --gtk2-prefix=* ) pkgconfig_prefix="${i#--gtk2-prefix=}" ;;
+ esac
+ done
+ [ "$pkgconfig_prefix" != "" ] && echo "PKGCONFIG_PREFIX=--define-variable=prefix=\"$pkgconfig_prefix\"" >> config.mak
fi
if [ "$disable_jack" = "1" -o "$disable_xml2" = "1" -o "$disable_ladspa" = "1" ]
;;
esac
- qimage_includedir=/usr/include/qt4
- qimage_libdir=/usr/lib/qt4
+ qimage_includedir=
+ qimage_libdir=
if [ ! -d "$qimage_libdir" -o ! -d "$qimage_includedir" ]
then
fi
fi
- pkg-config --exists 'QtGui >= 4'
- if [ $? -eq 0 ] && [ "$force_qt3" = "" ]
+ if [ -d "$qimage_libdir" -a -d "$qimage_includedir" ]
then
- echo "Qt version 4.x detected, will compile Qt4 qimage producer"
- qt4_found=true
- echo "#define USE_QT4" >> config.h
- echo "USE_QT4=1" >> config.mak
- echo QTCXXFLAGS=$(pkg-config --cflags QtCore QtGui QtXml QtSvg ) >> config.mak
- echo QTLIBS=$(pkg-config --libs QtCore QtGui QtXml QtSvg) >> config.mak
-
- elif [ -d "$qimage_libdir" -a -d "$qimage_includedir" ]
- then
-
# test if we have a Qt3 or Qt4
if [ -f "$qimage_libdir/libQtCore.so" ] || [ -d "$qimage_libdir/QtGui.framework" ] || [ -f "$qimage_libdir/libQtCore4.a" ] && [ "$force_qt3" = "" ]
then
elif [ -f "$qimage_libdir/libQtCore4.a" ]
then
echo QTCXXFLAGS=-I$qimage_includedir >> config.mak
- echo QTLIBS=-enable-auto-import -L$qimage_libdir -lQtCore4 -lQtGui4 -lQtXml4 -lQtSvg4 >> config.mak
+ echo QTLIBS=-Wl,-enable-auto-import -L$qimage_libdir -lQtCore4 -lQtGui4 -lQtXml4 -lQtSvg4 >> config.mak
else
echo QTCXXFLAGS=-I$qimage_includedir >> config.mak
echo QTLIBS=-L$qimage_libdir -lQtCore -lQtGui -lQtXml -lQtSvg >> config.mak
fi
fi
else
- echo "qimage: QT environment not found - disabling"
- touch ../disable-qimage
+ pkg-config --exists 'QtGui >= 4'
+ if [ $? -eq 0 ] && [ "$force_qt3" = "" ]
+ then
+ echo "Qt version 4.x detected, will compile Qt4 qimage producer"
+ qt4_found=true
+ echo "#define USE_QT4" >> config.h
+ echo "USE_QT4=1" >> config.mak
+ echo QTCXXFLAGS=$(pkg-config --cflags QtCore QtGui QtXml QtSvg ) >> config.mak
+ echo QTLIBS=$(pkg-config --libs QtCore QtGui QtXml QtSvg) >> config.mak
+ else
+ echo "qimage: QT environment not found - disabling"
+ touch ../disable-qimage
+ fi
fi
[ "$gpl3" = "true" ] && echo GPL3=1 >> config.mak
exit 0
OBJS = producer_swfdec.o
ifeq ($(targetos), MinGW)
-LDFLAGS += -enable-auto-import -lz
+LDFLAGS += -Wl,enable-auto-import -lz
endif
SRCS := $(OBJS:.o=.c)
#include <stdlib.h>
#include <math.h>
#include <string.h>
-#if !defined(__DARWIN__) && !defined(__FreeBSD__)
+#if !defined(__DARWIN__) && !defined(__FreeBSD__) && !defined(WIN32)
#include <values.h>
#endif