Library created with debug info when set release flags - android

This is my shell command:
cmake . \
-DCMAKE_SYSTEM_NAME=Android \
-DCMAKE_TOOLCHAIN_FILE=$toolchain \
-DANDROID_NDK=$ndk_path \
-DANDROID_TOOLCHAIN=clang \
-DANDROID_ABI=$arc_abi \
-DANDROID_PLATFORM=android-21 \
-DCMAKE_BUILD_TYPE=Release \
-DANDROID_STL=c++_static
make
and in CMakeLists:
cmake_minimum_required( VERSION 3.5.1 )
project(husky)
set(prelibs "${CMAKE_SOURCE_DIR}/../../../../third_party/libs")
set(third_include "${CMAKE_SOURCE_DIR}/../../../../third_party/include")
set(src_root "${CMAKE_SOURCE_DIR}/../../../../src")
message(STATUS "cur dir:${CMAKE_CURRENT_SOURCE_DIR}")
string(REPLACE "-Oz" "-O3" CMAKE_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE})
string(REPLACE "-Os" "-O3" CMAKE_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -pthread -O3 -Wnon-virtual-dtor -Wno-unused-parameter")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wextra -flto -fuse-ld=gold -Wl")
set( CMAKE_BUILD_TYPE Release )
...
...
add_library(my_test
SHARED
${ALGO_SRC_LIST}
${API_SRC_LIST}
${STAGE_SRC_LIST}
${UTILS_SRC_LIST}
${UTILS_CPU_LIST}
${UTILS_FORMAT_LIST}
${PIPELINE_SRC_LIST}
)
target_link_libraries(my_test
libopencv_imgproc
libopencv_core
libcpufeatures
video
libtbb
libalgo
libprotobuf
${EXTRA_LIBS}
)
Whether I set CMAKE_BUILD_TYPE or not, build library always has debuginfo. What's wrong with it?
update: my target is a dynamic library. when add "set( CMAKE_BUILD_TYPE Release )" in CMakeLists.txt or add "-DCMAKE_BUILD_TYPE=Release" in cmake command, result is always a debug library。

Related

failed to compile opus on android

I would like to compile opus on android for one project.
I use a Android.mk to compile it.
It looks like that:
ROOT := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_PATH := $(ROOT)/opus-1.1
LOCAL_MODULE := libopus
LOCAL_SRC_FILES := celt/bands.c celt/celt.c celt/celt_decoder.c celt/celt_lpc.c celt/cwrs.c \
celt/entcode.c celt/entdec.c celt/entenc.c celt/kiss_fft.c \
celt/laplace.c celt/mathops.c celt/mdct.c celt/modes.c \
celt/pitch.c celt/quant_bands.c celt/rate.c celt/vq.c \
silk/A2NLSF.c silk/ana_filt_bank_1.c silk/biquad_alt.c \
silk/bwexpander_32.c silk/bwexpander.c \
silk/check_control_input.c silk/CNG.c silk/code_signs.c \
silk/control_audio_bandwidth.c silk/control_codec.c \
silk/control_SNR.c silk/debug.c silk/dec_API.c \
silk/decode_core.c silk/decode_frame.c silk/decode_indices.c \
silk/decode_parameters.c silk/decode_pitch.c \
silk/decode_pulses.c silk/decoder_set_fs.c silk/enc_API.c \
silk/encode_indices.c silk/encode_pulses.c silk/gain_quant.c \
silk/HP_variable_cutoff.c silk/init_decoder.c \
silk/init_encoder.c silk/inner_prod_aligned.c \
silk/interpolate.c silk/lin2log.c silk/log2lin.c \
silk/LPC_analysis_filter.c silk/LPC_inv_pred_gain.c \
silk/LP_variable_cutoff.c silk/NLSF2A.c silk/NLSF_decode.c \
silk/NLSF_del_dec_quant.c silk/NLSF_encode.c \
silk/NLSF_stabilize.c silk/NLSF_unpack.c silk/NLSF_VQ.c \
silk/NLSF_VQ_weights_laroia.c silk/NSQ.c silk/NSQ_del_dec.c \
silk/pitch_est_tables.c silk/PLC.c silk/process_NLSFs.c \
silk/quant_LTP_gains.c silk/resampler.c \
silk/resampler_down2_3.c silk/resampler_down2.c \
silk/resampler_private_AR2.c \
silk/resampler_private_down_FIR.c \
silk/resampler_private_IIR_FIR.c \
silk/resampler_private_up2_HQ.c silk/resampler_rom.c \
silk/shell_coder.c silk/sigm_Q15.c silk/sort.c \
silk/stereo_decode_pred.c silk/stereo_encode_pred.c \
silk/stereo_find_predictor.c silk/stereo_LR_to_MS.c \
silk/stereo_MS_to_LR.c silk/stereo_quant_pred.c \
silk/sum_sqr_shift.c silk/table_LSF_cos.c \
silk/tables_gain.c silk/tables_LTP.c \
silk/tables_NLSF_CB_NB_MB.c silk/tables_NLSF_CB_WB.c \
silk/tables_other.c silk/tables_pitch_lag.c \
silk/tables_pulses_per_block.c silk/VAD.c silk/VQ_WMat_EC.c \
silk/fixed/apply_sine_window_FIX.c silk/fixed/autocorr_FIX.c \
silk/fixed/burg_modified_FIX.c silk/fixed/corrMatrix_FIX.c \
silk/fixed/encode_frame_FIX.c silk/fixed/find_LPC_FIX.c \
silk/fixed/find_LTP_FIX.c silk/fixed/find_pitch_lags_FIX.c \
silk/fixed/find_pred_coefs_FIX.c silk/fixed/k2a_FIX.c \
silk/fixed/k2a_Q16_FIX.c \
silk/fixed/LTP_analysis_filter_FIX.c \
silk/fixed/LTP_scale_ctrl_FIX.c \
silk/fixed/noise_shape_analysis_FIX.c \
silk/fixed/pitch_analysis_core_FIX.c \
silk/fixed/prefilter_FIX.c \
silk/fixed/process_gains_FIX.c \
silk/fixed/regularize_correlations_FIX.c \
silk/fixed/residual_energy16_FIX.c \
silk/fixed/residual_energy_FIX.c \
silk/fixed/schur64_FIX.c silk/fixed/schur_FIX.c \
silk/fixed/solve_LS_FIX.c \
silk/fixed/vector_ops_FIX.c src/opus.c src/opus_compare.c \
src/opus_decoder.c src/opus_encoder.c \
src/opus_multistream.c src/repacketizer.c
LOCAL_CFLAGS := -I$(LOCAL_PATH)/include -I$(LOCAL_PATH)/celt -I$(LOCAL_PATH)/silk -I$(LOCAL_PATH)/silk/fixed -Drestrict='' -D__EMX__ -DOPUS_BUILD -DFIXED_POINT -DUSE_ALLOCA -DHAVE_LRINT -DHAVE_LRINTF -O3 -fno-math-errno
include $(BUILD_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_PATH := $(ROOT)
LOCAL_MODULE := receiver-jni
LOCAL_SRC_FILES := osl_receiver.c spsc_circular_queue.c
LOCAL_CFLAGS := -std=c99
LOCAL_C_INCLUDES:= $(LOCAL_PATH)/opus-1.1/include
LOCAL_LDLIBS := -lOpenSLES -llog -lz -lm
LOCAL_STATIC_LIBRARIES := libopus
include $(BUILD_SHARED_LIBRARY)
It's perfectly compile for mips64, mips, x86_64, x86, arm64-v8a, armeabi-v7a
But when gradle is trying to compile for armeabi, I have an issue.
[armeabi] Compile thumb : opus <= NSQ_del_dec.c
fatal error: error in backend: Cannot select: 0x314f020: i32 = ARMISD::SSAT 0x30e3a30, Constant:i32<15>
0x30e3a30: i32 = sra 0x30e38e0, Constant:i32<1>
0x30e38e0: i32 = add 0x30e0bd0, Constant:i32<1>
0x30e0bd0: i32 = sra 0x3153cf0, Constant:i32<7>
0x3153cf0: i32 = add 0x30b45e0, 0x30b1e50
0x30b45e0: i32 = add 0x30e1110, 0x30e0fc0
0x30e1110: i32 = sra 0x30b24e0, Constant:i32<16>
[...]
In function: silk_noise_shape_quantizer_del_dec
clang: error: clang frontend command failed with exit code 70 (use -v to see invocation)
Android clang version 3.8.275480 (based on LLVM 3.8.275480)
Target: armv5te-none-linux-android
Thread model: posix
InstalledDir: /home/maathor/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin
clang: note: diagnostic msg: PLEASE submit a bug report to http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and associated run script.
clang: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /tmp/NSQ_del_dec-110b1d.c
clang: note: diagnostic msg: /tmp/NSQ_del_dec-110b1d.sh
clang: note: diagnostic msg:
********************
make: *** [/home/maathor/app/smplayerapp/android/TestImport/app/build/intermediates/ndkBuild/debug/obj/local/armeabi/objs-debug/opus/silk/NSQ_del_dec.o] Error 70
:app:externalNativeBuildDebug FAILED
:app:buildInfoGeneratorDebug
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:externalNativeBuildDebug'.
> Build command failed.
Error while executing process /home/maathor/Android/Sdk/ndk-bundle/ndk-build with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=/home/maathor/app/smplayerapp/android/TestImport/app/src/main/jni/Android.mk APP_ABI=armeabi NDK_ALL_ABIS=armeabi NDK_DEBUG=1 APP_PLATFORM=android-15 NDK_OUT=/home/maathor/app/smplayerapp/android/TestImport/app/build/intermediates/ndkBuild/debug/obj NDK_LIBS_OUT=/home/maathor/app/smplayerapp/android/TestImport/app/build/intermediates/ndkBuild/debug/lib /home/maathor/app/smplayerapp/android/TestImport/app/build/intermediates/ndkBuild/debug/obj/local/armeabi/libreceiver-jni.so}
[armeabi] Compile thumb : receiver-jni <= osl_receiver.c
Do you understand something ? I just would like to build it for my Samsung Galaxy 5 on 6.0.1 !
Thanks for your reply !
ANSWER:
After many tests, it's perfectly work with NDK 13 B (the october 2016 version)
After many tests, it's perfectly work with NDK 13 B (the october 2016 version)

ffmpeg build error looks tmp file creat fail?

./configure --target-os=android --prefix=$PREFIX \
--enable-cross-compile --enable-runtime-cpudetect --disable-asm --arch=arm \
--cc=$PREBUILT/linux-x86_64/bin/arm-linux-androideabi-gcc \
--cross-prefix=$PREBUILT/linux-x86_64/bin/arm-linux-androideabi- \
--disable-stripping --nm=$PREBUILT/linux-x86_64/bin/arm-linux-androideabi-nm --sysroot=$PLATFORM --enable-gpl --enable-shared --disable-static --enable-small --disable-ffprobe --disable-ffplay --disable-ffmpeg --disable-ffserver --disable-debug --extra-cflags="-fPIC -DANDROID -D__thumb__ -mthumb -Wfatal-errors -Wno-deprecated -mfloat-abi=softfp -marm -march=armv7-a"
this is out put log:
Makefile:2: config.mak: 没有那个文件或目录
Makefile:67: /common.mak: 没有那个文件或目录
Makefile:109: /libavutil/Makefile: 没有那个文件或目录
Makefile:109: /library.mak: 没有那个文件或目录
Makefile:111: /doc/Makefile: 没有那个文件或目录
Makefile:198: /tests/Makefile: 没有那个文件或目录
make: *** No rule to make target '/tests/Makefile'。 停止。
/opt/android/android-sdk-linux/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc is unable to create an executable file.
C compiler test failed.
If you think configure made a mistake, make sure you are using the latest
version from Git. If the latest version fails, report the problem to the
ffmpeg-user#ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.log" produced by configure as this will help
solve the problem.
but my gcc path works fine
/opt/android/android-sdk-linux/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc
arm-linux-androideabi-gcc: fatal error: no input files
compilation terminated.
I seems the temp file not create ,I can't find temp file in /tmp
this is end of config.log file:
dition: defined __ARM_ARCH_6T2__ || defined __TARGET_ARCH_6T2"
^
compilation terminated due to -Wfatal-errors.
check_cpp_condition stddef.h defined __ARM_ARCH_7__ || defined __TARGET_ARCH_7
check_cpp
BEGIN /tmp/ffconf.FHwGDPbC.c
1 #include <stddef.h>
2 #if !(defined __ARM_ARCH_7__ || defined __TARGET_ARCH_7)
3 #error "unsatisfied condition: defined __ARM_ARCH_7__ || defined __TARGET_ARCH_7"
4 #endif
END /tmp/ffconf.FHwGDPbC.c
/opt/android/android-sdk-linux/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc --sysroot=/opt/android/android-sdk-linux/ndk-bundle/platforms/android-arm -isysroot /opt/android/android-sdk-linux/ndk-bundle/platforms/android-arm -fPIC -DANDROID -D__thumb__ -mthumb -Wfatal-errors -Wno-deprecated -mfloat-abi=softfp -marm -march=armv7-a -E -o /tmp/ffconf.csA8Jm6F.o /tmp/ffconf.FHwGDPbC.c
/tmp/ffconf.FHwGDPbC.c:3:2: error: #error "unsatisfied condition: defined __ARM_ARCH_7__ || defined __TARGET_ARCH_7"
#error "unsatisfied condition: defined __ARM_ARCH_7__ || defined __TARGET_ARCH_7"
^
compilation terminated due to -Wfatal-errors.
check_cpp_condition stddef.h defined __ARM_ARCH_7A__ || defined __TARGET_ARCH_7_A
check_cpp
BEGIN /tmp/ffconf.FHwGDPbC.c
1 #include <stddef.h>
2 #if !(defined __ARM_ARCH_7A__ || defined __TARGET_ARCH_7_A)
3 #error "unsatisfied condition: defined __ARM_ARCH_7A__ || defined __TARGET_ARCH_7_A"
4 #endif
END /tmp/ffconf.FHwGDPbC.c
/opt/android/android-sdk-linux/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc --sysroot=/opt/android/android-sdk-linux/ndk-bundle/platforms/android-arm -isysroot /opt/android/android-sdk-linux/ndk-bundle/platforms/android-arm -fPIC -DANDROID -D__thumb__ -mthumb -Wfatal-errors -Wno-deprecated -mfloat-abi=softfp -marm -march=armv7-a -E -o /tmp/ffconf.csA8Jm6F.o /tmp/ffconf.FHwGDPbC.c
check_ld cc
check_cc
BEGIN /tmp/ffconf.FHwGDPbC.c
1 int main(void){ return 0; }
END /tmp/ffconf.FHwGDPbC.c
/opt/android/android-sdk-linux/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc --sysroot=/opt/android/android-sdk-linux/ndk-bundle/platforms/android-arm -isysroot /opt/android/android-sdk-linux/ndk-bundle/platforms/android-arm -fPIC -DANDROID -D__thumb__ -mthumb -Wfatal-errors -Wno-deprecated -mfloat-abi=softfp -marm -march=armv7-a -march=armv7-a -c -o /tmp/ffconf.csA8Jm6F.o /tmp/ffconf.FHwGDPbC.c
/opt/android/android-sdk-linux/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc --sysroot=/opt/android/android-sdk-linux/ndk-bundle/platforms/android-arm -isysroot /opt/android/android-sdk-linux/ndk-bundle/platforms/android-arm -march=armv7-a -o /tmp/ffconf.fjKb0Qb0 /tmp/ffconf.csA8Jm6F.o
/opt/android/android-sdk-linux/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: cannot open crtbegin_dynamic.o: No such file or directory
/opt/android/android-sdk-linux/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: cannot open crtend_android.o: No such file or directory
/opt/android/android-sdk-linux/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lc
/opt/android/android-sdk-linux/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: cannot find -ldl
collect2: error: ld returned 1 exit status
C compiler test failed.
Default NDK toolchain is unsuitable for compiling Autoconf projects. You'll need to generate standalong toolchain as described here. If this does not help, you should examine the failing command in config.log and see what exactly goes wrong (simple gcc test won't help as errors may be caused by linker).

UnsatisfiedLinkError In Android 4.4 libDevil cannot locate symbol "png_set_longjmp_fn"

I have an image converter app on google play that runs fine and well, it incorporates NDK for support of more file formats using the DevIL Image Processing library.
It wokrs fine on most devices but since Android 4.4 Kitkat came out, i've received emails and crash reports on Google Play Console especially from Nexus devices that have 4.4 and now other older devices that receive the update
Here is the crash report
java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "png_set_longjmp_fn" referenced by "libdevil.so"...
at java.lang.Runtime.loadLibrary(Runtime.java:364)
at java.lang.System.loadLibrary(System.java:526)
at com.paul.icon.MainActivity.<clinit>(Unknown Source)
at java.lang.Class.newInstanceImpl(Native Method)
at java.lang.Class.newInstance(Class.java:1208)
at android.app.Instrumentation.newActivity(Instrumentation.java:1061)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2112)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
at android.app.ActivityThread.access$800(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5017)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)
The app can't start and from my own debugging it's from the first lines of my MainActivity.java when loading libdevil
static {
System.loadLibrary("physfs");
System.loadLibrary("jpeg");
System.loadLibrary("tiff");
System.loadLibrary("mng");
System.loadLibrary("png");
System.loadLibrary("jasper");
System.loadLibrary("lcms");
System.loadLibrary("devil");
System.loadLibrary("mylib");
}
saying....
java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "png_set_longjmp_fn" referenced by "libdevil.so"...
here is my android.mk file
LOCAL_PATH := $(call my-dir)
PHYSFS_SRC_PATH := physfs-2.0.2/
TIFF_SRC_PATH := tiff-3.9.5/
MNG_SRC_PATH := libmng-1.0.10/
LCMS_SRC_PATH := lcms2-2.2/
PNG_SRC_PATH := libpng-1.5.6/
JPEG_SRC_PATH := jpeg-8c/
JASPER_SRC_PATH := jasper-1.900.1/
DEVIL_SRC_PATH := devil-1.7.8/
#libjpeg
include $(CLEAR_VARS)
LOCAL_MODULE := libjpeg
LOCAL_MODULE_FILENAME := libjpeg
LOCAL_SRC_FILES := \
${JPEG_SRC_PATH}jcapimin.c ${JPEG_SRC_PATH}jcapistd.c ${JPEG_SRC_PATH}jccoefct.c ${JPEG_SRC_PATH}jccolor.c ${JPEG_SRC_PATH}jcdctmgr.c ${JPEG_SRC_PATH}jchuff.c \
${JPEG_SRC_PATH}jcinit.c ${JPEG_SRC_PATH}jcmainct.c ${JPEG_SRC_PATH}jcmarker.c ${JPEG_SRC_PATH}jcmaster.c ${JPEG_SRC_PATH}jcomapi.c ${JPEG_SRC_PATH}jcparam.c \
${JPEG_SRC_PATH}jcprepct.c ${JPEG_SRC_PATH}jcsample.c ${JPEG_SRC_PATH}jctrans.c ${JPEG_SRC_PATH}jdapimin.c ${JPEG_SRC_PATH}jdapistd.c \
${JPEG_SRC_PATH}jdatadst.c ${JPEG_SRC_PATH}jdatasrc.c ${JPEG_SRC_PATH}jdcoefct.c ${JPEG_SRC_PATH}jdcolor.c ${JPEG_SRC_PATH}jddctmgr.c ${JPEG_SRC_PATH}jdhuff.c \
${JPEG_SRC_PATH}jdinput.c ${JPEG_SRC_PATH}jdmainct.c ${JPEG_SRC_PATH}jdmarker.c ${JPEG_SRC_PATH}jdmaster.c ${JPEG_SRC_PATH}jdmerge.c \
${JPEG_SRC_PATH}jdpostct.c ${JPEG_SRC_PATH}jdsample.c ${JPEG_SRC_PATH}jdtrans.c ${JPEG_SRC_PATH}jerror.c ${JPEG_SRC_PATH}jfdctflt.c ${JPEG_SRC_PATH}jfdctfst.c \
${JPEG_SRC_PATH}jfdctint.c ${JPEG_SRC_PATH}jidctflt.c ${JPEG_SRC_PATH}jidctfst.c ${JPEG_SRC_PATH}jidctint.c ${JPEG_SRC_PATH}jquant1.c \
${JPEG_SRC_PATH}jquant2.c ${JPEG_SRC_PATH}jutils.c ${JPEG_SRC_PATH}jmemmgr.c ${JPEG_SRC_PATH}jcarith.c ${JPEG_SRC_PATH}jdarith.c ${JPEG_SRC_PATH}jaricom.c
# Use the no backing store memory manager provided by
# libjpeg. See install.txt
LOCAL_SRC_FILES += \
${JPEG_SRC_PATH}jmemnobs.c
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)
include $(BUILD_STATIC_LIBRARY)
#libtiff
include $(CLEAR_VARS)
LOCAL_MODULE := libtiff
LOCAL_CFLAGS := -g -Dlinux -DFT2_BUILD_LIBRARY=1 -DPHYSFS_NO_CDROM_SUPPORT=1 -DAL_ALEXT_PROTOTYPES=1 -DHAVE_GCC_DESTRUCTOR=1 -DOPT_GENERIC -DREAL_IS_FLOAT
LOCAL_CPPFLAGS := ${LOCAL_CFLAGS}
LOCAL_C_INCLUDES := \
${TIFF_SRC_PATH}libtiff/ \
${JPEG_SRC_PATH} \
LOCAL_SRC_FILES := \
${TIFF_SRC_PATH}libtiff/tif_dir.c \
${TIFF_SRC_PATH}libtiff/tif_codec.c \
${TIFF_SRC_PATH}libtiff/tif_predict.c \
${TIFF_SRC_PATH}libtiff/tif_tile.c \
${TIFF_SRC_PATH}libtiff/tif_version.c \
${TIFF_SRC_PATH}libtiff/tif_unix.c \
${TIFF_SRC_PATH}libtiff/tif_swab.c \
${TIFF_SRC_PATH}libtiff/tif_thunder.c \
${TIFF_SRC_PATH}libtiff/tif_next.c \
${TIFF_SRC_PATH}libtiff/tif_strip.c \
${TIFF_SRC_PATH}libtiff/tif_extension.c \
${TIFF_SRC_PATH}libtiff/tif_error.c \
${TIFF_SRC_PATH}libtiff/tif_dirwrite.c \
${TIFF_SRC_PATH}libtiff/tif_fax3sm.c \
${TIFF_SRC_PATH}libtiff/tif_ojpeg.c \
${TIFF_SRC_PATH}libtiff/tif_flush.c \
${TIFF_SRC_PATH}libtiff/tif_warning.c \
${TIFF_SRC_PATH}libtiff/tif_fax3.c \
${TIFF_SRC_PATH}libtiff/tif_jbig.c \
${TIFF_SRC_PATH}libtiff/tif_open.c \
${TIFF_SRC_PATH}libtiff/tif_write.c \
${TIFF_SRC_PATH}libtiff/tif_packbits.c \
${TIFF_SRC_PATH}libtiff/tif_compress.c \
${TIFF_SRC_PATH}libtiff/tif_color.c \
${TIFF_SRC_PATH}libtiff/tif_print.c \
${TIFF_SRC_PATH}libtiff/tif_zip.c \
${TIFF_SRC_PATH}libtiff/tif_aux.c \
${TIFF_SRC_PATH}libtiff/tif_dumpmode.c \
${TIFF_SRC_PATH}libtiff/tif_dirread.c \
${TIFF_SRC_PATH}libtiff/tif_getimage.c \
${TIFF_SRC_PATH}libtiff/tif_jpeg.c \
${TIFF_SRC_PATH}libtiff/tif_close.c \
${TIFF_SRC_PATH}libtiff/tif_read.c \
${TIFF_SRC_PATH}libtiff/tif_luv.c \
${TIFF_SRC_PATH}libtiff/tif_dirinfo.c \
${TIFF_SRC_PATH}libtiff/tif_lzw.c \
${TIFF_SRC_PATH}libtiff/tif_pixarlog.c \
${TIFF_SRC_PATH}port/lfind.c
LOCAL_LDLIBS := -llog -L../lib -lGLESv1_CM
LOCAL_STATIC_LIBRARIES := libjpeg libphysfs
include $(BUILD_SHARED_LIBRARY)
#libphysfs
include $(CLEAR_VARS)
LOCAL_MODULE := libphysfs
LOCAL_CFLAGS := -g -Dlinux -Dunix -DFT2_BUILD_LIBRARY=1 -DPHYSFS_NO_CDROM_SUPPORT=1 -DAL_ALEXT_PROTOTYPES=1 -DHAVE_GCC_DESTRUCTOR=1 -DOPT_GENERIC -DREAL_IS_FLOAT \
-DPHYSFS_SUPPORTS_APK=1 -DPHYSFS_SUPPORTS_ZIP=1 -DPHYSFS_SUPPORTS_ZIP=1 -DPHYSFS_SUPPORTS_7Z=1 -DPHYSFS_SUPPORTS_GRP=1 -DPHYSFS_SUPPORTS_QPAK=1 -DPHYSFS_SUPPORTS_HOG=1 -DPHYSFS_SUPPORTS_MVL=1 -DPHYSFS_SUPPORTS_WAD=1
LOCAL_CPPFLAGS := ${LOCAL_CFLAGS}
LOCAL_C_INCLUDES := \
${PHYSFS_SRC_PATH}
LOCAL_SRC_FILES := \
${PHYSFS_SRC_PATH}/physfs.c \
${PHYSFS_SRC_PATH}/physfs_byteorder.c \
${PHYSFS_SRC_PATH}/physfs_unicode.c \
${PHYSFS_SRC_PATH}/platform/os2.c \
${PHYSFS_SRC_PATH}/platform/pocketpc.c \
${PHYSFS_SRC_PATH}/platform/posix.c \
${PHYSFS_SRC_PATH}/platform/unix.c \
${PHYSFS_SRC_PATH}/platform/macosx.c \
${PHYSFS_SRC_PATH}/platform/windows.c \
${PHYSFS_SRC_PATH}/archivers/dir.c \
${PHYSFS_SRC_PATH}/archivers/grp.c \
${PHYSFS_SRC_PATH}/archivers/hog.c \
${PHYSFS_SRC_PATH}/archivers/lzma.c \
${PHYSFS_SRC_PATH}/archivers/mvl.c \
${PHYSFS_SRC_PATH}/archivers/qpak.c \
${PHYSFS_SRC_PATH}/archivers/wad.c \
${PHYSFS_SRC_PATH}/archivers/zip.c \
${PHYSFS_SRC_PATH}/archivers/apk.c \
${PHYSFS_SRC_PATH}/lzma/C/7zCrc.c \
${PHYSFS_SRC_PATH}/lzma/C/Archive/7z/7zBuffer.c \
${PHYSFS_SRC_PATH}/lzma/C/Archive/7z/7zDecode.c \
${PHYSFS_SRC_PATH}/lzma/C/Archive/7z/7zExtract.c \
${PHYSFS_SRC_PATH}/lzma/C/Archive/7z/7zHeader.c \
${PHYSFS_SRC_PATH}/lzma/C/Archive/7z/7zIn.c \
${PHYSFS_SRC_PATH}/lzma/C/Archive/7z/7zItem.c \
${PHYSFS_SRC_PATH}/lzma/C/Archive/7z/7zMethodID.c \
${PHYSFS_SRC_PATH}/lzma/C/Compress/Branch/BranchX86.c \
${PHYSFS_SRC_PATH}/lzma/C/Compress/Branch/BranchX86_2.c \
${PHYSFS_SRC_PATH}/lzma/C/Compress/Lzma/LzmaDecode.c \
${PHYSFS_SRC_PATH}/zlib123/adler32.c \
${PHYSFS_SRC_PATH}/zlib123/compress.c \
${PHYSFS_SRC_PATH}/zlib123/crc32.c \
${PHYSFS_SRC_PATH}/zlib123/deflate.c \
${PHYSFS_SRC_PATH}/zlib123/gzio.c \
${PHYSFS_SRC_PATH}/zlib123/infback.c \
${PHYSFS_SRC_PATH}/zlib123/inffast.c \
${PHYSFS_SRC_PATH}/zlib123/inflate.c \
${PHYSFS_SRC_PATH}/zlib123/inftrees.c \
${PHYSFS_SRC_PATH}/zlib123/trees.c \
${PHYSFS_SRC_PATH}/zlib123/uncompr.c \
${PHYSFS_SRC_PATH}/zlib123/zutil.c \
LOCAL_LDLIBS := -llog -L../lib -lGLESv1_CM
LOCAL_STATIC_LIBRARIES :=
include $(BUILD_SHARED_LIBRARY)
#libmng
include $(CLEAR_VARS)
LOCAL_MODULE := libmng
LOCAL_CFLAGS := -g -Dlinux -DFT2_BUILD_LIBRARY=1 -DPHYSFS_NO_CDROM_SUPPORT=1 -DAL_ALEXT_PROTOTYPES=1 -DHAVE_GCC_DESTRUCTOR=1 -DOPT_GENERIC -DREAL_IS_FLOAT
LOCAL_CPPFLAGS := ${LOCAL_CFLAGS}
LOCAL_C_INCLUDES := \
${JPEG_SRC_PATH} \
${MNG_SRC_PATH}
LOCAL_SRC_FILES := \
${MNG_SRC_PATH}libmng_write.c \
${MNG_SRC_PATH}libmng_object_prc.c \
${MNG_SRC_PATH}libmng_display.c \
${MNG_SRC_PATH}libmng_chunk_xs.c \
${MNG_SRC_PATH}libmng_chunk_io.c \
${MNG_SRC_PATH}libmng_read.c \
${MNG_SRC_PATH}libmng_prop_xs.c \
${MNG_SRC_PATH}libmng_filter.c \
${MNG_SRC_PATH}libmng_chunk_descr.c \
${MNG_SRC_PATH}libmng_cms.c \
${MNG_SRC_PATH}libmng_zlib.c \
${MNG_SRC_PATH}libmng_pixels.c \
${MNG_SRC_PATH}libmng_error.c \
${MNG_SRC_PATH}libmng_trace.c \
${MNG_SRC_PATH}libmng_jpeg.c \
${MNG_SRC_PATH}libmng_callback_xs.c \
${MNG_SRC_PATH}libmng_dither.c \
${MNG_SRC_PATH}libmng_hlapi.c \
${MNG_SRC_PATH}libmng_chunk_prc.c \
LOCAL_LDLIBS := -llog -L../lib -lGLESv1_CM
LOCAL_STATIC_LIBRARIES := libjpeg libphysfs
include $(BUILD_SHARED_LIBRARY)
#liblcms
include $(CLEAR_VARS)
LOCAL_MODULE := liblcms
LOCAL_CFLAGS := -g -Dlinux -DFT2_BUILD_LIBRARY=1 -DPHYSFS_NO_CDROM_SUPPORT=1 -DAL_ALEXT_PROTOTYPES=1 -DHAVE_GCC_DESTRUCTOR=1 -DOPT_GENERIC -DREAL_IS_FLOAT
LOCAL_CPPFLAGS := ${LOCAL_CFLAGS}
LOCAL_C_INCLUDES := \
${LCMS_SRC_PATH}include/ \
LOCAL_SRC_FILES := \
${LCMS_SRC_PATH}src/cmscam02.c \
${LCMS_SRC_PATH}src/cmserr.c \
${LCMS_SRC_PATH}src/cmstypes.c \
${LCMS_SRC_PATH}src/cmsmd5.c \
${LCMS_SRC_PATH}src/cmswtpnt.c \
${LCMS_SRC_PATH}src/cmsgmt.c \
${LCMS_SRC_PATH}src/cmspcs.c \
${LCMS_SRC_PATH}src/cmsopt.c \
${LCMS_SRC_PATH}src/cmscnvrt.c \
${LCMS_SRC_PATH}src/cmsps2.c \
${LCMS_SRC_PATH}src/cmssamp.c \
${LCMS_SRC_PATH}src/cmsplugin.c \
${LCMS_SRC_PATH}src/cmsmtrx.c \
${LCMS_SRC_PATH}src/cmspack.c \
${LCMS_SRC_PATH}src/cmsio0.c \
${LCMS_SRC_PATH}src/cmsgamma.c \
${LCMS_SRC_PATH}src/cmscgats.c \
${LCMS_SRC_PATH}src/cmsxform.c \
${LCMS_SRC_PATH}src/cmsnamed.c \
${LCMS_SRC_PATH}src/cmssm.c \
${LCMS_SRC_PATH}src/cmsio1.c \
${LCMS_SRC_PATH}src/cmsintrp.c \
${LCMS_SRC_PATH}src/cmslut.c \
${LCMS_SRC_PATH}src/cmsvirt.c \
LOCAL_LDLIBS := -llog -L../lib -lGLESv1_CM
LOCAL_STATIC_LIBRARIES :=
include $(BUILD_SHARED_LIBRARY)
#libpng
include $(CLEAR_VARS)
LOCAL_MODULE := libpng
LOCAL_CFLAGS := -g -Dlinux -DFT2_BUILD_LIBRARY=1 -DPHYSFS_NO_CDROM_SUPPORT=1 -DAL_ALEXT_PROTOTYPES=1 -DHAVE_GCC_DESTRUCTOR=1 -DOPT_GENERIC -DREAL_IS_FLOAT
LOCAL_CPPFLAGS := ${LOCAL_CFLAGS}
LOCAL_C_INCLUDES := \
${PNG_SRC_PATH} \
LOCAL_SRC_FILES := \
${PNG_SRC_PATH}pngerror.c \
${PNG_SRC_PATH}pngwio.c \
${PNG_SRC_PATH}pngwrite.c \
${PNG_SRC_PATH}pngwutil.c \
${PNG_SRC_PATH}pngwtran.c \
${PNG_SRC_PATH}pngset.c \
${PNG_SRC_PATH}pngtrans.c \
${PNG_SRC_PATH}example.c \
${PNG_SRC_PATH}png.c \
${PNG_SRC_PATH}pngrtran.c \
${PNG_SRC_PATH}pngmem.c \
${PNG_SRC_PATH}pngpread.c \
${PNG_SRC_PATH}pngrutil.c \
${PNG_SRC_PATH}pngrio.c \
${PNG_SRC_PATH}pngget.c \
${PNG_SRC_PATH}pngread.c \
LOCAL_LDLIBS := -llog -L../lib -lGLESv1_CM
LOCAL_STATIC_LIBRARIES := libphysfs
include $(BUILD_SHARED_LIBRARY)
#libjasper
include $(CLEAR_VARS)
LOCAL_MODULE := libjasper
LOCAL_CFLAGS := -g -Dlinux -DFT2_BUILD_LIBRARY=1 -DPHYSFS_NO_CDROM_SUPPORT=1 -DAL_ALEXT_PROTOTYPES=1 -DHAVE_GCC_DESTRUCTOR=1 -DOPT_GENERIC -DREAL_IS_FLOAT
LOCAL_CPPFLAGS := ${LOCAL_CFLAGS}
LOCAL_C_INCLUDES := \
${JASPER_SRC_PATH}src/libjasper/include \
${JPEG_SRC_PATH} \
LOCAL_SRC_FILES := \
${JASPER_SRC_PATH}src/libjasper/base/jas_cm.c \
${JASPER_SRC_PATH}src/libjasper/base/jas_getopt.c \
${JASPER_SRC_PATH}src/libjasper/base/jas_seq.c \
${JASPER_SRC_PATH}src/libjasper/base/jas_malloc.c \
${JASPER_SRC_PATH}src/libjasper/base/jas_init.c \
${JASPER_SRC_PATH}src/libjasper/base/jas_debug.c \
${JASPER_SRC_PATH}src/libjasper/base/jas_stream.c \
${JASPER_SRC_PATH}src/libjasper/base/jas_string.c \
${JASPER_SRC_PATH}src/libjasper/base/jas_version.c \
${JASPER_SRC_PATH}src/libjasper/base/jas_tmr.c \
${JASPER_SRC_PATH}src/libjasper/base/jas_image.c \
${JASPER_SRC_PATH}src/libjasper/base/jas_tvp.c \
${JASPER_SRC_PATH}src/libjasper/base/jas_iccdata.c \
${JASPER_SRC_PATH}src/libjasper/base/jas_icc.c \
${JASPER_SRC_PATH}src/libjasper/jpc/jpc_mqcod.c \
${JASPER_SRC_PATH}src/libjasper/jpc/jpc_t1enc.c \
${JASPER_SRC_PATH}src/libjasper/jpc/jpc_dec.c \
${JASPER_SRC_PATH}src/libjasper/jpc/jpc_math.c \
${JASPER_SRC_PATH}src/libjasper/jpc/jpc_util.c \
${JASPER_SRC_PATH}src/libjasper/jpc/jpc_bs.c \
${JASPER_SRC_PATH}src/libjasper/jpc/jpc_tagtree.c \
${JASPER_SRC_PATH}src/libjasper/jpc/jpc_t1cod.c \
${JASPER_SRC_PATH}src/libjasper/jpc/jpc_t2enc.c \
${JASPER_SRC_PATH}src/libjasper/jpc/jpc_mqenc.c \
${JASPER_SRC_PATH}src/libjasper/jpc/jpc_enc.c \
${JASPER_SRC_PATH}src/libjasper/jpc/jpc_qmfb.c \
${JASPER_SRC_PATH}src/libjasper/jpc/jpc_t1dec.c \
${JASPER_SRC_PATH}src/libjasper/jpc/jpc_cs.c \
${JASPER_SRC_PATH}src/libjasper/jpc/jpc_t2cod.c \
${JASPER_SRC_PATH}src/libjasper/jpc/jpc_tsfb.c \
${JASPER_SRC_PATH}src/libjasper/jpc/jpc_mqdec.c \
${JASPER_SRC_PATH}src/libjasper/jpc/jpc_t2dec.c \
${JASPER_SRC_PATH}src/libjasper/jpc/jpc_mct.c \
${JASPER_SRC_PATH}src/libjasper/dummy.c \
${JASPER_SRC_PATH}src/libjasper/pnm/pnm_dec.c \
${JASPER_SRC_PATH}src/libjasper/pnm/pnm_enc.c \
${JASPER_SRC_PATH}src/libjasper/pnm/pnm_cod.c \
${JASPER_SRC_PATH}src/libjasper/jp2/jp2_enc.c \
${JASPER_SRC_PATH}src/libjasper/jp2/jp2_cod.c \
${JASPER_SRC_PATH}src/libjasper/jp2/jp2_dec.c \
${JASPER_SRC_PATH}src/libjasper/pgx/pgx_dec.c \
${JASPER_SRC_PATH}src/libjasper/pgx/pgx_enc.c \
${JASPER_SRC_PATH}src/libjasper/pgx/pgx_cod.c \
${JASPER_SRC_PATH}src/libjasper/bmp/bmp_enc.c \
${JASPER_SRC_PATH}src/libjasper/bmp/bmp_dec.c \
${JASPER_SRC_PATH}src/libjasper/bmp/bmp_cod.c \
${JASPER_SRC_PATH}src/libjasper/jpg/jpg_val.c \
${JASPER_SRC_PATH}src/libjasper/jpg/jpg_enc.c \
${JASPER_SRC_PATH}src/libjasper/jpg/jpg_dec.c \
${JASPER_SRC_PATH}src/libjasper/ras/ras_cod.c \
${JASPER_SRC_PATH}src/libjasper/ras/ras_dec.c \
${JASPER_SRC_PATH}src/libjasper/ras/ras_enc.c \
${JASPER_SRC_PATH}src/libjasper/mif/mif_cod.c \
LOCAL_LDLIBS := -llog -L../lib -lGLESv1_CM
LOCAL_STATIC_LIBRARIES := libjpeg
include $(BUILD_SHARED_LIBRARY)
#libdevil
include $(CLEAR_VARS)
LOCAL_MODULE := libdevil
LOCAL_CFLAGS := -g -Dlinux -DFT2_BUILD_LIBRARY=1 -DPHYSFS_NO_CDROM_SUPPORT=1 -DAL_ALEXT_PROTOTYPES=1 -DHAVE_GCC_DESTRUCTOR=1 -DOPT_GENERIC -DREAL_IS_FLOAT -fexceptions
LOCAL_CPPFLAGS := ${LOCAL_CFLAGS}
LOCAL_C_INCLUDES := \
${DEVIL_SRC_PATH}include \
${DEVIL_SRC_PATH}src-IL/include \
${DEVIL_SRC_PATH}src-ILU/include \
${JASPER_SRC_PATH}src/libjasper/include \
${PHYSFS_SRC_PATH} \
${PHYSFS_SRC_PATH}zlib123 \
${PNG_SRC_PATH} \
${MNG_SRC_PATH} \
${JPEG_SRC_PATH} \
${LCMS_SRC_PATH}include/ \
${TIFF_SRC_PATH}libtiff/ \
LOCAL_SRC_FILES := \
${DEVIL_SRC_PATH}src-IL/src/il_sun.c \
${DEVIL_SRC_PATH}src-IL/src/il_wdp.c \
${DEVIL_SRC_PATH}src-IL/src/il_doom.c \
${DEVIL_SRC_PATH}src-IL/src/il_jp2.c \
${DEVIL_SRC_PATH}src-IL/src/il_tpl.c \
${DEVIL_SRC_PATH}src-IL/src/il_size.c \
${DEVIL_SRC_PATH}src-IL/src/il_rle.c \
${DEVIL_SRC_PATH}src-IL/src/il_gif.c \
${DEVIL_SRC_PATH}src-IL/src/il_states.c \
${DEVIL_SRC_PATH}src-IL/src/il_psp.c \
${DEVIL_SRC_PATH}src-IL/src/il_devil.c \
${DEVIL_SRC_PATH}src-IL/src/il_convbuff.c \
${DEVIL_SRC_PATH}src-IL/src/il_ftx.c \
${DEVIL_SRC_PATH}src-IL/src/il_vtf.c \
${DEVIL_SRC_PATH}src-IL/src/il_iff.c \
${DEVIL_SRC_PATH}src-IL/src/il_lif.c \
${DEVIL_SRC_PATH}src-IL/src/il_pcx.c \
${DEVIL_SRC_PATH}src-IL/src/il_io.c \
${DEVIL_SRC_PATH}src-IL/src/il_files.c \
${DEVIL_SRC_PATH}src-IL/src/il_fastconv.c \
${DEVIL_SRC_PATH}src-IL/src/il_error.c \
${DEVIL_SRC_PATH}src-IL/src/il_main.c \
${DEVIL_SRC_PATH}src-IL/src/il_utx.cpp \
${DEVIL_SRC_PATH}src-IL/src/il_pcd.c \
${DEVIL_SRC_PATH}src-IL/src/il_neuquant.c \
${DEVIL_SRC_PATH}src-IL/src/il_dds.c \
${DEVIL_SRC_PATH}src-IL/src/il_dicom.c \
${DEVIL_SRC_PATH}src-IL/src/il_wal.c \
${DEVIL_SRC_PATH}src-IL/src/il_icon.c \
${DEVIL_SRC_PATH}src-IL/src/il_blp.c \
${DEVIL_SRC_PATH}src-IL/src/il_mp3.c \
${DEVIL_SRC_PATH}src-IL/src/il_header.c \
${DEVIL_SRC_PATH}src-IL/src/il_alloc.c \
${DEVIL_SRC_PATH}src-IL/src/il_sgi.c \
${DEVIL_SRC_PATH}src-IL/src/il_stack.c \
${DEVIL_SRC_PATH}src-IL/src/il_texture.c \
${DEVIL_SRC_PATH}src-IL/src/altivec_typeconversion.c \
${DEVIL_SRC_PATH}src-IL/src/il_targa.c \
${DEVIL_SRC_PATH}src-IL/src/il_bmp.c \
${DEVIL_SRC_PATH}src-IL/src/il_mdl.c \
${DEVIL_SRC_PATH}src-IL/src/il_pix.c \
${DEVIL_SRC_PATH}src-IL/src/il_pnm.c \
${DEVIL_SRC_PATH}src-IL/src/il_ilbm.c \
${DEVIL_SRC_PATH}src-IL/src/il_icns.c \
${DEVIL_SRC_PATH}src-IL/src/il_cut.c \
${DEVIL_SRC_PATH}src-IL/src/il_profiles.c \
${DEVIL_SRC_PATH}src-IL/src/il_hdr.c \
${DEVIL_SRC_PATH}src-IL/src/il_register.c \
${DEVIL_SRC_PATH}src-IL/src/il_exr.cpp \
${DEVIL_SRC_PATH}src-IL/src/il_iwi.c \
${DEVIL_SRC_PATH}src-IL/src/il_mng.c \
${DEVIL_SRC_PATH}src-IL/src/il_rot.c \
${DEVIL_SRC_PATH}src-IL/src/il_jpeg.c \
${DEVIL_SRC_PATH}src-IL/src/il_png.c \
${DEVIL_SRC_PATH}src-IL/src/il_pxr.c \
${DEVIL_SRC_PATH}src-IL/src/il_nvidia.cpp \
${DEVIL_SRC_PATH}src-IL/src/il_squish.cpp \
${DEVIL_SRC_PATH}src-IL/src/il_utility.c \
${DEVIL_SRC_PATH}src-IL/src/il_internal.c \
${DEVIL_SRC_PATH}src-IL/src/il_psd.c \
${DEVIL_SRC_PATH}src-IL/src/il_endian.c \
${DEVIL_SRC_PATH}src-IL/src/il_quantizer.c \
${DEVIL_SRC_PATH}src-IL/src/il_wbmp.c \
${DEVIL_SRC_PATH}src-IL/src/il_manip.c \
${DEVIL_SRC_PATH}src-IL/src/il_pic.c \
${DEVIL_SRC_PATH}src-IL/src/il_tiff.c \
${DEVIL_SRC_PATH}src-IL/src/il_pal.c \
${DEVIL_SRC_PATH}src-IL/src/il_dds-save.c \
${DEVIL_SRC_PATH}src-IL/src/il_raw.c \
${DEVIL_SRC_PATH}src-IL/src/il_convert.c \
${DEVIL_SRC_PATH}src-IL/src/il_dcx.c \
${DEVIL_SRC_PATH}src-IL/src/il_fits.c \
${DEVIL_SRC_PATH}src-IL/src/il_xpm.c \
${DEVIL_SRC_PATH}src-IL/src/il_bits.c \
${DEVIL_SRC_PATH}src-IL/src/altivec_common.c \
${DEVIL_SRC_PATH}src-IL/src/il_dpx.c \
${DEVIL_SRC_PATH}src-IL/src/il_rawdata.c \
${DEVIL_SRC_PATH}src-ILU/src/ilu_alloc.c \
${DEVIL_SRC_PATH}src-ILU/src/ilu_error.c \
${DEVIL_SRC_PATH}src-ILU/src/ilu_filter_rcg.c \
${DEVIL_SRC_PATH}src-ILU/src/ilu_filter.c \
${DEVIL_SRC_PATH}src-ILU/src/ilu_internal.c \
${DEVIL_SRC_PATH}src-ILU/src/ilu_main.c \
${DEVIL_SRC_PATH}src-ILU/src/ilu_manip.c \
${DEVIL_SRC_PATH}src-ILU/src/ilu_mipmap.c \
${DEVIL_SRC_PATH}src-ILU/src/ilu_noise.c \
${DEVIL_SRC_PATH}src-ILU/src/ilu_region.c \
${DEVIL_SRC_PATH}src-ILU/src/ilu_rotate.c \
${DEVIL_SRC_PATH}src-ILU/src/ilu_scale.c \
${DEVIL_SRC_PATH}src-ILU/src/ilu_scale2d.c \
${DEVIL_SRC_PATH}src-ILU/src/ilu_scale3d.c \
${DEVIL_SRC_PATH}src-ILU/src/ilu_scaling.c \
${DEVIL_SRC_PATH}src-ILU/src/ilu_states.c \
${DEVIL_SRC_PATH}src-ILU/src/ilu_utilities.c \
LOCAL_LDLIBS := -llog -L../lib -lGLESv1_CM -DFT2_BUILD_LIBRARY=1
LOCAL_STATIC_LIBRARIES := \
libjasper \
libpng \
libmng \
libjpeg \
liblcms \
libphysfs \
libtiff
include $(BUILD_SHARED_LIBRARY)
#mylib
include $(CLEAR_VARS)
LOCAL_MODULE := libmylib
LOCAL_CFLAGS := -g -Dlinux -DFT2_BUILD_LIBRARY=1 -DPHYSFS_NO_CDROM_SUPPORT=1 -DAL_ALEXT_PROTOTYPES=1 -DHAVE_GCC_DESTRUCTOR=1 -DOPT_GENERIC -DREAL_IS_FLOAT -fexceptions
LOCAL_CPPFLAGS := ${LOCAL_CFLAGS}
LOCAL_C_INCLUDES := \
${DEVIL_SRC_PATH}include \
${DEVIL_SRC_PATH}src-IL/include \
${DEVIL_SRC_PATH}src-ILU/include \
${JASPER_SRC_PATH}src/libjasper/include \
${PHYSFS_SRC_PATH} \
${PHYSFS_SRC_PATH}zlib123 \
${PNG_SRC_PATH} \
${MNG_SRC_PATH} \
${JPEG_SRC_PATH} \
${LCMS_SRC_PATH}include/ \
${TIFF_SRC_PATH}libtiff/ \
LOCAL_SRC_FILES := native.cpp
LOCAL_LDLIBS := -llog -lGLESv2
LOCAL_STATIC_LIBRARIES := \
libjasper \
libpng \
libmng \
libjpeg \
liblcms \
libphysfs \
libtiff \
libdevil \
include $(BUILD_SHARED_LIBRARY)
and my application.mk
APP_STL := gnustl_static
APP_ABI := armeabi-v7a
after searching my entire jni folder for the png_set_longjmp_fn string, i found it in the following files in my libpng folder. Below are snippets.
pngerror.c
#ifdef PNG_SETJMP_SUPPORTED
/* This API only exists if ANSI-C style error handling is used,
* otherwise it is necessary for png_default_error to be overridden.
*/
jmp_buf* PNGAPI
png_set_longjmp_fn(png_structrp png_ptr, png_longjmp_ptr longjmp_fn,
size_t jmp_buf_size)
{
/* From libpng 1.6.0 the app gets one chance to set a 'jmpbuf_size' value
* and it must not change after that. Libpng doesn't care how big the
* buffer is, just that it doesn't change.
*
* If the buffer size is no *larger* than the size of jmp_buf when libpng is
symbols.def
;Version 1.6.2
;--------------------------------------------------------------
; LIBPNG symbol list as a Win32 DEF file
; Contains all the symbols that can be exported from libpng
;--------------------------------------------------------------
LIBRARY
EXPORTS
png_access_version_number #1
png_set_sig_bytes #2
png_sig_cmp #3
png_create_read_struct #4
png_create_write_struct #5
png_get_compression_buffer_size #6
png_set_compression_buffer_size #7
png_set_longjmp_fn #8
png_longjmp #9
png.h
#ifdef PNG_SETJMP_SUPPORTED
/* This function returns the jmp_buf built in to *png_ptr. It must be
* supplied with an appropriate 'longjmp' function to use on that jmp_buf
* unless the default error function is overridden in which case NULL is
* acceptable. The size of the jmp_buf is checked against the actual size
* allocated by the library - the call will return NULL on a mismatch
* indicating an ABI mismatch.
*/
PNG_EXPORT(8, jmp_buf*, png_set_longjmp_fn, (png_structrp png_ptr,
png_longjmp_ptr longjmp_fn, size_t jmp_buf_size));
# define png_jmpbuf(png_ptr) \
(*png_set_longjmp_fn((png_ptr), longjmp, (sizeof (jmp_buf))))
#else
Any help to make kitkat locate it is much appreciated.
Well from all my googling, I think Android 4.4 tries to link anything called libpng to its own libpng 1.2.46, My libpng 1.5.6 had the png_set_longjmp_fn symbols and the one 4.4 uses doesn't
So i went to my android.mk file and renamed libpng to libpngo as well as the system.load thingy in my mainactivity.
Works OK now.

Linker error: undefined reference to `EVP_cast5_ecb'

I'm trying to compile openssl with cast support but I instead get this error:
SharedLibrary : libcrypto.so
./obj/local/armeabi/objs/crypto/evp/c_allc.o: In function `OpenSSL_add_all_ciphers':
~/testandroid/libssl/jni/crypto/evp/c_allc.c:143: undefined reference to `EVP_cast5_ecb'
~/testandroid/libssl/jni/crypto/evp/c_allc.c:144: undefined reference to `EVP_cast5_cfb64'
~/testandroid/libssl/jni/crypto/evp/c_allc.c:145: undefined reference to `EVP_cast5_ofb'
~/testandroid/libssl/jni/crypto/evp/c_allc.c:146: undefined reference to `EVP_cast5_cbc'
./obj/local/armeabi/objs/crypto/evp/e_old.o: In function `EVP_cast5_cfb':
~/testandroid/libssl/jni/crypto/evp/e_old.c:104: undefined reference to `EVP_cast5_cfb64'
collect2: ld returned 1 exit status
make: *** [obj/local/armeabi/libcrypto.so] Error 1
EVP_cast5_ecb and friends are all defined in ~/testandroid/libssl/jni/crypto/evp/evp.h and in ~/testandroid/libssl/jni/include/evp.h
#ifndef OPENSSL_NO_CAST
const EVP_CIPHER *EVP_cast5_ecb(void);
const EVP_CIPHER *EVP_cast5_cbc(void);
const EVP_CIPHER *EVP_cast5_cfb64(void);
# define EVP_cast5_cfb EVP_cast5_cfb64
const EVP_CIPHER *EVP_cast5_ofb(void);
#endif
In crypto/Android.mk
local_src_files := \
evp/c_allc.c \
evp/e_old.c \
# And a whole bunch of other c files
local_c_includes := \
$(APP_PROJECT_PATH) \
$(APP_PROJECT_PATH)/crypto/asn1 \
$(APP_PROJECT_PATH)/crypto/evp \ # evp.h is located here
$(APP_PROJECT_PATH)/include \
$(APP_PROJECT_PATH)/include/openssl # Another evp.h is also located here
include $(CLEAR_VARS)
include $(LOCAL_PATH)/../android-config.mk
ifeq ($(TARGET_ARCH),arm)
LOCAL_NDK_VERSION := 5
LOCAL_SDK_VERSION := 9
# Use the NDK prebuilt libz and libdl.
LOCAL_LDFLAGS += -lz -ldl
else
LOCAL_SHARED_LIBRARIES += libz libdl
endif
LOCAL_SRC_FILES += $(local_src_files)
LOCAL_CFLAGS += $(local_c_flags)
LOCAL_C_INCLUDES += $(local_c_includes)
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE:= libcrypto
include $(BUILD_SHARED_LIBRARY)
I'm probably missing something very trivial here, since I'm new to Android and C in general, so be nice :)
EDIT: I saw that there is a Makefile for cast. I'm guessing there is a whole load of linking magic going on at the very bottom of the original Makefile. How would I do something equivalent for Android?
#
# OpenSSL/crypto/cast/Makefile
#
DIR= cast
TOP= ../..
CC= cc
CPP= $(CC) -E
INCLUDES=
CFLAG=-g
MAKEFILE= Makefile
AR= ar r
CAST_ENC=c_enc.o
CFLAGS= $(INCLUDES) $(CFLAG)
ASFLAGS= $(INCLUDES) $(ASFLAG)
AFLAGS= $(ASFLAGS)
GENERAL=Makefile
TEST=casttest.c
APPS=
LIB=$(TOP)/libcrypto.a
LIBSRC=c_skey.c c_ecb.c c_enc.c c_cfb64.c c_ofb64.c
LIBOBJ=c_skey.o c_ecb.o $(CAST_ENC) c_cfb64.o c_ofb64.o
SRC= $(LIBSRC)
EXHEADER= cast.h
HEADER= cast_s.h cast_lcl.h $(EXHEADER)
ALL= $(GENERAL) $(SRC) $(HEADER)
top:
(cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
all: lib
lib: $(LIBOBJ)
$(AR) $(LIB) $(LIBOBJ)
$(RANLIB) $(LIB) || echo Never mind.
#touch lib
cast-586.s: asm/cast-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
$(PERL) asm/cast-586.pl $(PERLASM_SCHEME) $(CLAGS) $(PROCESSOR) > $#
files:
$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
links:
#$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
#$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
#$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
install:
#[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
#headerlist="$(EXHEADER)"; for i in $$headerlist ; \
do \
(cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
done;
tags:
ctags $(SRC)
tests:
lint:
lint -DLINT $(INCLUDES) $(SRC)>fluff
depend:
#[ -n "$(MAKEDEPEND)" ] # should be set by upper Makefile...
$(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
dclean:
$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
mv -f Makefile.new $(MAKEFILE)
clean:
rm -f *.s *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
# DO NOT DELETE THIS LINE -- make depend depends on it.
c_cfb64.o: ../../e_os.h ../../include/openssl/cast.h
c_cfb64.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
c_cfb64.o: c_cfb64.c cast_lcl.h
c_ecb.o: ../../e_os.h ../../include/openssl/cast.h
c_ecb.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
c_ecb.o: ../../include/openssl/opensslv.h c_ecb.c cast_lcl.h
c_enc.o: ../../e_os.h ../../include/openssl/cast.h
c_enc.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
c_enc.o: c_enc.c cast_lcl.h
c_ofb64.o: ../../e_os.h ../../include/openssl/cast.h
c_ofb64.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
c_ofb64.o: c_ofb64.c cast_lcl.h
c_skey.o: ../../e_os.h ../../include/openssl/cast.h
c_skey.o: ../../include/openssl/e_os2.h ../../include/openssl/opensslconf.h
c_skey.o: c_skey.c cast_lcl.h cast_s.h

Encode jpeg to H264 stream on Android (ffmpeg)

I have a bunch of jpeg images representing a video.
I need to encode the images in H264 format so I can stream it to a server (from android device).
I understand this can be done using ffmpeg library. I compiled ffmpeg to a .so file and now I'm trying to find out what methods to use and how...
Anyone know how can I convert jpeg into H264 stream on Android using ffmpeg?
Any sample code will be appreciated :)
Thanks!
PB
https://github.com/jhotovy/android-ffmpeg
ProjectTest in this project has android code that creates mp4 from collection of jpg's (video) and an mp3 (audio)
This project is forked from another project on git ..
you can build it on linux following the instructions
I use the modified script to compile ffmpeg with android NDK r8 and ffmpeg 0.1.11.
#!/bin/bash
######################################################
# FFmpeg builds script for Android+ARM platform
#
# This script is released under term of
# CDDL (http://www.opensource.org/licenses/cddl1)
# Wrote by pinxue (~#gmail.com) from RockPlayer.com
# 2010-8 ~ 2011-4
# Modified by Jacx Wang jacxwang(#)gmail.com 2012-07
######################################################
NDK=/Users/jacxwang/app/android-ndk-r8
PLATFORM=/Users/jacxwang/app/android-ndk-r8/platforms/android-8/arch-arm
PREBUILT=/Users/jacxwang/app/android-ndk-r8/toolchains/arm-linux-androideabi-4.4.3/prebuilt/darwin-x86
function build_one
{
./configure --target-os=linux \
--prefix=$PREFIX \
--enable-cross-compile \
--extra-libs="-lgcc" \
--arch=arm \
--cc=$PREBUILT/bin/arm-linux-androideabi-gcc \
--cross-prefix=$PREBUILT/bin/arm-linux-androideabi- \
--nm=$PREBUILT/bin/arm-linux-androideabi-nm \
--sysroot=$PLATFORM \
--extra-cflags=" -O3 -fpic -DANDROID -DHAVE_SYS_UIO_H=1 -Dipv6mr_interface=ipv6mr_ifindex -fasm -Wno-psabi -fno-short-enums -fno-strict-aliasing -finline-limit=300 $OPTIMIZE_CFLAGS " \
--disable-shared \
--enable-static \
--extra-ldflags="-Wl,-rpath-link=$PLATFORM/usr/lib -L$PLATFORM/usr/lib -nostdlib -lc -lm -ldl -llog" \
--enable-parsers \
--enable-encoders \
--enable-decoders \
--enable-muxers \
--enable-demuxers \
--enable-swscale \
--disable-ffplay \
--enable-ffprobe \
--enable-ffserver \
--enable-network \
--enable-indevs \
--disable-bsfs \
--disable-filters \
--enable-protocols \
--enable-asm \
--enable-gpl \
$ADDITIONAL_CONFIGURE_FLAG
#make clean
make -j3 install
$PREBUILT/bin/arm-linux-androideabi-ar d libavcodec/libavcodec.a inverse.o
$PREBUILT/bin/arm-linux-androideabi-ld -rpath-link=$PLATFORM/usr/lib -L$PLATFORM/usr/lib -soname libffmpeg.so -shared -nostdlib -z,noexecstack -Bsymbolic --whole-archive --no-undefined -o $PREFIX/libffmpeg.so libavcodec/libavcodec.a libavformat/libavformat.a libavutil/libavutil.a libswscale/libswscale.a -lc -lm -lz -ldl -llog --warn-once --dynamic-linker=/system/bin/linker $PREBUILT/lib/gcc/arm-linux-androideabi/4.4.3/libgcc.a
}
#arm v6
CPU=armv6
OPTIMIZE_CFLAGS="-marm -march=$CPU"
PREFIX=./android/$CPU
ADDITIONAL_CONFIGURE_FLAG=
#build_one
#arm v7vfpv3
CPU=armv7-a
OPTIMIZE_CFLAGS="-mfloat-abi=softfp -mfpu=vfpv3-d16 -marm -march=$CPU "
PREFIX=./android/$CPU
ADDITIONAL_CONFIGURE_FLAG=
build_one
#arm v7vfp
CPU=armv7-a
OPTIMIZE_CFLAGS="-mfloat-abi=softfp -mfpu=vfp -marm -march=$CPU "
PREFIX=./android/$CPU-vfp
ADDITIONAL_CONFIGURE_FLAG=
build_one
#arm v6+vfp
CPU=armv6
OPTIMIZE_CFLAGS="-DCMP_HAVE_VFP -mfloat-abi=softfp -mfpu=vfp -marm -march=$CPU"
PREFIX=./android/${CPU}-vfp
ADDITIONAL_CONFIGURE_FLAG=
build_one

Categories

Resources