diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | Makefile.am | 9 | ||||
-rwxr-xr-x | arm-apple-darwin11-configure | 4 | ||||
-rw-r--r-- | configure.ac | 16 | ||||
-rwxr-xr-x | wasm-unknown-emscripten-configure | 4 | ||||
-rwxr-xr-x | wasm32-unknown-emscripten-configure | 4 |
6 files changed, 32 insertions, 6 deletions
@@ -23,3 +23,4 @@ libtool ltmain.sh m4 missing +stamp-h1 diff --git a/Makefile.am b/Makefile.am index e11069c..ae14fb4 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,3 +1,12 @@ lib_LTLIBRARIES = libproductviewer.la libproductviewer_la_SOURCES = viewer.c converter.c +if APPLE +libproductviewer_la_CFLAGS = -I${prefix}/System/Library/Frameworks/OpenGLES.framework/Headers +endif +if WASM +libproductviewer_la_LDFLAGS = -static +endif +if IOS +libproductviewer_la_LDFLAGS = -static +endif include_HEADERS = productviewer.h diff --git a/arm-apple-darwin11-configure b/arm-apple-darwin11-configure index c637d5d..115fd4e 100755 --- a/arm-apple-darwin11-configure +++ b/arm-apple-darwin11-configure @@ -2,5 +2,5 @@ export TARGET=arm-apple-darwin11 export CC=ios-clang export PREFIX=/opt/iPhoneOS8.1.sdk -export CFLAGS="$CFLAGS -g0 -O2 -I$PREFIX/System/Library/Frameworks/OpenGLES.framework/Headers" -./configure --host=$TARGET --prefix=$PREFIX/usr --disable-shared +export CFLAGS="$CFLAGS -g0 -O2" +./configure --host=$TARGET --prefix=$PREFIX --libdir=$PREFIX/usr/lib --includedir=$PREFIX/usr/include diff --git a/configure.ac b/configure.ac index 655b47a..1fd249c 100644 --- a/configure.ac +++ b/configure.ac @@ -7,4 +7,20 @@ AC_TYPE_SIZE_T AC_CHECK_FUNCS([strrchr memset]) AM_PROG_AR LT_INIT +AC_CANONICAL_HOST +case $host_vendor in + *apple* ) apple=true;; + *) apple=false;; +esac +AM_CONDITIONAL([APPLE], [test x$apple = xtrue]) +case $host_cpu in + *wasm* ) wasm=true;; + *) wasm=false;; +esac +AM_CONDITIONAL([WASM], [test x$wasm = xtrue]) +case $host in + *arm*apple-darwin1* ) ios=true;; + *) ios=false;; +esac +AM_CONDITIONAL([IOS], [test x$ios = xtrue]) AC_OUTPUT diff --git a/wasm-unknown-emscripten-configure b/wasm-unknown-emscripten-configure deleted file mode 100755 index f84b40a..0000000 --- a/wasm-unknown-emscripten-configure +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -export CPPFLAGS="$CPPFLAGS -DDEBUG" -export CFLAGS="$CFLAGS -g" -emconfigure ./configure --prefix=$EMSDK/upstream/emscripten/system --disable-shared diff --git a/wasm32-unknown-emscripten-configure b/wasm32-unknown-emscripten-configure new file mode 100755 index 0000000..f35091b --- /dev/null +++ b/wasm32-unknown-emscripten-configure @@ -0,0 +1,4 @@ +#!/bin/sh +export CPPFLAGS="$CPPFLAGS -DDEBUG" +export CFLAGS="$CFLAGS -g" +emconfigure ./configure --host=wasm32-unknown-emscripten --prefix=$EMSDK/upstream/emscripten/system |