Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bilibili/jni4android
JNI Generater for Android
https://github.com/bilibili/jni4android
android bison c code-generator cpp flex java jni ndk yacc yylex
Last synced: 7 days ago
JSON representation
JNI Generater for Android
- Host: GitHub
- URL: https://github.com/bilibili/jni4android
- Owner: bilibili
- Created: 2016-01-08T10:53:58.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2018-09-29T09:38:21.000Z (over 6 years ago)
- Last Synced: 2025-01-08T12:06:25.997Z (14 days ago)
- Topics: android, bison, c, code-generator, cpp, flex, java, jni, ndk, yacc, yylex
- Language: C
- Homepage:
- Size: 221 KB
- Stars: 310
- Watchers: 31
- Forks: 86
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: COPYING.LGPLv2.1
Awesome Lists containing this project
README
# jni4android
[![Build Status](https://travis-ci.org/Bilibili/jni4android.svg?branch=master)](https://travis-ci.org/Bilibili/jni4android)
Generate C wrapper from Pseudo-Java
### My Build Environment
- Common
- Mac OS X 10.10.5
- Xcode 7.2 (7C68)
- flex 2.5.35 Apple(flex-31)
- bison (GNU Bison) 3.0.4
- [HomeBrew](http://brew.sh)
- ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- brew install git
- brew install flex
- brew install bison### Build
```
git clone https://github.com/Bilibili/jni4android.git jni4android
cd jni4android# build dependencies
# you don't have to run this if you have bison 3.x installed
./get-deps.sh./configure
make
```### Usage
```
Usage:
j4a -h
j4a -c [-o ]Startup:
-c, --compile compile file.
-h, --help print this help.
-o, --output output file.
```### Example
- input https://github.com/Bilibili/jni4android/blob/master/test/i_java/android/media/AudioTrack.java
- output https://github.com/Bilibili/jni4android/blob/master/test/ref_c/android/media/AudioTrack.h
- output https://github.com/Bilibili/jni4android/blob/master/test/ref_c/android/media/AudioTrack.c