Merge pull request #3464 from boyu0/iss2434_gen_android_mk

closed #2434: Use android_mk_generator.py to generate Box2D and chipmunk's Android.mk file
This commit is contained in:
minggo 2013-08-22 19:24:47 -07:00
commit dde0bc0bbc
3 changed files with 84 additions and 8 deletions

View File

@ -6,10 +6,52 @@ LOCAL_MODULE := box2d_static
LOCAL_MODULE_FILENAME := libbox2d
dirs := $(shell find $(LOCAL_PATH) -type d -print)
find_files = $(subst $(LOCAL_PATH)/,,$(wildcard $(dir)/*.cpp))
LOCAL_SRC_FILES := $(foreach dir, $(dirs), $(find_files))
LOCAL_SRC_FILES := \
Collision/b2BroadPhase.cpp \
Collision/b2CollideCircle.cpp \
Collision/b2CollideEdge.cpp \
Collision/b2CollidePolygon.cpp \
Collision/b2Collision.cpp \
Collision/b2Distance.cpp \
Collision/b2DynamicTree.cpp \
Collision/b2TimeOfImpact.cpp \
Collision/Shapes/b2ChainShape.cpp \
Collision/Shapes/b2CircleShape.cpp \
Collision/Shapes/b2EdgeShape.cpp \
Collision/Shapes/b2PolygonShape.cpp \
Common/b2BlockAllocator.cpp \
Common/b2Draw.cpp \
Common/b2Math.cpp \
Common/b2Settings.cpp \
Common/b2StackAllocator.cpp \
Common/b2Timer.cpp \
Dynamics/b2Body.cpp \
Dynamics/b2ContactManager.cpp \
Dynamics/b2Fixture.cpp \
Dynamics/b2Island.cpp \
Dynamics/b2World.cpp \
Dynamics/b2WorldCallbacks.cpp \
Dynamics/Contacts/b2ChainAndCircleContact.cpp \
Dynamics/Contacts/b2ChainAndPolygonContact.cpp \
Dynamics/Contacts/b2CircleContact.cpp \
Dynamics/Contacts/b2Contact.cpp \
Dynamics/Contacts/b2ContactSolver.cpp \
Dynamics/Contacts/b2EdgeAndCircleContact.cpp \
Dynamics/Contacts/b2EdgeAndPolygonContact.cpp \
Dynamics/Contacts/b2PolygonAndCircleContact.cpp \
Dynamics/Contacts/b2PolygonContact.cpp \
Dynamics/Joints/b2DistanceJoint.cpp \
Dynamics/Joints/b2FrictionJoint.cpp \
Dynamics/Joints/b2GearJoint.cpp \
Dynamics/Joints/b2Joint.cpp \
Dynamics/Joints/b2MouseJoint.cpp \
Dynamics/Joints/b2PrismaticJoint.cpp \
Dynamics/Joints/b2PulleyJoint.cpp \
Dynamics/Joints/b2RevoluteJoint.cpp \
Dynamics/Joints/b2RopeJoint.cpp \
Dynamics/Joints/b2WeldJoint.cpp \
Dynamics/Joints/b2WheelJoint.cpp \
Rope/b2Rope.cpp
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/..

View File

@ -6,10 +6,36 @@ LOCAL_MODULE := chipmunk_static
LOCAL_MODULE_FILENAME := libchipmunk
dirs := $(shell find $(LOCAL_PATH) -type d -print)
find_files = $(subst $(LOCAL_PATH)/,,$(wildcard $(dir)/*.c))
LOCAL_SRC_FILES := $(foreach dir, $(dirs), $(find_files))
LOCAL_SRC_FILES := \
src/chipmunk.c \
src/cpArbiter.c \
src/cpArray.c \
src/cpBB.c \
src/cpBBTree.c \
src/cpBody.c \
src/cpCollision.c \
src/cpHashSet.c \
src/cpPolyShape.c \
src/cpShape.c \
src/cpSpace.c \
src/cpSpaceComponent.c \
src/cpSpaceHash.c \
src/cpSpaceQuery.c \
src/cpSpaceStep.c \
src/cpSpatialIndex.c \
src/cpSweep1D.c \
src/cpVect.c \
src/constraints/cpConstraint.c \
src/constraints/cpDampedRotarySpring.c \
src/constraints/cpDampedSpring.c \
src/constraints/cpGearJoint.c \
src/constraints/cpGrooveJoint.c \
src/constraints/cpPinJoint.c \
src/constraints/cpPivotJoint.c \
src/constraints/cpRatchetJoint.c \
src/constraints/cpRotaryLimitJoint.c \
src/constraints/cpSimpleMotor.c \
src/constraints/cpSlideJoint.c
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include/chipmunk

View File

@ -13,4 +13,12 @@
'pathes' : ("extensions/",),
'exclude' : ("extensions/proj.win32", "extensions/proj.emscripten", "extensions/proj.ios", "extensions/proj.linux", "extensions/proj.mac", "extensions/proj.nacl", "extensions/proj.qt5", "extensions/proj.tizen")
},
{
'mkfile' : 'external/Box2D/Android.mk',
'pathes' : ("external/Box2D/",),
},
{
'mkfile' : 'external/chipmunk/Android.mk',
'pathes' : ("external/chipmunk/",),
},
]