Game Development Reference
In-Depth Information
There's more...
Here are some tips for writing makeiles:
1. When a line, with a list of object iles becomes too long, it can be split using the
backslash symbol like the following:
ObjectFileList = File1.o \
... \
FileN.o
There should be no space after the backslash. It is a limitation of the
make tool.
2.
Sometimes, comments are required. This can be done by writing a line, which starts
with a sharp character:
# This line is a comment
If the header iles for the library do not reside in the same directory as the source iles, we
have to add those directories to the CFLAGS list.
Compiling the native static libraries for
Android
Android NDK includes a number of GCC and Clang toolchains for each kind of the
supported processors.
Getting ready
When building a static library from the source code, we follow the steps similar to the
Windows version.
How to do it...
1.
Create a folder named jni and create the Application.mk ile with the
appropriate compiler switches, and set the name of the library accordingly.
For example, one for the FreeImage library should look like the following:
APP_OPTIM := release
APP_PLATFORM := android-8
APP_STL := gnustl_static
APP_CPPFLAGS += -frtti
APP_CPPFLAGS += -fexceptions
APP_CPPFLAGS += -DANDROID
 
Search WWH ::




Custom Search