Commit Graph

42 Commits

Author SHA1 Message Date
David 'Digit' Turner
cc230ba07c Ensure the version of 'awk' detected by host-setup.sh is used during the build 2009-10-01 21:27:19 -07:00
David 'Digit' Turner
a78a775332 Remove bash-specific operator from build/host-setup.sh. 2009-10-01 16:38:44 -07:00
David 'Digit' Turner
1dbeeca5c4 Fix NDK usage of libgcc.a when building shared libraries
The main idea is that libgcc.a should appear after object files and
static libraries but before depending shared libraries. This willl
force the linker to copy the libgcc.a functions required by the
generated library into the target binary, instead of relying on
what's available in libc.so and others.

This ensures maximum portability, and prevent problems in the future
when we change the toolchain, which translates to different libgcc.a
functions embedded in libc.so and other exposed native libraries.

However, this will make also generated shared libraries bigger, because
the compiler insists on generating code that depends on a bunch of C++
support functions (even when building from C sources). An increase of
about 8KB per shared library is expected.
2009-09-28 10:41:32 -07:00
David 'Digit' Turner
902706ad0d Bump release version to android-1.6_r1 2009-08-14 20:51:58 +02:00
David 'Digit' Turner
eee1675aa4 Look for Android.mk in $(APP_PROJECT_PATH)/jni by default.
This gets rid of the 'sources' directory and allows all sources
of a given Android application to be in the same directory tree
without using a symlink trick.

Note that apps/<name>/Application.mk is still required though.
A later release of the NDK will get rid of it too, but the change
is too drastic for the upcoming release.

The change moves various source files from sources into their
app/<name>/project/jni directory as well.

The whole documentation is updated to reflect the change.
2009-07-29 19:04:44 +02:00
David 'Digit' Turner
197a8fea8e Add sample "san-angeles" program to demo OpenGL ES from native code.
Note that the app will only build against an android-4 SDK.
(Interestingly, the resulting binary runs very well under android-3).

This also adds missing license headers to the 'two-libs' sample.
2009-07-29 19:02:21 +02:00
David 'Digit' Turner
d7e5aaecd8 Add OpenGL ES headers to the android-4 platform/stable APIs. 2009-07-29 02:26:47 +02:00
David 'Digit' Turner
5c767bb977 Add android-4 sysroot and use project's default.properties to get the right target.
Note that for now, android-4 contains the same things than android-3.
Another patch will add OpenGL ES headers and libraries to it.
2009-07-29 02:26:31 +02:00
David 'Digit' Turner
747294cc4a Fix LOCAL_CFLAGS/CPPFLAGS handling to match full Android build system.
Also improve BUILD_SYSTEM directory detection logic in build/core/main.mk
2009-07-27 12:24:58 +02:00
David 'Digit' Turner
fdc5ea243d Rename ndk/build/platforms/android-1.5 into android-3 to match API levels 2009-07-24 17:56:51 +02:00
David 'Digit' Turner
1715a1f877 Handle LOCAL_CPPFLAGS/CFLAGS/CXXFLAGS as claimed by the documentation.
The previous code did only use LOCAL_CFLAGS for both C and C++ sources.
2009-07-24 17:42:21 +02:00
David 'Digit' Turner
7ec528c5b0 Ensure LOCAL_LDLIBS is cleared by the $(CLEAR_VARS) script 2009-07-22 13:34:54 +02:00
David 'Digit' Turner
7f0688dd93 Fix compilation of assembly files (e.g. foo.S), by removing a typo. 2009-07-20 15:38:48 +02:00
David 'Digit' Turner
6c01aba293 Add support for LOCAL_C_INCLUDES in Android.mk, to better match the Android build system. 2009-06-29 16:48:56 +02:00
David 'Digit' Turner
67d8edd65f Add support for LOCAL_ARM_MODE and .arm source file name suffix.
Also update docs/INSTALL.TXT to explain that MSys is not supported under Windows.
2009-06-29 16:44:31 +02:00
David 'Digit' Turner
a046aadf89 Fix several typos in the NDK build system that caused quite a few bugs:
- generate thumb code by default (type forced ARM generation)

- make the generation of unoptimized binaries with APP_OPTIM := debug actually work
  (the -O0 -g flags were placed before the -Os -mthumb flags for thumb binaries)

- factor common code from build-executable/shared-library/static-library into build-binary.mk
  and install-binary.mk

- properly add a -L$(SYSROOT)/usr/lib line to make LOCAL_LDLIBS := -lz work as advertized
  (in build-binary.mk)

- add a few missing variables from clear-vars.mk
2009-06-29 16:33:30 +02:00
David 'Digit' Turner
d6ec1729a1 Fix build/host-setup.sh to run as a Bourne shell script and add better host detection:
- add --help, --verbose options
- check for GNU Make availability and version by default, override with --no-make-check
- better traces
2009-06-29 16:13:25 +02:00
David 'Digit' Turner
fadee81099 Fix build/host-setup.sh in various ways
- run as bash script (since Debian's new 'dash' shell doesn't support it)
- remove obsolete host GCC requirement
- improve Windows support by using better heuristics for the executable suffix
- better NDK root directory auto-detection (avoids the need to define ANDROID_NDK_ROOT on some installs)
2009-06-29 12:28:04 +02:00
Android (Google) Code Review
66620a8d42 Merge change 2831 into donut
* changes:
  Fix ChangeLog, since we're rebuilding 1.5_r1, no need to list previous changes.
2009-06-01 14:04:13 -07:00
David 'Digit' Turner
3e035afa63 Add docs/SYSTEM-ISSUES.TXT to list important system issues that NDK developers should be aware of 2009-06-01 22:27:18 +02:00
David 'Digit' Turner
58bbcd6d17 Fix ChangeLog, since we're rebuilding 1.5_r1, no need to list previous changes. 2009-06-01 22:25:30 +02:00
David 'Digit' Turner
82ae6d6700 Add docs/HOWTO.TXT to list a few important tips for NDK users
Also remove reference to docs/ROADMAP.TXT from README.TXT (doh)
2009-06-01 21:38:27 +02:00
Android (Google) Code Review
e19766ea0a Merge change 2813 into donut
* changes:
  Remove the jni-tips.html document. It contains too many swear words :-)
2009-06-01 12:18:21 -07:00
David 'Digit' Turner
a9e8d43e53 Add docs/STABLE-APIS.TXT which contains the list of exposed frozen APIs in the NDK.
Also update README.TXT and docs/ANDROID-MK.TXT accordingly, to document the use of
LOCAL_LDLIBS.
2009-06-01 20:38:19 +02:00
David 'Digit' Turner
c6f15d35f3 Remove the jni-tips.html document. It contains too many swear words :-) 2009-06-01 19:10:40 +02:00
David 'Digit' Turner
d21c809912 Expose <android/log.h> which contains the declaration of /system/lib/liblog.so.
This allows native application code to send logs to the kernel. Alas !

NOTE: This *is* valid for Cupcake
2009-05-29 21:54:19 +02:00
David 'Digit' Turner
5ad95c577a Force the use of 32-bit toolchain binaries on 64-bit systems.
This is used to reduce the number of distributable prebuilt packages
(i.e. linux-x86_64 is not needed anymore).

Also fix build/tools/build-toolchain.sh to properly copy the GPL and LGPL
license files into the generated prebuilt packages.

Also add a .gitignore files to get less spew from 'git status'
2009-05-27 16:04:25 +02:00
David 'Digit' Turner
979c98c96c Add simple change log to the NDK documentation. 2009-05-20 16:12:05 +02:00
Android (Google) Code Review
9b3f3f27fe Merge change 1954 into donut
* changes:
  Add a bunch of documentation for the Android C library and the JNI interface to the NDK
2009-05-20 02:45:40 -07:00
David 'Digit' Turner
3caffcfaf8 Force --no-undefined at link time to generate an error when trying to generate a shared library that references undefined symbols.
This can be overriden by defining LOCAL_ALLOW_UNDEFINED_SYMBOLS in your Android.mk to 'true'
2009-05-19 14:58:45 +02:00
David 'Digit' Turner
d8c9a43284 Add a bunch of documentation for the Android C library and the JNI interface to the NDK 2009-05-19 13:09:20 +02:00
Android (Google) Code Review
3be3c99657 Merge change 1360 into donut
* changes:
  remove documentation for unsupported variable (LOCAL_STATIC_WHOLE_LIBRARIES)
2009-05-11 11:33:21 -07:00
Android (Google) Code Review
37fa8d40fc Merge change 1359 into donut
* changes:
  Remove references to 'cupcake' in all of NDK (replace with 'android-1.5')
2009-05-11 11:32:53 -07:00
David 'Digit' Turner
b25cd5fb97 remove documentation for unsupported variable (LOCAL_STATIC_WHOLE_LIBRARIES) 2009-05-11 17:23:10 +02:00
David 'Digit' Turner
b20725d4a0 Remove references to 'cupcake' in all of NDK (replace with 'android-1.5') 2009-05-11 16:37:42 +02:00
David 'Digit' Turner
a07dedea97 Add docs/LICENSES.TXT which indicates where to find the toolchain sources, as well as the GPL/LGPL text files.
Note: the prebuilt binary packages used by "make-release.sh" have
been updated to include the COPYING and COPYING.LIB files.

After this patch is commited, you should be able to run "make-release.sh"
to re-generate release packages that contain docs/LICENSES.TXT as well as COPYING and COPYING.LIB
2009-05-10 01:05:25 +02:00
Xavier Ducrohet
3d25a3b264 More Clean up in the NDK Overview doc 2009-05-08 17:47:46 -07:00
Xavier Ducrohet
ba1aad8339 Remove unwanted comments in the NDK Overview doc. 2009-05-08 17:36:51 -07:00
Xavier Ducrohet
5b6da2b185 Remove the ROADMAP NDK file as it shouldn't be packaged with the NDK 2009-05-08 17:21:58 -07:00
Xavier Ducrohet
0085f310cd Update the NDK docs to reflect the changes from 2 download (NDK+toolchain) to a single download. 2009-05-07 18:29:25 -07:00
Xavier Ducrohet
dc4ba99cd7 Fix minor typos in the NDK docs. 2009-05-07 15:45:41 -07:00
David 'Digit' Turner
b9a8479e48 Initial import of new NDK into donut tree 2009-05-07 20:39:04 +02:00