From 3d5f8de346375d67dbe123d7971f63db23a44e99 Mon Sep 17 00:00:00 2001 From: samuele3hu Date: Wed, 27 Aug 2014 20:58:32 +0800 Subject: [PATCH] Adjust android.mk for cocos2d and related module --- cocos/3d/Android.mk | 33 ++ cocos/Android.mk | 318 ++----------------- cocos/audio/android/Android.mk | 18 ++ cocos/editor-support/cocosbuilder/Android.mk | 45 +++ cocos/editor-support/cocostudio/Android.mk | 82 +++++ cocos/editor-support/spine/Android.mk | 42 +++ cocos/network/Android.mk | 25 ++ cocos/ui/Android.mk | 49 +++ extensions/Android.mk | 50 +++ external/Box2D/Android.mk | 61 ++++ external/chipmunk/Android.mk | 45 +++ 11 files changed, 479 insertions(+), 289 deletions(-) create mode 100644 cocos/3d/Android.mk create mode 100644 cocos/audio/android/Android.mk create mode 100644 cocos/editor-support/cocosbuilder/Android.mk create mode 100644 cocos/editor-support/cocostudio/Android.mk create mode 100644 cocos/editor-support/spine/Android.mk create mode 100644 cocos/network/Android.mk create mode 100644 cocos/ui/Android.mk create mode 100644 extensions/Android.mk create mode 100644 external/Box2D/Android.mk create mode 100644 external/chipmunk/Android.mk diff --git a/cocos/3d/Android.mk b/cocos/3d/Android.mk new file mode 100644 index 0000000000..d67b36b107 --- /dev/null +++ b/cocos/3d/Android.mk @@ -0,0 +1,33 @@ +LOCAL_PATH := $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_MODULE := cocos3d_static + +LOCAL_MODULE_FILENAME := libcocos3d + +LOCAL_SRC_FILES := \ +CCRay.cpp \ +CCAABB.cpp \ +CCOBB.cpp \ +CCAnimate3D.cpp \ +CCAnimation3D.cpp \ +CCAttachNode.cpp \ +CCBundle3D.cpp \ +CCBundleReader.cpp \ +CCMesh.cpp \ +CCMeshSkin.cpp \ +CCMeshVertexIndexData.cpp \ +CCSprite3DMaterial.cpp \ +CCObjLoader.cpp \ +CCSkeleton3D.cpp \ +CCSprite3D.cpp + +LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/.. + +LOCAL_C_INCLUDES := $(LOCAL_PATH)/.. \ + $(LOCAL_PATH)/../../external \ + $(LOCAL_PATH)/../platform/android + +LOCAL_STATIC_LIBRARIES := cocos2dx_static + +include $(BUILD_STATIC_LIBRARY) diff --git a/cocos/Android.mk b/cocos/Android.mk index dbd680a8c1..88a955af29 100644 --- a/cocos/Android.mk +++ b/cocos/Android.mk @@ -6,8 +6,6 @@ LOCAL_MODULE := cocos2dx_static LOCAL_MODULE_FILENAME := libcocos2d -LOCAL_SHORT_COMMANDS := true - LOCAL_SRC_FILES := \ cocos2d.cpp \ 2d/CCAction.cpp \ @@ -186,294 +184,18 @@ physics/chipmunk/CCPhysicsWorldInfo_chipmunk.cpp \ ../external/xxhash/xxhash.c -#3d -LOCAL_SRC_FILES += 3d/CCRay.cpp \ - 3d/CCAABB.cpp \ - 3d/CCOBB.cpp \ - 3d/CCAnimate3D.cpp \ - 3d/CCAnimation3D.cpp \ - 3d/CCAttachNode.cpp \ - 3d/CCBundle3D.cpp \ - 3d/CCBundleReader.cpp \ - 3d/CCMesh.cpp \ - 3d/CCMeshSkin.cpp \ - 3d/CCMeshVertexIndexData.cpp \ - 3d/CCObjLoader.cpp \ - 3d/CCSkeleton3D.cpp \ - 3d/CCSprite3D.cpp \ - 3d/CCSprite3DMaterial.cpp - - -#audio -LOCAL_SRC_FILES += audio/android/cddSimpleAudioEngine.cpp \ - audio/android/ccdandroidUtils.cpp \ - audio/android/jni/cddandroidAndroidJavaEngine.cpp - -#network -LOCAL_SRC_FILES += network/HttpClient.cpp \ - network/SocketIO.cpp \ - network/WebSocket.cpp - -#cocosbuilder -LOCAL_SRC_FILES += editor-support/cocosbuilder/CCBAnimationManager.cpp \ - editor-support/cocosbuilder/CCBFileLoader.cpp \ - editor-support/cocosbuilder/CCBKeyframe.cpp \ - editor-support/cocosbuilder/CCBReader.cpp \ - editor-support/cocosbuilder/CCBSequence.cpp \ - editor-support/cocosbuilder/CCBSequenceProperty.cpp \ - editor-support/cocosbuilder/CCControlButtonLoader.cpp \ - editor-support/cocosbuilder/CCControlLoader.cpp \ - editor-support/cocosbuilder/CCLabelBMFontLoader.cpp \ - editor-support/cocosbuilder/CCLabelTTFLoader.cpp \ - editor-support/cocosbuilder/CCLayerColorLoader.cpp \ - editor-support/cocosbuilder/CCLayerGradientLoader.cpp \ - editor-support/cocosbuilder/CCLayerLoader.cpp \ - editor-support/cocosbuilder/CCMenuItemImageLoader.cpp \ - editor-support/cocosbuilder/CCMenuItemLoader.cpp \ - editor-support/cocosbuilder/CCNode+CCBRelativePositioning.cpp \ - editor-support/cocosbuilder/CCNodeLoader.cpp \ - editor-support/cocosbuilder/CCNodeLoaderLibrary.cpp \ - editor-support/cocosbuilder/CCParticleSystemQuadLoader.cpp \ - editor-support/cocosbuilder/CCScale9SpriteLoader.cpp \ - editor-support/cocosbuilder/CCScrollViewLoader.cpp \ - editor-support/cocosbuilder/CCSpriteLoader.cpp - -#cocostudio -LOCAL_SRC_FILES += editor-support/cocostudio/CCActionFrame.cpp \ - editor-support/cocostudio/CCActionFrameEasing.cpp \ - editor-support/cocostudio/CCActionManagerEx.cpp \ - editor-support/cocostudio/CCActionNode.cpp \ - editor-support/cocostudio/CCActionObject.cpp \ - editor-support/cocostudio/CCArmature.cpp \ - editor-support/cocostudio/CCBone.cpp \ - editor-support/cocostudio/CCArmatureAnimation.cpp \ - editor-support/cocostudio/CCProcessBase.cpp \ - editor-support/cocostudio/CCTween.cpp \ - editor-support/cocostudio/CCDatas.cpp \ - editor-support/cocostudio/CCBatchNode.cpp \ - editor-support/cocostudio/CCDecorativeDisplay.cpp \ - editor-support/cocostudio/CCDisplayFactory.cpp \ - editor-support/cocostudio/CCDisplayManager.cpp \ - editor-support/cocostudio/CCSkin.cpp \ - editor-support/cocostudio/CCColliderDetector.cpp \ - editor-support/cocostudio/CCArmatureDataManager.cpp \ - editor-support/cocostudio/CCArmatureDefine.cpp \ - editor-support/cocostudio/CCDataReaderHelper.cpp \ - editor-support/cocostudio/CCSpriteFrameCacheHelper.cpp \ - editor-support/cocostudio/CCTransformHelp.cpp \ - editor-support/cocostudio/CCUtilMath.cpp \ - editor-support/cocostudio/CCComAttribute.cpp \ - editor-support/cocostudio/CCComAudio.cpp \ - editor-support/cocostudio/CCComController.cpp \ - editor-support/cocostudio/CCComRender.cpp \ - editor-support/cocostudio/CCInputDelegate.cpp \ - editor-support/cocostudio/DictionaryHelper.cpp \ - editor-support/cocostudio/CCSGUIReader.cpp \ - editor-support/cocostudio/CCSSceneReader.cpp \ - editor-support/cocostudio/TriggerBase.cpp \ - editor-support/cocostudio/TriggerMng.cpp \ - editor-support/cocostudio/TriggerObj.cpp \ - editor-support/cocostudio/CocoLoader.cpp \ - editor-support/cocostudio/WidgetReader/WidgetReader.cpp \ - editor-support/cocostudio/WidgetReader/ButtonReader/ButtonReader.cpp \ - editor-support/cocostudio/WidgetReader/CheckBoxReader/CheckBoxReader.cpp \ - editor-support/cocostudio/WidgetReader/ImageViewReader/ImageViewReader.cpp \ - editor-support/cocostudio/WidgetReader/LayoutReader/LayoutReader.cpp \ - editor-support/cocostudio/WidgetReader/ListViewReader/ListViewReader.cpp \ - editor-support/cocostudio/WidgetReader/LoadingBarReader/LoadingBarReader.cpp \ - editor-support/cocostudio/WidgetReader/PageViewReader/PageViewReader.cpp \ - editor-support/cocostudio/WidgetReader/ScrollViewReader/ScrollViewReader.cpp \ - editor-support/cocostudio/WidgetReader/SliderReader/SliderReader.cpp \ - editor-support/cocostudio/WidgetReader/TextAtlasReader/TextAtlasReader.cpp \ - editor-support/cocostudio/WidgetReader/TextBMFontReader/TextBMFontReader.cpp \ - editor-support/cocostudio/WidgetReader/TextFieldReader/TextFieldReader.cpp \ - editor-support/cocostudio/WidgetReader/TextReader/TextReader.cpp \ - editor-support/cocostudio/ActionTimeline/CCNodeReader.cpp \ - editor-support/cocostudio/ActionTimeline/CCActionTimelineCache.cpp \ - editor-support/cocostudio/ActionTimeline/CCFrame.cpp \ - editor-support/cocostudio/ActionTimeline/CCTimeLine.cpp \ - editor-support/cocostudio/ActionTimeline/CCActionTimeline.cpp - -#spine -LOCAL_SRC_FILES += editor-support/spine/Animation.cpp \ - editor-support/spine/AnimationState.cpp \ - editor-support/spine/AnimationStateData.cpp \ - editor-support/spine/Atlas.cpp \ - editor-support/spine/AtlasAttachmentLoader.cpp \ - editor-support/spine/Attachment.cpp \ - editor-support/spine/AttachmentLoader.cpp \ - editor-support/spine/Bone.cpp \ - editor-support/spine/BoneData.cpp \ - editor-support/spine/CCSkeleton.cpp \ - editor-support/spine/CCSkeletonAnimation.cpp \ - editor-support/spine/Json.cpp \ - editor-support/spine/RegionAttachment.cpp \ - editor-support/spine/Skeleton.cpp \ - editor-support/spine/SkeletonData.cpp \ - editor-support/spine/SkeletonJson.cpp \ - editor-support/spine/Skin.cpp \ - editor-support/spine/Slot.cpp \ - editor-support/spine/SlotData.cpp \ - editor-support/spine/BoundingBoxAttachment.cpp \ - editor-support/spine/Event.cpp \ - editor-support/spine/EventData.cpp \ - editor-support/spine/SkeletonBounds.cpp \ - editor-support/spine/extension.cpp \ - editor-support/spine/spine-cocos2dx.cpp - -#local-storage -LOCAL_SRC_FILES += storage/local-storage/LocalStorage.cpp \ - storage/local-storage/LocalStorageAndroid.cpp - -#ui -LOCAL_SRC_FILES += ui/UIWidget.cpp \ - ui/UILayout.cpp \ - ui/UILayoutParameter.cpp \ - ui/UILayoutManager.cpp \ - ui/CocosGUI.cpp \ - ui/UIHelper.cpp \ - ui/UIListView.cpp \ - ui/UIPageView.cpp \ - ui/UIScrollView.cpp \ - ui/UIButton.cpp \ - ui/UICheckBox.cpp \ - ui/UIImageView.cpp \ - ui/UIText.cpp \ - ui/UITextAtlas.cpp \ - ui/UITextBMFont.cpp \ - ui/UILoadingBar.cpp \ - ui/UISlider.cpp \ - ui/UITextField.cpp \ - ui/UIRichText.cpp \ - ui/UIHBox.cpp \ - ui/UIVBox.cpp \ - ui/UIRelativeBox.cpp \ - ui/UIVideoPlayerAndroid.cpp \ - ui/UIDeprecated.cpp \ - ui/UIScale9Sprite.cpp - -#extension -LOCAL_SRC_FILES += ../extensions/assets-manager/AssetsManager.cpp \ - ../extensions/GUI/CCControlExtension/CCControl.cpp \ - ../extensions/GUI/CCControlExtension/CCControlButton.cpp \ - ../extensions/GUI/CCControlExtension/CCControlColourPicker.cpp \ - ../extensions/GUI/CCControlExtension/CCControlHuePicker.cpp \ - ../extensions/GUI/CCControlExtension/CCControlPotentiometer.cpp \ - ../extensions/GUI/CCControlExtension/CCControlSaturationBrightnessPicker.cpp \ - ../extensions/GUI/CCControlExtension/CCControlSlider.cpp \ - ../extensions/GUI/CCControlExtension/CCControlStepper.cpp \ - ../extensions/GUI/CCControlExtension/CCControlSwitch.cpp \ - ../extensions/GUI/CCControlExtension/CCControlUtils.cpp \ - ../extensions/GUI/CCControlExtension/CCInvocation.cpp \ - ../extensions/GUI/CCControlExtension/CCScale9Sprite.cpp \ - ../extensions/GUI/CCEditBox/CCEditBox.cpp \ - ../extensions/GUI/CCEditBox/CCEditBoxImplAndroid.cpp \ - ../extensions/GUI/CCEditBox/CCEditBoxImplNone.cpp \ - ../extensions/GUI/CCEditBox/CCEditBoxImplWin.cpp \ - ../extensions/GUI/CCScrollView/CCScrollView.cpp \ - ../extensions/GUI/CCScrollView/CCTableView.cpp \ - ../extensions/GUI/CCScrollView/CCTableViewCell.cpp \ - ../extensions/physics-nodes/CCPhysicsDebugNode.cpp \ - ../extensions/physics-nodes/CCPhysicsSprite.cpp - -#box2d -LOCAL_SRC_FILES += ../external/Box2d/Collision/b2BroadPhase.cpp \ - ../external/Box2d/Collision/b2CollideCircle.cpp \ - ../external/Box2d/Collision/b2CollideEdge.cpp \ - ../external/Box2d/Collision/b2CollidePolygon.cpp \ - ../external/Box2d/Collision/b2Collision.cpp \ - ../external/Box2d/Collision/b2Distance.cpp \ - ../external/Box2d/Collision/b2DynamicTree.cpp \ - ../external/Box2d/Collision/b2TimeOfImpact.cpp \ - ../external/Box2d/Collision/Shapes/b2ChainShape.cpp \ - ../external/Box2d/Collision/Shapes/b2CircleShape.cpp \ - ../external/Box2d/Collision/Shapes/b2EdgeShape.cpp \ - ../external/Box2d/Collision/Shapes/b2PolygonShape.cpp \ - ../external/Box2d/Common/b2BlockAllocator.cpp \ - ../external/Box2d/Common/b2Draw.cpp \ - ../external/Box2d/Common/b2Math.cpp \ - ../external/Box2d/Common/b2Settings.cpp \ - ../external/Box2d/Common/b2StackAllocator.cpp \ - ../external/Box2d/Common/b2Timer.cpp \ - ../external/Box2d/Dynamics/b2Body.cpp \ - ../external/Box2d/Dynamics/b2ContactManager.cpp \ - ../external/Box2d/Dynamics/b2Fixture.cpp \ - ../external/Box2d/Dynamics/b2Island.cpp \ - ../external/Box2d/Dynamics/b2World.cpp \ - ../external/Box2d/Dynamics/b2WorldCallbacks.cpp \ - ../external/Box2d/Dynamics/Contacts/b2ChainAndCircleContact.cpp \ - ../external/Box2d/Dynamics/Contacts/b2ChainAndPolygonContact.cpp \ - ../external/Box2d/Dynamics/Contacts/b2CircleContact.cpp \ - ../external/Box2d/Dynamics/Contacts/b2Contact.cpp \ - ../external/Box2d/Dynamics/Contacts/b2ContactSolver.cpp \ - ../external/Box2d/Dynamics/Contacts/b2EdgeAndCircleContact.cpp \ - ../external/Box2d/Dynamics/Contacts/b2EdgeAndPolygonContact.cpp \ - ../external/Box2d/Dynamics/Contacts/b2PolygonAndCircleContact.cpp \ - ../external/Box2d/Dynamics/Contacts/b2PolygonContact.cpp \ - ../external/Box2d/Dynamics/Joints/b2DistanceJoint.cpp \ - ../external/Box2d/Dynamics/Joints/b2FrictionJoint.cpp \ - ../external/Box2d/Dynamics/Joints/b2GearJoint.cpp \ - ../external/Box2d/Dynamics/Joints/b2Joint.cpp \ - ../external/Box2d/Dynamics/Joints/b2MotorJoint.cpp \ - ../external/Box2d/Dynamics/Joints/b2MouseJoint.cpp \ - ../external/Box2d/Dynamics/Joints/b2PrismaticJoint.cpp \ - ../external/Box2d/Dynamics/Joints/b2PulleyJoint.cpp \ - ../external/Box2d/Dynamics/Joints/b2RevoluteJoint.cpp \ - ../external/Box2d/Dynamics/Joints/b2RopeJoint.cpp \ - ../external/Box2d/Dynamics/Joints/b2WeldJoint.cpp \ - ../external/Box2d/Dynamics/Joints/b2WheelJoint.cpp \ - ../external/Box2d/Rope/b2Rope.cpp - -#chipmunk -LOCAL_SRC_FILES += ../external/chipmunk/src/chipmunk.c \ - ../external/chipmunk/src/cpArbiter.c \ - ../external/chipmunk/src/cpArray.c \ - ../external/chipmunk/src/cpBB.c \ - ../external/chipmunk/src/cpBBTree.c \ - ../external/chipmunk/src/cpBody.c \ - ../external/chipmunk/src/cpCollision.c \ - ../external/chipmunk/src/cpHashSet.c \ - ../external/chipmunk/src/cpPolyShape.c \ - ../external/chipmunk/src/cpShape.c \ - ../external/chipmunk/src/cpSpace.c \ - ../external/chipmunk/src/cpSpaceComponent.c \ - ../external/chipmunk/src/cpSpaceHash.c \ - ../external/chipmunk/src/cpSpaceQuery.c \ - ../external/chipmunk/src/cpSpaceStep.c \ - ../external/chipmunk/src/cpSpatialIndex.c \ - ../external/chipmunk/src/cpSweep1D.c \ - ../external/chipmunk/src/cpVect.c \ - ../external/chipmunk/src/constraints/cpConstraint.c \ - ../external/chipmunk/src/constraints/cpDampedRotarySpring.c \ - ../external/chipmunk/src/constraints/cpDampedSpring.c \ - ../external/chipmunk/src/constraints/cpGearJoint.c \ - ../external/chipmunk/src/constraints/cpGrooveJoint.c \ - ../external/chipmunk/src/constraints/cpPinJoint.c \ - ../external/chipmunk/src/constraints/cpPivotJoint.c \ - ../external/chipmunk/src/constraints/cpRatchetJoint.c \ - ../external/chipmunk/src/constraints/cpRotaryLimitJoint.c \ - ../external/chipmunk/src/constraints/cpSimpleMotor.c \ - ../external/chipmunk/src/constraints/cpSlideJoint.c - - LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) \ + $(LOCAL_PATH)/. \ $(LOCAL_PATH)/platform/android \ $(LOCAL_PATH)/base \ - $(LOCAL_PATH)/../external \ $(LOCAL_PATH)/../external/tinyxml2 \ $(LOCAL_PATH)/../external/unzip \ $(LOCAL_PATH)/../external/chipmunk/include/chipmunk \ $(LOCAL_PATH)/../external/xxhash \ - $(LOCAL_PATH)/../external/nslog \ - $(LOCAL_PATH)/audio/include \ - $(LOCAL_PATH)/editor-support \ - $(LOCAL_PATH)/storage \ - $(LOCAL_PATH)/../extensions/GUI/CCControlExtension \ - $(LOCAL_PATH)/../extensions/GUI/CCScrollView \ - $(LOCAL_PATH)/../external/chipmunk/include/chipmunk + $(LOCAL_PATH)/../external/nslog LOCAL_C_INCLUDES := $(LOCAL_PATH) \ - $(LOCAL_PATH)/.. \ + $(LOCAL_PATH)/. \ $(LOCAL_PATH)/platform/android \ $(LOCAL_PATH)/../external \ $(LOCAL_PATH)/../external/tinyxml2 \ @@ -482,11 +204,7 @@ LOCAL_C_INCLUDES := $(LOCAL_PATH) \ $(LOCAL_PATH)/../external/edtaa3func \ $(LOCAL_PATH)/../external/xxhash \ $(LOCAL_PATH)/../external/ConvertUTF \ - $(LOCAL_PATH)/../external/nslog \ - $(LOCAL_PATH)/audio/include \ - $(LOCAL_PATH)/audio/android \ - $(LOCAL_PATH)/editor-support \ - $(LOCAL_PATH)/editor-support/cocosbuilder + $(LOCAL_PATH)/../external/nslog LOCAL_EXPORT_LDLIBS := -lGLESv2 \ -llog \ @@ -494,18 +212,27 @@ LOCAL_EXPORT_LDLIBS := -lGLESv2 \ -landroid LOCAL_STATIC_LIBRARIES := cocos_freetype2_static -LOCAL_STATIC_LIBRARIES += cocos_curl_static -LOCAL_STATIC_LIBRARIES += libwebsockets_static LOCAL_STATIC_LIBRARIES += cocos_png_static LOCAL_STATIC_LIBRARIES += cocos_jpeg_static LOCAL_STATIC_LIBRARIES += cocos_tiff_static LOCAL_STATIC_LIBRARIES += cocos_webp_static +LOCAL_STATIC_LIBRARIES += cocos3d_static +LOCAL_STATIC_LIBRARIES += cocosdenshion_static +LOCAL_STATIC_LIBRARIES += cocosbuilder_static +LOCAL_STATIC_LIBRARIES += cocostudio_static +LOCAL_STATIC_LIBRARIES += spine_static +LOCAL_STATIC_LIBRARIES += cocos_network_static +LOCAL_STATIC_LIBRARIES += cocos_ui_static +LOCAL_STATIC_LIBRARIES += cocos_extension_static +LOCAL_STATIC_LIBRARIES += box2d_static +LOCAL_STATIC_LIBRARIES += chipmunk_static +LOCAL_STATIC_LIBRARIES += cocos_curl_static +LOCAL_STATIC_LIBRARIES += libwebsockets_static LOCAL_WHOLE_STATIC_LIBRARIES := cocos2dxandroid_static # define the macro to compile through support/zip_support/ioapi.c LOCAL_CFLAGS := -DUSE_FILE32API -LOCAL_CFLAGS += -std=c99 LOCAL_CPPFLAGS := -Wno-deprecated-declarations -Wno-extern-c-compat LOCAL_EXPORT_CFLAGS := -DUSE_FILE32API LOCAL_EXPORT_CPPFLAGS := -Wno-deprecated-declarations -Wno-extern-c-compat @@ -513,10 +240,23 @@ LOCAL_EXPORT_CPPFLAGS := -Wno-deprecated-declarations -Wno-extern-c-compat include $(BUILD_STATIC_LIBRARY) $(call import-module,freetype2/prebuilt/android) +$(call import-module,chipmunk) $(call import-module,platform/android) $(call import-module,png/prebuilt/android) $(call import-module,jpeg/prebuilt/android) $(call import-module,tiff/prebuilt/android) $(call import-module,webp/prebuilt/android) +$(call import-module,webp/prebuilt/android) +$(call import-module,webp/prebuilt/android) +$(call import-module,3d) +$(call import-module,audio/android) +$(call import-module,editor-support/cocosbuilder) +$(call import-module,editor-support/cocostudio) +$(call import-module,editor-support/spine) +$(call import-module,network) +$(call import-module,ui) +$(call import-module,extensions) +$(call import-module,Box2D) $(call import-module,curl/prebuilt/android) $(call import-module,websockets/prebuilt/android) + diff --git a/cocos/audio/android/Android.mk b/cocos/audio/android/Android.mk new file mode 100644 index 0000000000..3854fa79d7 --- /dev/null +++ b/cocos/audio/android/Android.mk @@ -0,0 +1,18 @@ +LOCAL_PATH := $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_MODULE := cocosdenshion_static + +LOCAL_MODULE_FILENAME := libcocosdenshion + +LOCAL_SRC_FILES := cddSimpleAudioEngine.cpp \ + ccdandroidUtils.cpp \ + jni/cddandroidAndroidJavaEngine.cpp + +LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../include + +LOCAL_C_INCLUDES := $(LOCAL_PATH)/../include \ + $(LOCAL_PATH)/../.. \ + $(LOCAL_PATH)/../../platform/android + +include $(BUILD_STATIC_LIBRARY) diff --git a/cocos/editor-support/cocosbuilder/Android.mk b/cocos/editor-support/cocosbuilder/Android.mk new file mode 100644 index 0000000000..36089ec055 --- /dev/null +++ b/cocos/editor-support/cocosbuilder/Android.mk @@ -0,0 +1,45 @@ +LOCAL_PATH := $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_MODULE := cocosbuilder_static + +LOCAL_MODULE_FILENAME := libcocosbuilder + +LOCAL_SRC_FILES := CCBAnimationManager.cpp \ +CCBFileLoader.cpp \ +CCBKeyframe.cpp \ +CCBReader.cpp \ +CCBSequence.cpp \ +CCBSequenceProperty.cpp \ +CCControlButtonLoader.cpp \ +CCControlLoader.cpp \ +CCLabelBMFontLoader.cpp \ +CCLabelTTFLoader.cpp \ +CCLayerColorLoader.cpp \ +CCLayerGradientLoader.cpp \ +CCLayerLoader.cpp \ +CCMenuItemImageLoader.cpp \ +CCMenuItemLoader.cpp \ +CCNode+CCBRelativePositioning.cpp \ +CCNodeLoader.cpp \ +CCNodeLoaderLibrary.cpp \ +CCParticleSystemQuadLoader.cpp \ +CCScale9SpriteLoader.cpp \ +CCScrollViewLoader.cpp \ +CCSpriteLoader.cpp + +LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/.. \ +$(LOCAL_PATH)/../../.. + +LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../2d \ +$(LOCAL_PATH) \ +$(LOCAL_PATH)/../../.. \ +$(LOCAL_PATH)/../../ \ +$(LOCAL_PATH)/../../platform/android \ +$(LOCAL_PATH)/../../editor-support + +LOCAL_STATIC_LIBRARIES := cocos2dx_static +LOCAL_STATIC_LIBRARIES := cocos_extension_static + +include $(BUILD_STATIC_LIBRARY) + diff --git a/cocos/editor-support/cocostudio/Android.mk b/cocos/editor-support/cocostudio/Android.mk new file mode 100644 index 0000000000..f4ffa5dcbd --- /dev/null +++ b/cocos/editor-support/cocostudio/Android.mk @@ -0,0 +1,82 @@ +LOCAL_PATH := $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_MODULE := cocostudio_static + +LOCAL_MODULE_FILENAME := libcocostudio + +LOCAL_SRC_FILES := CCActionFrame.cpp \ +CCActionFrameEasing.cpp \ +CCActionManagerEx.cpp \ +CCActionNode.cpp \ +CCActionObject.cpp \ +CCArmature.cpp \ +CCBone.cpp \ +CCArmatureAnimation.cpp \ +CCProcessBase.cpp \ +CCTween.cpp \ +CCDatas.cpp \ +CCBatchNode.cpp \ +CCDecorativeDisplay.cpp \ +CCDisplayFactory.cpp \ +CCDisplayManager.cpp \ +CCSkin.cpp \ +CCColliderDetector.cpp \ +CCArmatureDataManager.cpp \ +CCArmatureDefine.cpp \ +CCDataReaderHelper.cpp \ +CCSpriteFrameCacheHelper.cpp \ +CCTransformHelp.cpp \ +CCUtilMath.cpp \ +CCComAttribute.cpp \ +CCComAudio.cpp \ +CCComController.cpp \ +CCComRender.cpp \ +CCInputDelegate.cpp \ +DictionaryHelper.cpp \ +CCSGUIReader.cpp \ +CCSSceneReader.cpp \ +TriggerBase.cpp \ +TriggerMng.cpp \ +TriggerObj.cpp \ +CocoLoader.cpp \ +WidgetReader/WidgetReader.cpp \ +WidgetReader/ButtonReader/ButtonReader.cpp \ +WidgetReader/CheckBoxReader/CheckBoxReader.cpp \ +WidgetReader/ImageViewReader/ImageViewReader.cpp \ +WidgetReader/LayoutReader/LayoutReader.cpp \ +WidgetReader/ListViewReader/ListViewReader.cpp \ +WidgetReader/LoadingBarReader/LoadingBarReader.cpp \ +WidgetReader/PageViewReader/PageViewReader.cpp \ +WidgetReader/ScrollViewReader/ScrollViewReader.cpp \ +WidgetReader/SliderReader/SliderReader.cpp \ +WidgetReader/TextAtlasReader/TextAtlasReader.cpp \ +WidgetReader/TextBMFontReader/TextBMFontReader.cpp \ +WidgetReader/TextFieldReader/TextFieldReader.cpp \ +WidgetReader/TextReader/TextReader.cpp \ +ActionTimeline/CCNodeReader.cpp \ +ActionTimeline/CCActionTimelineCache.cpp \ +ActionTimeline/CCFrame.cpp \ +ActionTimeline/CCTimeLine.cpp \ +ActionTimeline/CCActionTimeline.cpp + +LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/.. \ +$(LOCAL_PATH)/../../../external + +LOCAL_C_INCLUDES := $(LOCAL_PATH)/../.. \ +$(LOCAL_PATH)/../../../external \ +$(LOCAL_PATH)/.. \ +$(LOCAL_PATH)/../.. \ +$(LOCAL_PATH)/WidgetReader \ +$(LOCAL_PATH)/../../platform/android \ +$(LOCAL_PATH)/../../../external/tinyxml2 \ + +LOCAL_CFLAGS += -fexceptions + +LOCAL_STATIC_LIBRARIES := cocos_ui_static +LOCAL_STATIC_LIBRARIES += cocosdenshion_static +LOCAL_STATIC_LIBRARIES += cocos_extension_static +LOCAL_STATIC_LIBRARIES += cocos2dx_static + +include $(BUILD_STATIC_LIBRARY) + diff --git a/cocos/editor-support/spine/Android.mk b/cocos/editor-support/spine/Android.mk new file mode 100644 index 0000000000..f49532d9c8 --- /dev/null +++ b/cocos/editor-support/spine/Android.mk @@ -0,0 +1,42 @@ +LOCAL_PATH := $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_MODULE := spine_static + +LOCAL_MODULE_FILENAME := libspine + +LOCAL_SRC_FILES := Animation.cpp \ +AnimationState.cpp \ +AnimationStateData.cpp \ +Atlas.cpp \ +AtlasAttachmentLoader.cpp \ +Attachment.cpp \ +AttachmentLoader.cpp \ +Bone.cpp \ +BoneData.cpp \ +CCSkeleton.cpp \ +CCSkeletonAnimation.cpp \ +Json.cpp \ +RegionAttachment.cpp \ +Skeleton.cpp \ +SkeletonData.cpp \ +SkeletonJson.cpp \ +Skin.cpp \ +Slot.cpp \ +SlotData.cpp \ +BoundingBoxAttachment.cpp \ +Event.cpp \ +EventData.cpp \ +SkeletonBounds.cpp \ +extension.cpp \ +spine-cocos2dx.cpp + +LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/.. + +LOCAL_C_INCLUDES := $(LOCAL_PATH)/../.. \ +$(LOCAL_PATH)/.. \ +$(LOCAL_PATH)/../../platform/android + +LOCAL_STATIC_LIBRARIES := cocos2dx_static + +include $(BUILD_STATIC_LIBRARY) diff --git a/cocos/network/Android.mk b/cocos/network/Android.mk new file mode 100644 index 0000000000..96a760cfb3 --- /dev/null +++ b/cocos/network/Android.mk @@ -0,0 +1,25 @@ +LOCAL_PATH := $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_MODULE := cocos_network_static + +LOCAL_MODULE_FILENAME := libnetwork + +LOCAL_SRC_FILES := HttpClient.cpp \ +SocketIO.cpp \ +WebSocket.cpp + + +LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/.. + +LOCAL_C_INCLUDES := $(LOCAL_PATH)/../.. \ +$(LOCAL_PATH)/.. \ +$(LOCAL_PATH)/../platform/android \ +$(LOCAL_PATH)/../../external/curl/include/android \ +$(LOCAL_PATH)/../../external/websockets/include/android + +LOCAL_STATIC_LIBRARIES := cocos2dx_static +LOCAL_STATIC_LIBRARIES += cocos_curl_static +LOCAL_STATIC_LIBRARIES += libwebsockets_static + +include $(BUILD_STATIC_LIBRARY) diff --git a/cocos/ui/Android.mk b/cocos/ui/Android.mk new file mode 100644 index 0000000000..cabe2e9e8a --- /dev/null +++ b/cocos/ui/Android.mk @@ -0,0 +1,49 @@ +LOCAL_PATH := $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_MODULE := cocos_ui_static + +LOCAL_MODULE_FILENAME := libui + +LOCAL_SRC_FILES := \ +UIWidget.cpp \ +UILayout.cpp \ +UILayoutParameter.cpp \ +UILayoutManager.cpp \ +CocosGUI.cpp \ +UIHelper.cpp \ +UIListView.cpp \ +UIPageView.cpp \ +UIScrollView.cpp \ +UIButton.cpp \ +UICheckBox.cpp \ +UIImageView.cpp \ +UIText.cpp \ +UITextAtlas.cpp \ +UITextBMFont.cpp \ +UILoadingBar.cpp \ +UISlider.cpp \ +UITextField.cpp \ +UIRichText.cpp \ +UIHBox.cpp \ +UIVBox.cpp \ +UIRelativeBox.cpp \ +UIVideoPlayerAndroid.cpp \ +UIDeprecated.cpp \ +UIScale9Sprite.cpp \ + +LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/.. \ +$(LOCAL_PATH)/../editor-support + +LOCAL_C_INCLUDES := $(LOCAL_PATH)/.. \ +$(LOCAL_PATH)/../../external \ +$(LOCAL_PATH)/.. \ +$(LOCAL_PATH)/../.. \ +$(LOCAL_PATH)/../editor-support \ +$(LOCAL_PATH)/../platform/android + +LOCAL_STATIC_LIBRARIES := cocos2dx_static +LOCAL_STATIC_LIBRARIES += cocos_extension_static + +include $(BUILD_STATIC_LIBRARY) + diff --git a/extensions/Android.mk b/extensions/Android.mk new file mode 100644 index 0000000000..04fed90e66 --- /dev/null +++ b/extensions/Android.mk @@ -0,0 +1,50 @@ +LOCAL_PATH := $(call my-dir) +include $(CLEAR_VARS) + +LOCAL_MODULE := cocos_extension_static + +LOCAL_MODULE_FILENAME := libextension + +LOCAL_SRC_FILES := \ +assets-manager/AssetsManager.cpp \ +GUI/CCControlExtension/CCControl.cpp \ +GUI/CCControlExtension/CCControlButton.cpp \ +GUI/CCControlExtension/CCControlColourPicker.cpp \ +GUI/CCControlExtension/CCControlHuePicker.cpp \ +GUI/CCControlExtension/CCControlPotentiometer.cpp \ +GUI/CCControlExtension/CCControlSaturationBrightnessPicker.cpp \ +GUI/CCControlExtension/CCControlSlider.cpp \ +GUI/CCControlExtension/CCControlStepper.cpp \ +GUI/CCControlExtension/CCControlSwitch.cpp \ +GUI/CCControlExtension/CCControlUtils.cpp \ +GUI/CCControlExtension/CCInvocation.cpp \ +GUI/CCControlExtension/CCScale9Sprite.cpp \ +GUI/CCEditBox/CCEditBox.cpp \ +GUI/CCEditBox/CCEditBoxImplAndroid.cpp \ +GUI/CCEditBox/CCEditBoxImplNone.cpp \ +GUI/CCEditBox/CCEditBoxImplWin.cpp \ +GUI/CCScrollView/CCScrollView.cpp \ +GUI/CCScrollView/CCTableView.cpp \ +GUI/CCScrollView/CCTableViewCell.cpp \ +physics-nodes/CCPhysicsDebugNode.cpp \ +physics-nodes/CCPhysicsSprite.cpp + +LOCAL_STATIC_LIBRARIES := cocos2dx_static +LOCAL_STATIC_LIBRARIES += cocos_curl_static +LOCAL_STATIC_LIBRARIES += box2d_static + +LOCAL_CXXFLAGS += -fexceptions + +LOCAL_C_INCLUDES := $(LOCAL_PATH)/.. \ + $(LOCAL_PATH)/../cocos \ + $(LOCAL_PATH)/../cocos/platform/android \ + $(LOCAL_PATH)/../external/chipmunk/include/chipmunk \ + $(LOCAL_PATH)/../external/curl/include/android \ + $(LOCAL_PATH)/../external/unzip + + +LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/.. \ + $(LOCAL_PATH)/GUI/CCControlExtension \ + $(LOCAL_PATH)/GUI/CCScrollView + +include $(BUILD_STATIC_LIBRARY) diff --git a/external/Box2D/Android.mk b/external/Box2D/Android.mk new file mode 100644 index 0000000000..ca6cfca39e --- /dev/null +++ b/external/Box2D/Android.mk @@ -0,0 +1,61 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) + +LOCAL_MODULE := box2d_static + +LOCAL_MODULE_FILENAME := libbox2d + +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/b2MotorJoint.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)/.. + +LOCAL_C_INCLUDES := $(LOCAL_PATH)/.. + +include $(BUILD_STATIC_LIBRARY) diff --git a/external/chipmunk/Android.mk b/external/chipmunk/Android.mk new file mode 100644 index 0000000000..e8441cd0d7 --- /dev/null +++ b/external/chipmunk/Android.mk @@ -0,0 +1,45 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) + +LOCAL_MODULE := chipmunk_static + +LOCAL_MODULE_FILENAME := libchipmunk + +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 + +LOCAL_C_INCLUDES := $(LOCAL_PATH)/include/chipmunk +LOCAL_CFLAGS := -std=c99 + +include $(BUILD_STATIC_LIBRARY)