working on it ...

Filters

Explore Public Snippets

Sort by

Found 92 snippets matching: ndk

    public by FMXExpress modified Nov 12, 2014  7005  9  9  4

    Install A Shortcut On Android With Delphi XE5 Firemonkey

    http://www.fmxexpress.com/install-shortcuts-on-the-android-home-screen-with-delphi-xe5-firemonkey/
    //Android permission required:
    //<uses-permission android:name=”com.android.launcher.permission.INSTALL_SHORTCUT”/>
        
    Uses
    Androidapi.JNI.GraphicsContentViewText, FMX.Helpers.Android,
    Androidapi.JNI.JavaTypes, FMX.Platform.Android, AndroidApi.JniBridge, AndroidApi.Jni.App,
    AndroidAPI.jni.OS;
    
    {$IFDEF ANDROID}
    var
    ShortcutIntent: JIntent;
    addIntent: JIntent;
    wIconIdentifier : integer;
    wIconResource : JIntent_ShortcutIconResource;
    {$ENDIF}
    begin
    {$IFDEF ANDROID}
    
    ShortcutIntent := TJIntent.JavaClass.init(SharedActivityContext, SharedActivityContext.getClass);
    ShortcutIntent.setAction(TJIntent.JavaClass.ACTION_MAIN);
    
    addIntent := TJIntent.Create;
    addIntent.putExtra(TJIntent.JavaClass.EXTRA_SHORTCUT_INTENT, TJParcelable.Wrap((shortcutIntent as ILocalObject).GetObjectID));// here we need to cast the intent as it’s not done in delphi by default, not like java
    addIntent.putExtra(TJIntent.JavaClass.EXTRA_SHORTCUT_NAME, StringToJString(Application.Title));
    addIntent.setAction(StringToJString(‘com.android.launcher.action.INSTALL_SHORTCUT’));
    // get icon resource identifier
    wIconIdentifier := SharedActivity.getResources.getIdentifier(StringToJString(‘ic_launcher’), StringToJString(‘drawable’), StringToJString(‘com.embarcadero.HeaderFooterApplication’)); // if the app name change, you must change the package name
    wIconResource := TJIntent_ShortcutIconResource.JavaClass.fromContext(SharedActivityContext, wIconIdentifier);
    // set icon for shortcut
    addIntent.putExtra(TJIntent.JavaClass.EXTRA_SHORTCUT_ICON_RESOURCE, TJParcelable.Wrap((wIconResource as ILocalObject).GetObjectID));
    
    SharedActivityContext.sendBroadcast(addIntent);
    
    {$ENDIF}
     

    external by brettdh modified Nov 29, 2014  91  0  1  0

    Script to search paths for importable Android NDK modules and symlink their build files to $NDK_MODULE_PATH.

    Script to search paths for importable Android NDK modules and symlink their build files to $NDK_MODULE_PATH.: setup_ndk_modules.py
    #!/usr/bin/env python
    
    import os, sys, re
    import argparse
    from itertools import combinations
    
    module_re = re.compile("LOCAL_MODULE[^a-z_]+([a-z_]+)")
    build_re = re.compile("BUILD_SHARED_LIBRARY")
    
    def getModules(android_makefile):
        cur_module = None
        modules = []
        
        with open(android_makefile) as f:
            for line in f.readlines():
                module_match = re.search(module_re, line)
                if module_match:
                    cur_module = module_match.group(1)
                    continue
    
                build_match = re.search(build_re, line)
                if build_match:
                    modules.append(cur_module)
                    
        return modules
    
    def main():
        if "NDK_MODULE_PATH" not in os.environ:
            print "Please define NDK_MODULE_PATH first."
            sys.exit(1)
    
        parser = argparse.ArgumentParser(description="Searches a directory tree for NDK modules and " +
                                         "adds symlinks to NDK_MODULE_PATH for them.")
        parser.add_argument("search_dirs", nargs="+", 
                            help="one or more directories to search for NDK modules.")
        parser.add_argument("--namespace", default="edu.umich.mobility", help="Directory where symlinks will be placed.")
    
        args = parser.parse_args()
        for dir_pair in combinations(args.search_dirs, 2):
            if dir_pair[0] in dir_pair[1] or dir_pair[1] in dir_pair[0]:
                print "Error: search dirs mustn't overlap"
                parser.error("%s and %s have a common path element" % dir_pair)
    
        module_dirs = {}
        ndk_module_path = os.environ["NDK_MODULE_PATH"].strip()
        if ":" in ndk_module_path:
            ndk_module_path = ndk_module_path.split(":")[0]
        if not os.path.exists(ndk_module_path):
            os.mkdir(ndk_module_path)
    
        namespace_path = "%s/%s" % (ndk_module_path, args.namespace)
        if not os.path.exists(namespace_path):
            os.mkdir(namespace_path)
                
        for root_dir in args.search_dirs:
            if not os.path.exists(root_dir):
                print "Skipping %s; doesn't exist" % root_dir
                continue
                
            for dirpath, dirs, files in os.walk(root_dir):
                if "Android.mk" in files:
                    mk_path = "%s/Android.mk" % dirpath
                    print "Found %s" % mk_path
                    cur_modules = getModules(mk_path)
                    for module_name in cur_modules:
                        module_dirs[module_name] = dirpath
    
        print "About to symlink modules into %s" % namespace_path
        for entry in module_dirs.items():
            module_name, module_path = entry
            print "  %-10s => %s" % (module_name, module_path)
    
        confirm = raw_input("Proceed? [y/n] ")
        if not confirm.lower().startswith("y"):
            print "Making no symlinks."
            sys.exit(1)
    
        for entry in module_dirs.items():
            module_name, module_path = entry
            link_path = "%s/%s" % (namespace_path, module_name)
            if os.path.exists(link_path):
                print "%s already exists" % link_path
            else:
                print "Symlink: %s => %s" % (link_path, module_path)
                os.symlink(module_path, link_path)
    
    if __name__ == '__main__':
        main()
    
    
    

    external by mnemonicflow modified Jan 5, 2016  824  12  3  0

    Android NDK samples https://github.com/googlesamples/android-ndk

    Android NDK samples https://github.com/googlesamples/android-ndk: android_ndk_samples.md
    # [Android NDK samples](https://github.com/googlesamples/android-ndk)
    
    1. [Hello JNI](https://github.com/googlesamples/android-ndk/tree/master/hello-jni)
    =============
    Hello JNI is an Android sample that uses JNI to call C code from a Android Java Activity.
    
    2. [Hello Third Party](https://github.com/googlesamples/android-ndk/tree/master/hello-thirdparty)
    =============
    Hello Third Party Lib is an Android C++ sample that depends on a prebuilt static library (Play Game C++ SDK).
    
    3. [Hello GL2](https://github.com/googlesamples/android-ndk/tree/master/hello-gl2)
    =============
    Hello GL2 is an Android C++ sample that draws a triangle using GLES 2.0 API.
    
    It uses JNI to do the rendering in C++ over a
    [GLSurfaceView](http://developer.android.com/reference/android/opengl/GLSurfaceView.html)
    
    4. [gles3jni](https://github.com/googlesamples/android-ndk/tree/master/gles3jni)
    =============
    gles3jni is an Android C++ sample that demonstrates how to use OpenGL ES 3.0 from JNI/native code.
    
    The OpenGL ES 3.0 rendering path uses a few new features compared to the
    OpenGL ES 2.0 path:
    - Instanced rendering and vertex attribute divisor to reduce the number of
      draw calls and uniform changes.
    - Vertex array objects to reduce the number of calls required to set up
      vertex attribute state on each frame.
    - Explicit assignment of attribute locations, eliminating the need to query
      assignments.
    
    5. [Teapot](https://github.com/googlesamples/android-ndk/tree/master/Teapot)
    =============
    Teapot is an Android C++ sample that draws a Teapot mesh using GLES 2.0 API and [NativeActivity](http://developer.android.com/reference/android/app/NativeActivity.html).
    
    6. [More Teapots](https://github.com/googlesamples/android-ndk/tree/master/MoreTeapots)
    =============
    More Teapots is an Android C++ sample that draws multiple instances of the same Teapot mesh using GLES 3.0 Instanced Rendering and [NativeActivity](http://developer.android.com/reference/android/app/NativeActivity.html).
      
    7. [San Angeles](https://github.com/googlesamples/android-ndk/tree/master/san-angeles)
    =============
    San Angeles is an Android port of a demo that uses GLES C/API to render a procedural scene.
    See the original [README](https://github.com/googlesamples/android-ndk/blob/master/san-angeles/app/src/main/jni/README.txt) for more details about the original GLES port.
    
    8. [Bitmap Plasma](https://github.com/googlesamples/android-ndk/tree/master/bitmap-plasma)
    =============
    Bitmap Plasma is an Android sample that uses JNI to render a plasma effect in an Android [Bitmap](http://developer.android.com/reference/android/graphics/Bitmap.html) from C code.
    
    9. [Native Plasma](https://github.com/googlesamples/android-ndk/tree/master/native-plasma)
    =============
    Native Plasma is an Android sample that renders a plasma effect in a Bitmap from C code using [Native Activity](http://developer.android.com/reference/android/app/NativeActivity.html).
    
    10. [Native Activity](https://github.com/googlesamples/android-ndk/tree/master/native-activity)
    =============
    Native Activity is an Android sample that initializes a GLES 2.0 context and reads accelerometer data from C code using [Native Activity](http://developer.android.com/reference/android/app/NativeActivity.html).
    
    11. [Endless Tunnel](https://github.com/googlesamples/android-ndk/tree/master/endless-tunnel)
    =============
    Endless Tunnel is a sample game that shows how to:
    - use the Android Studio C++ support
    - implement a game using Android native glue
    - implement joystick support, including robust DPAD navigation for non-touch screens
    
    It is NOT the goal of this sample to show the best way to write the game logic, load resources, etc. The game itself was intentionally kept rudimentary in order to keep the focus on the Android Studio C++ integration. For example, this game contains textures and geometry hard-coded in code, which works for small demo games like this one, but doesn't scale well to real games.
    
    12. [Native Media](https://github.com/googlesamples/android-ndk/tree/master/native-media)
    =============
    Native Media is an Android sample that uses OpenMAX AL to play a video.
    
    13. [Native Codec](https://github.com/googlesamples/android-ndk/tree/master/native-codec)
    =============
    Native Codec is an Android C++ sample that uses the Native Media Codec API to play a video.
    
    14. [Native Audio](https://github.com/googlesamples/android-ndk/tree/master/native-audio)
    =============
    Native Audio is an Android sample that plays and records sounds with the C++ OpenSLES API using JNI.
    
    15. [Audio-Echo](https://github.com/googlesamples/android-ndk/tree/master/audio-echo)
    =============
    The sample demos how to use OpenSL ES to create a player and recorder in Android Fast Audio Path, and connect them to loopback audio. On most android devices, there is a optimized audio path that is tuned up for low latency purpose. The sample creates player/recorder to work in this highly optimized audio path(sometimes called native audio path, [low latency path](http://stackoverflow.com/questions/14842803/low-latency-audio-playback-on-android?rq=1), or fast audio path). The application is validated against the following configurations:
      *   Android L    AndroidOne
      *   Android M    Nexus 5, Nexus 9
    
    16. [Sensor-Graph](https://github.com/googlesamples/android-ndk/tree/master/sensor-graph)
    =============
    Sensor graph is a C++ Android sample that read current accelerometer values and draw them using OpenGL.
    
    It demonstrate usage of the following Native C++ API:
    - [Sensors](http://developer.android.com/ndk/reference/group___sensor.html)
    - [Assets](http://developer.android.com/ndk/reference/group___asset.html)
    
    

    external by Tatsuhiro Tsujikawa modified Jan 11, 2015  171  1  2  0

    Patch for libev-4.19 to compile with Android NDK r10c

    Patch for libev-4.19 to compile with Android NDK r10c: libev-4.19-android.patch
    diff -urN libev-4.19.orig/config.sub libev-4.19/config.sub
    --- libev-4.19.orig/config.sub	2014-05-23 03:53:16.000000000 +0900
    +++ libev-4.19/config.sub	2015-01-11 16:46:06.915460125 +0900
    @@ -1,10 +1,10 @@
     #! /bin/sh
     # Configuration validation subroutine script.
     #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
    -#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
    -#   Free Software Foundation, Inc.
    +#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
    +#   2011, 2012 Free Software Foundation, Inc.
     
    -timestamp='2008-01-16'
    +timestamp='2012-04-18'
     
     # This file is (in principle) common to ALL GNU software.
     # The presence of a machine in this file suggests that SOME GNU software
    @@ -12,7 +12,7 @@
     #
     # This file is free software; you can redistribute it and/or modify
     # it under the terms of the GNU General Public License as published by
    -# the Free Software Foundation; either version 3 of the License, or
    +# the Free Software Foundation; either version 2 of the License, or
     # (at your option) any later version.
     #
     # This program is distributed in the hope that it will be useful,
    @@ -21,9 +21,7 @@
     # GNU General Public License for more details.
     #
     # You should have received a copy of the GNU General Public License
    -# along with this program; if not, write to the Free Software
    -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
    -# 02110-1301, USA.
    +# along with this program; if not, see <http://www.gnu.org/licenses/>.
     #
     # As a special exception to the GNU General Public License, if you
     # distribute this file as part of a program that contains a
    @@ -32,13 +30,16 @@
     
     
     # Please send patches to <config-patches@gnu.org>.  Submit a context
    -# diff and a properly formatted ChangeLog entry.
    +# diff and a properly formatted GNU ChangeLog entry.
     #
     # Configuration subroutine to validate and canonicalize a configuration type.
     # Supply the specified configuration type as an argument.
     # If it is invalid, we print an error message on stderr and exit with code 1.
     # Otherwise, we print the canonical config type on stdout and succeed.
     
    +# You can get the latest version of this script from:
    +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
    +
     # This file is supposed to be the same for all GNU packages
     # and recognize all the CPU types, system types and aliases
     # that are meaningful with *any* GNU software.
    @@ -72,8 +73,9 @@
     version="\
     GNU config.sub ($timestamp)
     
    -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
    -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
    +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
    +2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
    +Free Software Foundation, Inc.
     
     This is free software; see the source for copying conditions.  There is NO
     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
    @@ -120,12 +122,18 @@
     # Here we must recognize all the valid KERNEL-OS combinations.
     maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
     case $maybe_os in
    -  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
    -  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
    +  nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
    +  linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
    +  knetbsd*-gnu* | netbsd*-gnu* | \
    +  kopensolaris*-gnu* | \
       storm-chaos* | os2-emx* | rtmk-nova*)
         os=-$maybe_os
         basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
         ;;
    +  android-linux)
    +    os=-linux-android
    +    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
    +    ;;
       *)
         basic_machine=`echo $1 | sed 's/-[^-]*$//'`
         if [ $basic_machine != $1 ]
    @@ -148,10 +156,13 @@
     	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
     	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
     	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
    -	-apple | -axis | -knuth | -cray)
    +	-apple | -axis | -knuth | -cray | -microblaze)
     		os=
     		basic_machine=$1
     		;;
    +	-bluegene*)
    +		os=-cnk
    +		;;
     	-sim | -cisco | -oki | -wec | -winbond)
     		os=
     		basic_machine=$1
    @@ -166,10 +177,10 @@
     		os=-chorusos
     		basic_machine=$1
     		;;
    - 	-chorusrdb)
    - 		os=-chorusrdb
    +	-chorusrdb)
    +		os=-chorusrdb
     		basic_machine=$1
    - 		;;
    +		;;
     	-hiux*)
     		os=-hiuxwe2
     		;;
    @@ -214,6 +225,12 @@
     	-isc*)
     		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
     		;;
    +	-lynx*178)
    +		os=-lynxos178
    +		;;
    +	-lynx*5)
    +		os=-lynxos5
    +		;;
     	-lynx*)
     		os=-lynxos
     		;;
    @@ -238,24 +255,32 @@
     	# Some are omitted here because they have special meanings below.
     	1750a | 580 \
     	| a29k \
    +	| aarch64 | aarch64_be \
     	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
     	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
     	| am33_2.0 \
     	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
    +        | be32 | be64 \
     	| bfin \
     	| c4x | clipper \
     	| d10v | d30v | dlx | dsp16xx \
    +	| epiphany \
     	| fido | fr30 | frv \
     	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
    +	| hexagon \
     	| i370 | i860 | i960 | ia64 \
     	| ip2k | iq2000 \
    +	| le32 | le64 \
    +	| lm32 \
     	| m32c | m32r | m32rle | m68000 | m68k | m88k \
    -	| maxq | mb | microblaze | mcore | mep \
    +	| maxq | mb | microblaze | mcore | mep | metag \
     	| mips | mipsbe | mipseb | mipsel | mipsle \
     	| mips16 \
     	| mips64 | mips64el \
    -	| mips64vr | mips64vrel \
    +	| mips64octeon | mips64octeonel \
     	| mips64orion | mips64orionel \
    +	| mips64r5900 | mips64r5900el \
    +	| mips64vr | mips64vrel \
     	| mips64vr4100 | mips64vr4100el \
     	| mips64vr4300 | mips64vr4300el \
     	| mips64vr5000 | mips64vr5000el \
    @@ -268,29 +293,42 @@
     	| mipsisa64sr71k | mipsisa64sr71kel \
     	| mipstx39 | mipstx39el \
     	| mn10200 | mn10300 \
    +	| moxie \
     	| mt \
     	| msp430 \
    +	| nds32 | nds32le | nds32be \
     	| nios | nios2 \
     	| ns16k | ns32k \
    +	| open8 \
     	| or32 \
     	| pdp10 | pdp11 | pj | pjl \
    -	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
    +	| powerpc | powerpc64 | powerpc64le | powerpcle \
     	| pyramid \
    +	| rl78 | rx \
     	| score \
    -	| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
    +	| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
     	| sh64 | sh64le \
     	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
     	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
    -	| spu | strongarm \
    -	| tahoe | thumb | tic4x | tic80 | tron \
    -	| v850 | v850e \
    +	| spu \
    +	| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
    +	| ubicom32 \
    +	| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
     	| we32k \
    -	| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
    -	| z8k)
    +	| x86 | xc16x | xstormy16 | xtensa \
    +	| z8k | z80)
     		basic_machine=$basic_machine-unknown
     		;;
    -	m6811 | m68hc11 | m6812 | m68hc12)
    -		# Motorola 68HC11/12.
    +	c54x)
    +		basic_machine=tic54x-unknown
    +		;;
    +	c55x)
    +		basic_machine=tic55x-unknown
    +		;;
    +	c6x)
    +		basic_machine=tic6x-unknown
    +		;;
    +	m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
     		basic_machine=$basic_machine-unknown
     		os=-none
     		;;
    @@ -300,6 +338,21 @@
     		basic_machine=mt-unknown
     		;;
     
    +	strongarm | thumb | xscale)
    +		basic_machine=arm-unknown
    +		;;
    +	xgate)
    +		basic_machine=$basic_machine-unknown
    +		os=-none
    +		;;
    +	xscaleeb)
    +		basic_machine=armeb-unknown
    +		;;
    +
    +	xscaleel)
    +		basic_machine=armel-unknown
    +		;;
    +
     	# We use `pc' rather than `unknown'
     	# because (1) that's what they normally are, and
     	# (2) the word "unknown" tends to confuse beginning users.
    @@ -314,29 +367,36 @@
     	# Recognize the basic CPU types with company name.
     	580-* \
     	| a29k-* \
    +	| aarch64-* | aarch64_be-* \
     	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
     	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
     	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
     	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
     	| avr-* | avr32-* \
    +	| be32-* | be64-* \
     	| bfin-* | bs2000-* \
    -	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
    +	| c[123]* | c30-* | [cjt]90-* | c4x-* \
     	| clipper-* | craynv-* | cydra-* \
     	| d10v-* | d30v-* | dlx-* \
     	| elxsi-* \
     	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
     	| h8300-* | h8500-* \
     	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
    +	| hexagon-* \
     	| i*86-* | i860-* | i960-* | ia64-* \
     	| ip2k-* | iq2000-* \
    +	| le32-* | le64-* \
    +	| lm32-* \
     	| m32c-* | m32r-* | m32rle-* \
     	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
    -	| m88110-* | m88k-* | maxq-* | mcore-* \
    +	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
     	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
     	| mips16-* \
     	| mips64-* | mips64el-* \
    -	| mips64vr-* | mips64vrel-* \
    +	| mips64octeon-* | mips64octeonel-* \
     	| mips64orion-* | mips64orionel-* \
    +	| mips64r5900-* | mips64r5900el-* \
    +	| mips64vr-* | mips64vrel-* \
     	| mips64vr4100-* | mips64vr4100el-* \
     	| mips64vr4300-* | mips64vr4300el-* \
     	| mips64vr5000-* | mips64vr5000el-* \
    @@ -351,27 +411,32 @@
     	| mmix-* \
     	| mt-* \
     	| msp430-* \
    +	| nds32-* | nds32le-* | nds32be-* \
     	| nios-* | nios2-* \
     	| none-* | np1-* | ns16k-* | ns32k-* \
    +	| open8-* \
     	| orion-* \
     	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
    -	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
    +	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
     	| pyramid-* \
    -	| romp-* | rs6000-* \
    -	| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
    +	| rl78-* | romp-* | rs6000-* | rx-* \
    +	| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
     	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
     	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
     	| sparclite-* \
    -	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
    -	| tahoe-* | thumb-* \
    +	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
    +	| tahoe-* \
     	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
    +	| tile*-* \
     	| tron-* \
    -	| v850-* | v850e-* | vax-* \
    +	| ubicom32-* \
    +	| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
    +	| vax-* \
     	| we32k-* \
    -	| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
    +	| x86-* | x86_64-* | xc16x-* | xps100-* \
     	| xstormy16-* | xtensa*-* \
     	| ymp-* \
    -	| z8k-*)
    +	| z8k-* | z80-*)
     		;;
     	# Recognize the basic CPU types without company name, with glob match.
     	xtensa*)
    @@ -393,7 +458,7 @@
     		basic_machine=a29k-amd
     		os=-udi
     		;;
    -    	abacus)
    +	abacus)
     		basic_machine=abacus-unknown
     		;;
     	adobe68k)
    @@ -439,6 +504,10 @@
     		basic_machine=m68k-apollo
     		os=-bsd
     		;;
    +	aros)
    +		basic_machine=i386-pc
    +		os=-aros
    +		;;
     	aux)
     		basic_machine=m68k-apple
     		os=-aux
    @@ -455,10 +524,27 @@
     		basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
     		os=-linux
     		;;
    +	bluegene*)
    +		basic_machine=powerpc-ibm
    +		os=-cnk
    +		;;
    +	c54x-*)
    +		basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
    +		;;
    +	c55x-*)
    +		basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
    +		;;
    +	c6x-*)
    +		basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
    +		;;
     	c90)
     		basic_machine=c90-cray
     		os=-unicos
     		;;
    +	cegcc)
    +		basic_machine=arm-unknown
    +		os=-cegcc
    +		;;
     	convex-c1)
     		basic_machine=c1-convex
     		os=-bsd
    @@ -487,7 +573,7 @@
     		basic_machine=craynv-cray
     		os=-unicosmp
     		;;
    -	cr16)
    +	cr16 | cr16-*)
     		basic_machine=cr16-unknown
     		os=-elf
     		;;
    @@ -526,6 +612,10 @@
     		basic_machine=m88k-motorola
     		os=-sysv3
     		;;
    +	dicos)
    +		basic_machine=i686-pc
    +		os=-dicos
    +		;;
     	djgpp)
     		basic_machine=i586-pc
     		os=-msdosdjgpp
    @@ -641,7 +731,6 @@
     	i370-ibm* | ibm*)
     		basic_machine=i370-ibm
     		;;
    -# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
     	i*86v32)
     		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
     		os=-sysv32
    @@ -699,6 +788,9 @@
     		basic_machine=ns32k-utek
     		os=-sysv
     		;;
    +	microblaze)
    +		basic_machine=microblaze-xilinx
    +		;;
     	mingw32)
     		basic_machine=i386-pc
     		os=-mingw32
    @@ -735,10 +827,18 @@
     	ms1-*)
     		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
     		;;
    +	msys)
    +		basic_machine=i386-pc
    +		os=-msys
    +		;;
     	mvs)
     		basic_machine=i370-ibm
     		os=-mvs
     		;;
    +	nacl)
    +		basic_machine=le32-unknown
    +		os=-nacl
    +		;;
     	ncr3000)
     		basic_machine=i486-ncr
     		os=-sysv4
    @@ -803,6 +903,12 @@
     	np1)
     		basic_machine=np1-gould
     		;;
    +	neo-tandem)
    +		basic_machine=neo-tandem
    +		;;
    +	nse-tandem)
    +		basic_machine=nse-tandem
    +		;;
     	nsr-tandem)
     		basic_machine=nsr-tandem
     		;;
    @@ -885,9 +991,10 @@
     		;;
     	power)	basic_machine=power-ibm
     		;;
    -	ppc)	basic_machine=powerpc-unknown
    +	ppc | ppcbe)	basic_machine=powerpc-unknown
     		;;
    -	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
    +	ppc-* | ppcbe-*)
    +		basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
     		;;
     	ppcle | powerpclittle | ppc-le | powerpc-little)
     		basic_machine=powerpcle-unknown
    @@ -981,6 +1088,9 @@
     		basic_machine=i860-stratus
     		os=-sysv4
     		;;
    +	strongarm-* | thumb-*)
    +		basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
    +		;;
     	sun2)
     		basic_machine=m68000-sun
     		;;
    @@ -1037,20 +1147,8 @@
     		basic_machine=t90-cray
     		os=-unicos
     		;;
    -	tic54x | c54x*)
    -		basic_machine=tic54x-unknown
    -		os=-coff
    -		;;
    -	tic55x | c55x*)
    -		basic_machine=tic55x-unknown
    -		os=-coff
    -		;;
    -	tic6x | c6x*)
    -		basic_machine=tic6x-unknown
    -		os=-coff
    -		;;
     	tile*)
    -		basic_machine=tile-unknown
    +		basic_machine=$basic_machine-unknown
     		os=-linux-gnu
     		;;
     	tx39)
    @@ -1120,6 +1218,9 @@
     	xps | xps100)
     		basic_machine=xps100-honeywell
     		;;
    +	xscale-* | xscalee[bl]-*)
    +		basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
    +		;;
     	ymp)
     		basic_machine=ymp-cray
     		os=-unicos
    @@ -1128,6 +1229,10 @@
     		basic_machine=z8k-unknown
     		os=-sim
     		;;
    +	z80-*-coff)
    +		basic_machine=z80-unknown
    +		os=-sim
    +		;;
     	none)
     		basic_machine=none-none
     		os=-none
    @@ -1166,7 +1271,7 @@
     	we32k)
     		basic_machine=we32k-att
     		;;
    -	sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
    +	sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
     		basic_machine=sh-unknown
     		;;
     	sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
    @@ -1213,9 +1318,12 @@
     if [ x"$os" != x"" ]
     then
     case $os in
    -        # First match some system type aliases
    -        # that might get confused with valid system types.
    +	# First match some system type aliases
    +	# that might get confused with valid system types.
     	# -solaris* is a basic system type, with this one exception.
    +	-auroraux)
    +		os=-auroraux
    +		;;
     	-solaris1 | -solaris1.*)
     		os=`echo $os | sed -e 's|solaris1|sunos4|'`
     		;;
    @@ -1236,10 +1344,11 @@
     	# Each alternative MUST END IN A *, to match a version number.
     	# -sysv* is not here because it comes later, after sysvr4.
     	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
    -	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
    -	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
    +	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
    +	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
    +	      | -sym* | -kopensolaris* \
     	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
    -	      | -aos* \
    +	      | -aos* | -aros* \
     	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
     	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
     	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
    @@ -1248,9 +1357,10 @@
     	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
     	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
     	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
    -	      | -chorusos* | -chorusrdb* \
    -	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
    -	      | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
    +	      | -chorusos* | -chorusrdb* | -cegcc* \
    +	      | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
    +	      | -mingw32* | -linux-gnu* | -linux-android* \
    +	      | -linux-newlib* | -linux-uclibc* \
     	      | -uxpv* | -beos* | -mpeix* | -udk* \
     	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
     	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
    @@ -1258,7 +1368,7 @@
     	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
     	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
     	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
    -	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
    +	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
     	# Remember, each alternative MUST END IN *, to match a version number.
     		;;
     	-qnx*)
    @@ -1297,7 +1407,7 @@
     	-opened*)
     		os=-openedition
     		;;
    -        -os400*)
    +	-os400*)
     		os=-os400
     		;;
     	-wince*)
    @@ -1346,7 +1456,7 @@
     	-sinix*)
     		os=-sysv4
     		;;
    -        -tpf*)
    +	-tpf*)
     		os=-tpf
     		;;
     	-triton*)
    @@ -1388,6 +1498,11 @@
     	-zvmoe)
     		os=-zvmoe
     		;;
    +	-dicos*)
    +		os=-dicos
    +		;;
    +	-nacl*)
    +		;;
     	-none)
     		;;
     	*)
    @@ -1410,10 +1525,10 @@
     # system, and we'll never get to this point.
     
     case $basic_machine in
    -        score-*)
    +	score-*)
     		os=-elf
     		;;
    -        spu-*)
    +	spu-*)
     		os=-elf
     		;;
     	*-acorn)
    @@ -1425,8 +1540,20 @@
     	arm*-semi)
     		os=-aout
     		;;
    -        c4x-* | tic4x-*)
    -        	os=-coff
    +	c4x-* | tic4x-*)
    +		os=-coff
    +		;;
    +	hexagon-*)
    +		os=-elf
    +		;;
    +	tic54x-*)
    +		os=-coff
    +		;;
    +	tic55x-*)
    +		os=-coff
    +		;;
    +	tic6x-*)
    +		os=-coff
     		;;
     	# This must come before the *-dec entry.
     	pdp10-*)
    @@ -1446,14 +1573,11 @@
     		;;
     	m68000-sun)
     		os=-sunos3
    -		# This also exists in the configure program, but was not the
    -		# default.
    -		# os=-sunos4
     		;;
     	m68*-cisco)
     		os=-aout
     		;;
    -        mep-*)
    +	mep-*)
     		os=-elf
     		;;
     	mips*-cisco)
    @@ -1480,7 +1604,7 @@
     	*-ibm)
     		os=-aix
     		;;
    -    	*-knuth)
    +	*-knuth)
     		os=-mmixware
     		;;
     	*-wec)
    @@ -1585,7 +1709,7 @@
     			-sunos*)
     				vendor=sun
     				;;
    -			-aix*)
    +			-cnk*|-aix*)
     				vendor=ibm
     				;;
     			-beos*)
    diff -urN libev-4.19.orig/ev_select.c libev-4.19/ev_select.c
    --- libev-4.19.orig/ev_select.c	2014-05-23 03:53:16.000000000 +0900
    +++ libev-4.19/ev_select.c	2015-01-11 16:45:26.299948353 +0900
    @@ -46,6 +46,10 @@
     # endif
     #endif
     
    +#if defined(__ANDROID__) || defined(ANDROID)
    +typedef int fd_mask;
    +#endif
    +
     #ifndef EV_SELECT_USE_FD_SET
     # ifdef NFDBITS
     #  define EV_SELECT_USE_FD_SET 0
    
    
    

    external by kenmasumitsu modified Jul 17, 2015  160  0  2  0

    NDK log utils

    NDK log utils: gistfile1.txt
    #define TAG "TAG"
    #define LOG_VERBOSE(...) __android_log_print(ANDROID_LOG_VERBOSE, TAG, __VA_ARGS__)
    #define LOG_DEBUG(...)   __android_log_print(ANDROID_LOG_DEBUG, TAG, __VA_ARGS__)
    #define LOG_INFO(...)    __android_log_print(ANDROID_LOG_INFO, TAG, __VA_ARGS__)
    #define LOG_WARN(...)    __android_log_print(ANDROID_LOG_WARN, TAG, __VA_ARGS__)
    #define LOG_ERROR(...)   __android_log_print(ANDROID_LOG_ERROR, TAG, __VA_ARGS__)
    #define LOG_FATAL(...)   __android_log_print(ANDROID_LOG_FATAL, TAG, __VA_ARGS__)
    
    

    external by Github modified Mar 4, 2015  148  0  2  0

    NDK location

    NDK location: .ant.properties
    #
    # The Android NDK home directory:
    #
    ndk.home=C\:\\ndk
    
    
    #
    # The list of native AAC decoders.
    # Allowed decoders are: faad2, ffmpeg, opencore-aacdec.
    #
    # NOTE: if you change this property then it is recommended to clean the project
    #       (ant mrproper)
    #
    # Examples:
    #   aac.decoders=opencore-aacdec
    #   aac.decoders=faad2 ffmpeg opencore-aacdec
    #
    aac.decoders=faad2 ffmpeg opencore-aacdec
    
    
    #
    # Enable 4-th decoder - MMS/ASF/WMA
    #   mms=yes
    #
    mms=yes
    
    
    #
    # The debug level of the JNI/C code.
    # Allowed values are: trace, debug, info, warn, error
    #
    jni.loglevel=info
    
    
    #
    # Options passed to the Makefile, e.g:
    #   -d               = debug all
    #   --debug=v        = set debug level (a, b, v, i, j, m)
    #   -qp              = print the database of rules (nothing remade)
    #
    # Or targets:
    #   dump             = dumps all targets
    #
    make.options=
    
    
    

    external by sxyx2008 modified Sep 9, 2014  80  1  1  0

    ndk r9d url

    ndk r9d url: ndk.md
    # NDK r9d url
    
    * linux: [http://dl.google.com/android/ndk/android-ndk-r9-linux-x86.tar.bz2](http://dl.google.com/android/ndk/android-ndk-r9-linux-x86.tar.bz2)
    * windows: [http://dl.google.com/android/ndk/android-ndk-r9d-windows-x86_64.zip](http://dl.google.com/android/ndk/android-ndk-r9d-windows-x86_64.zip)
    * mac os x: [https://dl.google.com/android/ndk/android-ndk-r9d-darwin-x86_64.tar.bz2](https://dl.google.com/android/ndk/android-ndk-r9d-darwin-x86_64.tar.bz2)
    
    

    external by Jan Holman modified Dec 15, 2015  80  0  1  0

    Duplicity v MZK a NDK fedorách

    Duplicity v MZK a NDK fedorách: Kořeny (s počtem objektů)
    1036 null
    7444 uuid:c3318d70-6f69-11e2-b9fa-005056827e52 Čin
    1037 uuid:ec78e650-298d-11e2-9f39-005056827e51 Brno v minulosti a dnes: sborník příspěvků k dějinám a výstavbě Brna
       1 uuid:4eac74b0-e92c-11dc-9fa1-000d606f5dc6 Rudé právo (jen 1? wtf?)
     101 uuid:4e0bb760-7ce2-11e2-b930-005056827e51 Nauka o pěstování révy vinné
      81 uuid:724767d0-9864-11e2-9a9f-005056827e51 Pěstování révy vinné v domácích zahrádkách
      29 uuid:7429cb92-9cb3-11e0-8637-0050569d679d Atlas d'Afrique En 20. Carter
    5805 uuid:8376d290-87e1-11e2-b238-005056827e52 Slovo národa
     630 uuid:98e18620-c828-11e2-b6da-005056827e52 Kniha pro každého rolníka a hospodáře: sbírka vědomostí hospodářských rolníku našemu předůležitých a nevyhnutelně potřebných
     257 uuid:992aeaa0-1cd3-11e2-bec6-005056827e51 Chotěšov a jeho dominanta (btw to nemá obrázky)
    
    
    

    external by Xavier Hallade modified Mar 16, 2015  68  0  1  0

    build gradle with ndk build tasks that are using an alternative Application.mk (Application-debug.mk) for debug builds.

    build gradle with ndk build tasks that are using an alternative Application.mk (Application-debug.mk) for debug builds.: build.gradle
    import org.apache.tools.ant.taskdefs.condition.Os
    
    apply plugin: 'com.android.library'
    
    android {
        compileSdkVersion rootProject.ext.compileSdkVersion
        buildToolsVersion rootProject.ext.buildToolsVersion
    
        defaultConfig {
            minSdkVersion 15
            targetSdkVersion 22
        }
    
        sourceSets.main {
            jniLibs.srcDir 'src/main/libs'
            jni.srcDirs = [] //disable automatic ndk-build call
        }
    
        android.libraryVariants.all { variant ->  // executes this block for each variant, current and futures
            def task = tasks.create(name: "ndk${variant.buildType.name.capitalize()}Build") { //create ndkReleaseBuild and ndkDebugBuild tasks
                doLast {
                    exec { //execute all this block when the task is executed. (A Build task gets only the commandLine to be executed, so here we're using doLast.exec instead)
                        def extraParameter = ""
                        def rebuildFlag = ""
    
                        if (variant.buildType.name == "debug")
                            extraParameter = "NDK_APPLICATION_MK=" + file('src/main/jni/Application-debug.mk').absolutePath //reference to another Application.mk to use when doing a debug build.
    
                        def lastBuildFile = file('src/main/jni/.lastbuild.tmp') //save the last build type to a temp file, to avoid triggering rebuilds all the time.
                        if (!lastBuildFile.exists())
                            lastBuildFile.createNewFile()
    
                        def lastBuildType = lastBuildFile.text
                        if (lastBuildType != variant.buildType.name) {
                            println "== ndk build variant has changed, triggering full rebuild. =="
                            rebuildFlag = "-B"
                        }
    
                        if (Os.isFamily(Os.FAMILY_WINDOWS)) {
                            commandLine 'ndk-build.cmd', rebuildFlag, '-C', file('src/main').absolutePath, extraParameter
                        } else {
                            commandLine 'ndk-build', rebuildFlag, '-C', file('src/main').absolutePath, extraParameter
                        }
    
                        lastBuildFile.write(variant.buildType.name)
                    }
                }
            }
            variant.javaCompile.dependsOn task
        }
    }
    
    dependencies {
        compile fileTree(dir: 'libs', include: ['*.jar'])
        compile 'com.android.support:support-annotations:22.0.0'
    }
    
    

    external by Intern modified Feb 25, 2015  68  0  1  0

    Install Android SDK & NDK on Ubuntu

    Install Android SDK & NDK on Ubuntu: install_android_dev.sh
    #!/bin/bash
    
    # Check machine type (32 or 64-bit) & install JDK
    MACHINE_TYPE=`uname -a`
    sudo apt-get install openjdk-7-jdk
    
    # Prepare /opt/Google directory 
    sudo chmod ao+rw /opt
    sudo chown :adm /opt
    mkdir /opt/Google/
    
    # Download Android NDK
    if [[ $MACHINE_TYPE == *"x86_64"* ]]
    then
    wget http://dl.google.com/android/ndk/android-ndk-r10d-linux-x86_64.bin
    else
    wget http://dl.google.com/android/ndk/android-ndk-r10d-linux-x86.bin
    fi
    
    # Install Android NDK
    chmod +x android-ndk*.bin
    ./android-ndk*.bin
    rm -rf eclipse-java*
    mkdir /opt/Google/android-ndks
    rm android-ndk-*.bin
    mv android-ndk-* /opt/Google/android-ndks/
    
    # Download Eclipse
    if [[ $MACHINE_TYPE == *"x86_64"* ]]
    then
    wget http://ftp.snt.utwente.nl/pub/software/eclipse/technology/epp/downloads/release/luna/SR1a/eclipse-java-luna-SR1a-linux-gtk-x86_64.tar.gz
    else
    wget http://ftp.snt.utwente.nl/pub/software/eclipse/technology/epp/downloads/release/luna/SR1a/eclipse-java-luna-SR1a-linux-gtk.tar.gz
    fi
    
    # Install Eclipse
    rm -rf /opt/eclipse
    tar -zxvf eclipse-java-luna-SR1a-linux-gtk*.tar.gz -C /opt/
    rm -rf eclipse-java*
    
    # Install Android SDK and configure SDK & NDK
    echo Add ADT Plugin software site at https://dl-ssl.google.com/android/eclipse/
    echo Select Android Development Tools
    echo Select Android Native Development Tools
    echo When prompted by Android Development (Welcome to Android Development window)
    echo - include Android 2.2 in installation
    echo - at the same time point target directory to /opt/Google/android-sdks/
    echo Add Android API 8 & 10
    echo Point Window -> Preferences -> Android -> NDK -> NDK Location to the right path
    echo Press ENTER to launch Eclipse
    read
    /opt/eclipse/eclipse &
    echo Press ENTER when finished
    read
    
    
    
    • Public Snippets
    • Channels Snippets