Giter Site home page Giter Site logo

droid-wrapper's Introduction

Abstract

You need specify many options to compile native program for Android.

Also, it is very hard to port software which uses the autotools (autoconf, automake, libtool etc) because different options are needed for linking shared library and program binary.

To solve these problems, I developed this wrapper script for gcc and ld. With this wrapper, all needed options are automatically specified.

Install

$ sudo make install

droid-gcc, droid-g++, and droid-ld commands will be installed.

How to use

Specify following environment variables:

  • DROID_ROOT : Android source tree directory
  • DROID_TARGET : Compile target (generic, dream-open etc)
  • DROID_HOST : Specify build host. Use "windows" for Windows, "darwin-x86" for Mac OS X. Nothing needed for Linux.
  • DROID_WRAPPER_DEBUG : Set this for debug the script.

Then use droid-gcc, droid-ld.

Ex)
$ droid-gcc -O2 -c foo.c
$ droid-ld -o foo foo.o

To compile the software with configure:

$ CC=droid-gcc LD=droid-ld ./configure --host=arm-none-linux-gnueabi

Difference with agcc

This wrapper is similar to http://plausible.org/andy/agcc, but different in following points:

  • With this script, all command line arguments will be passed to the compiler and linker. This is important if the software uses configure.
  • This script supports g++ and ld, not only gcc.

Takuya Murakami

droid-wrapper's People

Contributors

tmurakam avatar clashthebunny avatar jevinskie avatar

Stargazers

Angus H. avatar Boris Köster avatar Eric Gallager avatar David Leon Gil avatar  avatar Frank Denis avatar

Watchers

 avatar Alexander Heim avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.