mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 15:27:46 -04:00
core, more on chd support
This commit is contained in:
parent
15ca715228
commit
8374e606ab
2 changed files with 20 additions and 2 deletions
3
Makefile
3
Makefile
|
@ -237,8 +237,7 @@ endif
|
|||
endif
|
||||
|
||||
ifneq (,$(HAVE_LIBCHDR))
|
||||
CFLAGS += -DUSE_LIBCHDR -Iplatform/common/libchdr/include
|
||||
LDFLAGS += -Lplatform/common/libchdr -lchdr
|
||||
CFLAGS += -DUSE_LIBCHDR
|
||||
endif
|
||||
|
||||
ifeq "$(PLATFORM_ZLIB)" "1"
|
||||
|
|
19
configure
vendored
19
configure
vendored
|
@ -49,6 +49,7 @@ have_armv7=""
|
|||
have_arm_oabi=""
|
||||
have_arm_neon=""
|
||||
have_libavcodec=""
|
||||
have_libchdr=""
|
||||
need_sdl="no"
|
||||
need_zlib="no"
|
||||
# these are for known platforms
|
||||
|
@ -348,6 +349,15 @@ EOF
|
|||
compile_object "$@"
|
||||
}
|
||||
|
||||
check_libchdr()
|
||||
{
|
||||
cat > $TMPC <<EOF
|
||||
#include <libchdr/chd.h>
|
||||
int main (int argc, char *argv[]) { chd_open("", 0, NULL, NULL); }
|
||||
EOF
|
||||
compile_object "$@"
|
||||
}
|
||||
|
||||
check_zlib -lz && MAIN_LDLIBS="$MAIN_LDLIBS -lz" || need_zlib="yes"
|
||||
|
||||
MAIN_LDLIBS="-lpng $MAIN_LDLIBS"
|
||||
|
@ -362,6 +372,10 @@ if check_libavcodec; then
|
|||
esac
|
||||
fi
|
||||
|
||||
if check_libchdr; then
|
||||
have_libchdr="yes"
|
||||
fi
|
||||
|
||||
# find what audio support we can compile
|
||||
if [ "x$sound_drivers" = "x" ]; then
|
||||
if check_oss; then sound_drivers="$sound_drivers oss"; fi
|
||||
|
@ -402,6 +416,7 @@ fi
|
|||
test "x$have_armv6" != "x" || have_armv6="no"
|
||||
test "x$have_armv7" != "x" || have_armv7="no"
|
||||
test "x$have_libavcodec" != "x" || have_libavcodec="no"
|
||||
test "x$have_libchdr" != "x" || have_libchdr="no"
|
||||
|
||||
echo "architecture $ARCH"
|
||||
echo "platform $platform"
|
||||
|
@ -411,6 +426,7 @@ echo "C compiler flags $CFLAGS"
|
|||
echo "libraries $MAIN_LDLIBS"
|
||||
echo "linker flags $LDFLAGS"
|
||||
echo "libavcodec (mp3) $have_libavcodec"
|
||||
echo "libchdr $have_libchdr"
|
||||
# echo "ARMv7 optimizations $have_armv7"
|
||||
|
||||
echo "# Automatically generated by configure" > $config_mak
|
||||
|
@ -434,6 +450,9 @@ echo "SOUND_DRIVERS = $sound_drivers" >> $config_mak
|
|||
if [ "$have_libavcodec" = "yes" ]; then
|
||||
echo "HAVE_LIBAVCODEC = 1" >> $config_mak
|
||||
fi
|
||||
if [ "$have_libchdr" = "yes" ]; then
|
||||
echo "HAVE_LIBCHDR = 1" >> $config_mak
|
||||
fi
|
||||
if [ "$need_zlib" = "yes" ]; then
|
||||
echo "PLATFORM_ZLIB = 1" >> $config_mak
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue