Apply same fixes from OpenAL Soft to STB image loader.

Also make sure it works with the latest version from the website (which is downloaded automatically).
This commit is contained in:
shadowislord 2014-11-04 22:19:18 -05:00
parent 756497fb92
commit 883ff7da71
3 changed files with 14 additions and 11 deletions

View File

@ -1,13 +1,15 @@
TARGET_PLATFORM := android-9
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := stbijme
LOCAL_C_INCLUDES := $(LOCAL_PATH)
LOCAL_CFLAGS += -O2
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,, $(wildcard $(LOCAL_PATH)/*.c))
#adds zlib
LOCAL_LDLIBS += -lz -llog
LOCAL_C_INCLUDES += $(LOCAL_PATH)
LOCAL_LDLIBS := -lz -llog -Wl,-s
LOCAL_SRC_FILES := com_jme3_texture_plugins_AndroidNativeImageLoader.c
include $(BUILD_SHARED_LIBRARY)

View File

@ -1,3 +1,3 @@
APP_PLATFORM := android-9
APP_OPTIM := release
APP_ABI := all
#APP_ABI := armeabi-v7a
APP_ABI := all

View File

@ -6,8 +6,9 @@
#include <assert.h>
#include <string.h>
#include <time.h>
#define STBI_HEADER_FILE_ONLY
#include "stb_image.c"
#define STB_IMAGE_IMPLEMENTATION
#include "stb_image.h"
typedef unsigned int uint32;