This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// from https://stackoverflow.com/questions/10798357/want-to-compile-native-android-binary-i-can-run-in-terminal-on-the-phone | |
/* | |
# create tool-chain - one line | |
# New method in ndk 12. | |
$NDK/build/tools/make_standalone_toolchain.py --arch arm --install-dir=/tmp/my-android-toolchain | |
# Old method. | |
#$NDK/build/tools/make-standalone-toolchain.sh --platform=android-3 --install-dir=/tmp/my-android-toolchain | |
# add to terminal PATH variable | |
export PATH=/tmp/my-android-toolchain/bin:$PATH |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// how to do make a string out of multiple lines | |
// using the preprocessor | |
#include <stdio.h> | |
#define STRINGIFY(...) #__VA_ARGS__ | |
int | |
main(void) | |
{ |