Game Development Reference
In-Depth Information
COMMON_CFLAGS :=-DANDROID -DGLQUAKE -DLIBQUAKE2 -Dstricmp=strcasecmp
LOCAL_CFLAGS := $(COMMON_CFLAGS) -DREF_HARD_LINKED -DGAME_HARD_LINKED
LOCAL_C_INCLUDES := $(COMMON_C_INCLUDES) ../ch06.Quake/jni/Quake/NanoGL
LOCAL_LDLIBS := -llog -ldl
LOCAL_STATIC_LIBRARIES := libNanoGL
# Q2 client
QUAKE2_OBJS := \
$(BUILDDIR)/client/cl_cin.c \
$(BUILDDIR)/client/cl_ents.c \
$(BUILDDIR)/client/cl_fx.c \
$(BUILDDIR)/client/cl_input.c \
$(BUILDDIR)/android/vid_so.c \
....
$(BUILDDIR)/android/sys_linux.c \
# Game
CGAME_SRC := \
$(BUILDDIR)/game/q_shared.c \
$(BUILDDIR)/game/g_ai.c \
$(BUILDDIR)/game/p_client.c \
...
$(BUILDDIR)/game/p_trail.c \
$(BUILDDIR)/game/p_view.c \
$(BUILDDIR)/game/p_weapon.c \
# OpenGL renderer
REF_FILES := \
$(BUILDDIR)/ref_gl/gl_draw.c \
$(BUILDDIR)/ref_gl/gl_image.c \
$(BUILDDIR)/ref_gl/gl_light.c \
$(BUILDDIR)/ref_gl/gl_mesh.c \
$(BUILDDIR)/ref_gl/gl_model.c \
$(BUILDDIR)/ref_gl/gl_rmain.c \
$(BUILDDIR)/ref_gl/gl_rmisc.c \
$(BUILDDIR)/ref_gl/gl_rsurf.c \
$(BUILDDIR)/ref_gl/gl_warp.c \
$(BUILDDIR)/linux/qgl_linux.c \
$(BUILDDIR)/android/gl_glx.c \
LOCAL_SRC_FILES := $(QUAKE2_OBJS) $(CGAME_SRC) $(REF_FILES)
include $(BUILD_SHARED_LIBRARY)
To run the compilation process in Windows using Cygwin, start the Cygwin console, change
to the folder containing the chapter source (see Figure 7-1 ), and invoke the Android build
script ndk-build , like so:
$ cd /cygdrive/C/tmp/ch07.QuakeII
$ ndk-build
Search WWH ::




Custom Search