From 6a664d480a870c0a46c923fcd15fcdf9a3d0a9ee Mon Sep 17 00:00:00 2001 From: minggo Date: Tue, 22 Oct 2013 18:01:56 +0800 Subject: [PATCH 1/2] issue #2905:samples build ok on linux --- build/Makefile | 101 ++++--- build/install-deps-linux.sh | 2 +- cocos/2d/Makefile | 302 +++++++++++---------- cocos/2d/cocos2dx.mk | 45 +-- cocos/2d/platform/linux/CCEGLView.cpp | 2 +- cocos/2d/platform/linux/CCEGLView.h | 2 +- cocos/audio/proj.linux/Makefile | 10 +- cocos/editor-support/cocosbuilder/Makefile | 44 +++ cocos/editor-support/cocostudio/Makefile | 69 +++++ cocos/editor-support/spine/Makefile | 42 +++ cocos/gui/Layout.cpp | 4 +- cocos/gui/Makefile | 44 +++ cocos/network/Makefile | 22 ++ cocos/physics/CCPhysicsBody.cpp | 10 +- cocos/physics/CCPhysicsContact.cpp | 2 +- cocos/physics/CCPhysicsJoint.cpp | 6 +- cocos/physics/CCPhysicsShape.cpp | 6 +- cocos/physics/CCPhysicsWorld.cpp | 10 +- cocos/scripting/lua/bindings/Makefile | 126 +++++---- extensions/proj.linux/Makefile | 166 ++--------- extensions/proj.linux/extensions.prf | 20 -- external/Box2D/proj.linux/Makefile | 2 +- external/chipmunk/proj.linux/Makefile | 2 +- samples/Cpp/HelloCpp/proj.linux/Makefile | 2 +- samples/Cpp/SimpleGame/proj.linux/Makefile | 5 +- samples/Cpp/TestCpp/proj.linux/Makefile | 24 +- samples/Lua/HelloLua/proj.linux/Makefile | 18 +- samples/Lua/TestLua/proj.linux/Makefile | 16 +- 28 files changed, 615 insertions(+), 489 deletions(-) create mode 100644 cocos/editor-support/cocosbuilder/Makefile create mode 100644 cocos/editor-support/cocostudio/Makefile create mode 100644 cocos/editor-support/spine/Makefile create mode 100644 cocos/gui/Makefile create mode 100644 cocos/network/Makefile delete mode 100644 extensions/proj.linux/extensions.prf diff --git a/build/Makefile b/build/Makefile index fbea65f3cd..761855d264 100644 --- a/build/Makefile +++ b/build/Makefile @@ -3,68 +3,89 @@ PLATFORM ?= linux all: chipmunk: - $(MAKE) -C external/chipmunk/proj.$(PLATFORM) + $(MAKE) -C ../external/chipmunk/proj.$(PLATFORM) chipmunk-clean: - $(MAKE) -C external/chipmunk/proj.$(PLATFORM) clean + $(MAKE) -C ../external/chipmunk/proj.$(PLATFORM) clean box2d: - $(MAKE) -C external/Box2D/proj.$(PLATFORM) + $(MAKE) -C ../external/Box2D/proj.$(PLATFORM) box2d-clean: - $(MAKE) -C external/Box2D/proj.$(PLATFORM) clean + $(MAKE) -C ../external/Box2D/proj.$(PLATFORM) clean -libextensions: chipmunk cocosdenshion box2d - $(MAKE) -C extensions/proj.$(PLATFORM) -libextensions-clean: - $(MAKE) -C extensions/proj.$(PLATFORM) clean +cocos2dx: chipmunk + $(MAKE) -C ../cocos/2d +cocos2dx-clean: + $(MAKE) -C ../cocos/2d clean -libcocos2dx: libextensions - $(MAKE) -C cocos2dx/proj.$(PLATFORM) -libcocos2dx-clean: - $(MAKE) -C cocos2dx/proj.$(PLATFORM) clean +audio: cocos2dx + $(MAKE) -C ../cocos/audio/proj.$(PLATFORM) +audio-clean: + $(MAKE) -C ../cocos/audio/proj.$(PLATFORM) clean -cocosdenshion: libcocos2dx - $(MAKE) -C audio/proj.$(PLATFORM) -cocosdenshion-clean: - $(MAKE) -C audio/proj.$(PLATFORM) clean +gui: + $(MAKE) -C ../cocos/gui +gui-clean: + $(MAKE) -C ../cocos/gui clean -lua: libextensions - $(MAKE) -C scripting/lua/proj.$(PLATFORM) +network: cocos2dx + $(MAKE) -C ../cocos/network +network-clean: + $(MAKE) -C ../cocos/network clean + +cocosbuilder: + $(MAKE) -C ../cocos/editor-support/cocosbuilder +cocosbuilder-clean: + $(MAKE) -C ../cocos/editor-support/cocosbuilder clean + +spine: + $(MAKE) -C ../cocos/editor-support/spine +spine-clean: + $(MAKE) -C ../cocos/editor-support/spine clean + +cocostudio: + $(MAKE) -C ../cocos/editor-support/cocostudio +cocostudio-clean: + $(MAKE) -C ../cocos/editor-support/cocostudio clean + +extensions: chipmunk audio box2d + $(MAKE) -C ../extensions/proj.$(PLATFORM) +extensions-clean: + $(MAKE) -C ../extensions/proj.$(PLATFORM) clean + +lua: extensions cocosbuilder cocostudio + $(MAKE) -C ../cocos/scripting/lua/bindings lua-clean: - $(MAKE) -C scripting/lua/proj.$(PLATFORM) clean + $(MAKE) -C ../cocos/scripting/lua/bindings clean -hellocpp: libcocos2dx - $(MAKE) -C samples/Cpp/HelloCpp/proj.$(PLATFORM) +hellocpp: cocos2dx + $(MAKE) -C ../samples/Cpp/HelloCpp/proj.$(PLATFORM) hellocpp-clean: - $(MAKE) -C samples/Cpp/HelloCpp/proj.$(PLATFORM) clean + $(MAKE) -C ../samples/Cpp/HelloCpp/proj.$(PLATFORM) clean -testcpp: libcocos2dx libextensions - $(MAKE) -C samples/Cpp/TestCpp/proj.$(PLATFORM) +testcpp: cocos2dx audio extensions cocostudio gui cocosbuilder spine network + $(MAKE) -C ../samples/Cpp/TestCpp/proj.$(PLATFORM) testcpp-clean: - $(MAKE) -C samples/Cpp/TestCpp/proj.$(PLATFORM) clean + $(MAKE) -C ../samples/Cpp/TestCpp/proj.$(PLATFORM) clean -simplegame: libcocos2dx - $(MAKE) -C samples/Cpp/SimpleGame/proj.$(PLATFORM) +simplegame: cocos2dx audio + $(MAKE) -C ../samples/Cpp/SimpleGame/proj.$(PLATFORM) simplegame-clean: - $(MAKE) -C samples/Cpp/SimpleGame/proj.$(PLATFORM) clean + $(MAKE) -C ../samples/Cpp/SimpleGame/proj.$(PLATFORM) clean -all: chipmunk cocosdenshion libextensions libcocos2dx lua hellocpp testcpp simplegame -clean: libcocos2dx-clean box2d-clean chipmunk-clean cocosdenshion-clean libextensions-clean lua-clean hellocpp-clean testcpp-clean simplegame-clean +all: chipmunk audio extensions cocos2dx lua hellocpp testcpp simplegame +clean: cocos2dx-clean box2d-clean chipmunk-clean audio-clean extensions-clean lua-clean hellocpp-clean testcpp-clean simplegame-clean -# Haven't yet got the lua projects working with emscripten -ifneq ($(PLATFORM),emscripten) - -hellolua: libcocos2dx lua - $(MAKE) -C samples/Lua/HelloLua/proj.$(PLATFORM) +hellolua: cocos2dx lua + $(MAKE) -C ../samples/Lua/HelloLua/proj.$(PLATFORM) hellolua-clean: - $(MAKE) -C samples/Lua/HelloLua/proj.$(PLATFORM) clean + $(MAKE) -C ../samples/Lua/HelloLua/proj.$(PLATFORM) clean -testlua: libcocos2dx lua - $(MAKE) -C samples/Lua/TestLua/proj.$(PLATFORM) +testlua: cocos2dx lua + $(MAKE) -C ../samples/Lua/TestLua/proj.$(PLATFORM) testlua-clean: - $(MAKE) -C samples/Lua/TestLua/proj.$(PLATFORM) clean + $(MAKE) -C ../samples/Lua/TestLua/proj.$(PLATFORM) clean all: hellolua testlua clean: hellolua-clean testlua-clean -endif .PHONY: all clean diff --git a/build/install-deps-linux.sh b/build/install-deps-linux.sh index f62c78a3e8..687b51926b 100755 --- a/build/install-deps-linux.sh +++ b/build/install-deps-linux.sh @@ -32,5 +32,5 @@ if [ -n "$MISSING" ]; then fi # install glfw -tools/travis-scripts/install_glfw.sh +../tools/travis-scripts/install_glfw.sh diff --git a/cocos/2d/Makefile b/cocos/2d/Makefile index fa3d1cb659..d88604b130 100644 --- a/cocos/2d/Makefile +++ b/cocos/2d/Makefile @@ -1,93 +1,83 @@ TARGET = libcocos2d.so -INCLUDES += \ - -I../platform/third_party/linux/libfreetype2 \ - -I../platform/third_party/common/etc \ - -I../platform/third_party/common/s3tc \ - -I../platform/third_party/common/atitc \ - -I../../extensions \ - -I../../extensions/CCBReader \ - -I../../extensions/GUI/CCControlExtension \ - -I../../extensions/GUI/CCControlExtension \ - -I../../external/chipmunk/include/chipmunk \ - -I../../extensions/network \ - -I../../extensions/Components +INCLUDES = -SOURCES = ../actions/CCAction.cpp \ -../actions/CCActionCamera.cpp \ -../actions/CCActionEase.cpp \ -../actions/CCActionGrid.cpp \ -../actions/CCActionGrid3D.cpp \ -../actions/CCActionInstant.cpp \ -../actions/CCActionInterval.cpp \ -../actions/CCActionManager.cpp \ -../actions/CCActionPageTurn3D.cpp \ -../actions/CCActionProgressTimer.cpp \ -../actions/CCActionTiledGrid.cpp \ -../actions/CCActionCatmullRom.cpp \ -../actions/CCActionTween.cpp \ -../base_nodes/CCAtlasNode.cpp \ -../base_nodes/CCNode.cpp \ -../cocoa/CCAffineTransform.cpp \ -../cocoa/CCAutoreleasePool.cpp \ -../cocoa/CCGeometry.cpp \ -../cocoa/CCNS.cpp \ -../cocoa/CCObject.cpp \ -../cocoa/CCSet.cpp \ -../cocoa/CCArray.cpp \ -../cocoa/CCDictionary.cpp \ -../cocoa/CCString.cpp \ -../cocoa/CCDataVisitor.cpp \ -../cocoa/CCData.cpp \ -../event_dispatcher/CCEventAcceleration.cpp \ -../event_dispatcher/CCEventListenerAcceleration.cpp \ -../event_dispatcher/CCEvent.cpp \ -../event_dispatcher/CCEventDispatcher.cpp \ -../event_dispatcher/CCEventListener.cpp \ -../event_dispatcher/CCEventKeyboard.cpp \ -../event_dispatcher/CCEventListenerKeyboard.cpp \ -../event_dispatcher/CCTouch.cpp \ -../event_dispatcher/CCEventTouch.cpp \ -../event_dispatcher/CCEventListenerTouch.cpp \ -../event_dispatcher/CCEventCustom.cpp \ -../event_dispatcher/CCEventListenerCustom.cpp \ -../draw_nodes/CCDrawingPrimitives.cpp \ -../draw_nodes/CCDrawNode.cpp \ -../effects/CCGrabber.cpp \ -../effects/CCGrid.cpp \ -../label_nodes/CCFont.cpp \ -../label_nodes/CCFontAtlas.cpp \ -../label_nodes/CCFontAtlasCache.cpp \ -../label_nodes/CCFontAtlasFactory.cpp \ -../label_nodes/CCFontDefinition.cpp \ -../label_nodes/CCFontFNT.cpp \ -../label_nodes/CCFontFreeType.cpp \ -../label_nodes/CCLabel.cpp \ -../label_nodes/CCLabelAtlas.cpp \ -../label_nodes/CCLabelBMFont.cpp \ -../label_nodes/CCLabelTTF.cpp \ -../label_nodes/CCLabelTextFormatter.cpp \ -../label_nodes/CCTextImage.cpp \ -../layers_scenes_transitions_nodes/CCLayer.cpp \ -../layers_scenes_transitions_nodes/CCScene.cpp \ -../layers_scenes_transitions_nodes/CCTransition.cpp \ -../layers_scenes_transitions_nodes/CCTransitionPageTurn.cpp \ -../layers_scenes_transitions_nodes/CCTransitionProgress.cpp \ -../menu_nodes/CCMenu.cpp \ -../menu_nodes/CCMenuItem.cpp \ -../misc_nodes/CCMotionStreak.cpp \ -../misc_nodes/CCProgressTimer.cpp \ -../misc_nodes/CCClippingNode.cpp \ -../misc_nodes/CCRenderTexture.cpp \ -../particle_nodes/CCParticleExamples.cpp \ -../particle_nodes/CCParticleSystem.cpp \ -../particle_nodes/CCParticleSystemQuad.cpp \ -../particle_nodes/CCParticleBatchNode.cpp \ -../physics/Box2D/CCPhysicsContactInfo.cpp \ -../physics/Box2D/CCPhysicsJointInfo.cpp \ -../physics/Box2D/CCPhysicsShapeInfo.cpp \ -../physics/Box2D/CCPhysicsBodyInfo.cpp \ -../physics/Box2D/CCPhysicsWorldInfo.cpp \ +SOURCES = \ +CCAction.cpp \ +CCActionCamera.cpp \ +CCActionEase.cpp \ +CCActionGrid.cpp \ +CCActionGrid3D.cpp \ +CCActionInstant.cpp \ +CCActionInterval.cpp \ +CCActionManager.cpp \ +CCActionPageTurn3D.cpp \ +CCActionProgressTimer.cpp \ +CCActionTiledGrid.cpp \ +CCActionCatmullRom.cpp \ +CCActionTween.cpp \ +CCAtlasNode.cpp \ +CCNode.cpp \ +../base/CCAffineTransform.cpp \ +../base/CCAutoreleasePool.cpp \ +../base/CCGeometry.cpp \ +../base/CCNS.cpp \ +../base/CCObject.cpp \ +../base/CCSet.cpp \ +../base/CCArray.cpp \ +../base/CCDictionary.cpp \ +../base/CCString.cpp \ +../base/CCDataVisitor.cpp \ +../base/CCData.cpp \ +CCEventAcceleration.cpp \ +CCEventListenerAcceleration.cpp \ +CCEvent.cpp \ +CCEventDispatcher.cpp \ +CCEventListener.cpp \ +CCEventKeyboard.cpp \ +CCEventListenerKeyboard.cpp \ +CCTouch.cpp \ +CCEventTouch.cpp \ +CCEventListenerTouch.cpp \ +CCEventCustom.cpp \ +CCEventListenerCustom.cpp \ +CCDrawingPrimitives.cpp \ +CCDrawNode.cpp \ +CCGrabber.cpp \ +CCGrid.cpp \ +CCFont.cpp \ +CCFontAtlas.cpp \ +CCFontAtlasCache.cpp \ +CCFontAtlasFactory.cpp \ +CCFontDefinition.cpp \ +CCFontFNT.cpp \ +CCFontFreeType.cpp \ +CCLabel.cpp \ +CCLabelAtlas.cpp \ +CCLabelBMFont.cpp \ +CCLabelTTF.cpp \ +CCLabelTextFormatter.cpp \ +CCTextImage.cpp \ +CCLayer.cpp \ +CCScene.cpp \ +CCTransition.cpp \ +CCTransitionPageTurn.cpp \ +CCTransitionProgress.cpp \ +CCMenu.cpp \ +CCMenuItem.cpp \ +CCMotionStreak.cpp \ +CCProgressTimer.cpp \ +CCClippingNode.cpp \ +CCRenderTexture.cpp \ +CCParticleExamples.cpp \ +CCParticleSystem.cpp \ +CCParticleSystemQuad.cpp \ +CCParticleBatchNode.cpp \ +../physics/box2d/CCPhysicsContactInfo.cpp \ +../physics/box2d/CCPhysicsJointInfo.cpp \ +../physics/box2d/CCPhysicsShapeInfo.cpp \ +../physics/box2d/CCPhysicsBodyInfo.cpp \ +../physics/box2d/CCPhysicsWorldInfo.cpp \ ../physics/chipmunk/CCPhysicsContactInfo.cpp \ ../physics/chipmunk/CCPhysicsJointInfo.cpp \ ../physics/chipmunk/CCPhysicsShapeInfo.cpp \ @@ -109,68 +99,68 @@ SOURCES = ../actions/CCAction.cpp \ ../platform/linux/CCEGLView.cpp \ ../platform/linux/CCImage.cpp \ ../platform/linux/CCDevice.cpp \ -../platform/third_party/common/etc/etc1.cpp \ -../platform/third_party/common/s3tc/s3tc.cpp \ -../platform/third_party/common/atitc/atitc.cpp \ -../script_support/CCScriptSupport.cpp \ -../sprite_nodes/CCAnimation.cpp \ -../sprite_nodes/CCAnimationCache.cpp \ -../sprite_nodes/CCSprite.cpp \ -../sprite_nodes/CCSpriteBatchNode.cpp \ -../sprite_nodes/CCSpriteFrame.cpp \ -../sprite_nodes/CCSpriteFrameCache.cpp \ -../support/ccUTF8.cpp \ -../support/CCProfiling.cpp \ -../support/user_default/CCUserDefault.cpp \ -../support/TransformUtils.cpp \ -../support/base64.cpp \ -../support/ccUtils.cpp \ -../support/CCVertex.cpp \ -../support/CCNotificationCenter.cpp \ -../support/image_support/TGAlib.cpp \ -../support/tinyxml2/tinyxml2.cpp \ -../support/zip_support/ZipUtils.cpp \ -../support/zip_support/ioapi.cpp \ -../support/zip_support/unzip.cpp \ -../support/data_support/ccCArray.cpp \ -../support/component/CCComponent.cpp \ -../support/component/CCComponentContainer.cpp \ -../text_input_node/CCIMEDispatcher.cpp \ -../text_input_node/CCTextFieldTTF.cpp \ -../textures/CCTexture2D.cpp \ -../textures/CCTextureAtlas.cpp \ -../textures/CCTextureCache.cpp \ -../tilemap_parallax_nodes/CCParallaxNode.cpp \ -../tilemap_parallax_nodes/CCTMXLayer.cpp \ -../tilemap_parallax_nodes/CCTMXObjectGroup.cpp \ -../tilemap_parallax_nodes/CCTMXTiledMap.cpp \ -../tilemap_parallax_nodes/CCTMXXMLParser.cpp \ -../tilemap_parallax_nodes/CCTileMapAtlas.cpp \ -../shaders/CCGLProgram.cpp \ -../shaders/ccGLStateCache.cpp \ -../shaders/CCShaderCache.cpp \ -../shaders/ccShaders.cpp \ -../kazmath/src/aabb.c \ -../kazmath/src/plane.c \ -../kazmath/src/vec2.c \ -../kazmath/src/mat3.c \ -../kazmath/src/quaternion.c \ -../kazmath/src/vec3.c \ -../kazmath/src/mat4.c \ -../kazmath/src/ray2.c \ -../kazmath/src/vec4.c \ -../kazmath/src/neon_matrix_impl.c \ -../kazmath/src/utility.c \ -../kazmath/src/GL/mat4stack.c \ -../kazmath/src/GL/matrix.c \ -../CCCamera.cpp \ -../CCConfiguration.cpp \ -../CCDirector.cpp \ -../CCScheduler.cpp \ -../ccFPSImages.c \ -../ccTypes.cpp \ -../cocos2d.cpp \ -../CCDeprecated.cpp +../base/etc1.cpp \ +../base/s3tc.cpp \ +../base/atitc.cpp \ +CCScriptSupport.cpp \ +CCAnimation.cpp \ +CCAnimationCache.cpp \ +CCSprite.cpp \ +CCSpriteBatchNode.cpp \ +CCSpriteFrame.cpp \ +CCSpriteFrameCache.cpp \ +ccUTF8.cpp \ +CCProfiling.cpp \ +CCUserDefault.cpp \ +TransformUtils.cpp \ +base64.cpp \ +ccUtils.cpp \ +CCVertex.cpp \ +CCNotificationCenter.cpp \ +TGAlib.cpp \ +../../external/tinyxml2/tinyxml2.cpp \ +ZipUtils.cpp \ +../../external/unzip/ioapi.cpp \ +../../external/unzip/unzip.cpp \ +ccCArray.cpp \ +CCComponent.cpp \ +CCComponentContainer.cpp \ +CCIMEDispatcher.cpp \ +CCTextFieldTTF.cpp \ +CCTexture2D.cpp \ +CCTextureAtlas.cpp \ +CCTextureCache.cpp \ +CCParallaxNode.cpp \ +CCTMXLayer.cpp \ +CCTMXObjectGroup.cpp \ +CCTMXTiledMap.cpp \ +CCTMXXMLParser.cpp \ +CCTileMapAtlas.cpp \ +CCGLProgram.cpp \ +ccGLStateCache.cpp \ +CCShaderCache.cpp \ +ccShaders.cpp \ +../math/kazmath/src/aabb.c \ +../math/kazmath/src/plane.c \ +../math/kazmath/src/vec2.c \ +../math/kazmath/src/mat3.c \ +../math/kazmath/src/quaternion.c \ +../math/kazmath/src/vec3.c \ +../math/kazmath/src/mat4.c \ +../math/kazmath/src/ray2.c \ +../math/kazmath/src/vec4.c \ +../math/kazmath/src/neon_matrix_impl.c \ +../math/kazmath/src/utility.c \ +../math/kazmath/src/GL/mat4stack.c \ +../math/kazmath/src/GL/matrix.c \ +CCCamera.cpp \ +CCConfiguration.cpp \ +CCDirector.cpp \ +CCScheduler.cpp \ +ccFPSImages.c \ +ccTypes.cpp \ +cocos2d.cpp \ +CCDeprecated.cpp COCOS_ROOT = ../.. @@ -189,10 +179,24 @@ $(TARGET): $(OBJECTS) $(CORE_MAKEFILE_LIST) @mkdir -p $(@D) $(LOG_LINK)$(CXX) $(CXXFLAGS) $(OBJECTS) -shared -o $@ $(SHAREDLIBS) $(STATICLIBS) $(LIBS) +$(OBJ_DIR)/%.o: %.cpp $(CORE_MAKEFILE_LIST) + @mkdir -p $(@D) + $(LOG_CXX)$(CXX) $(CXXFLAGS) $(INCLUDES) $(DEFINES) -c $< -o $@ + $(OBJ_DIR)/%.o: ../%.cpp $(CORE_MAKEFILE_LIST) @mkdir -p $(@D) $(LOG_CXX)$(CXX) $(CXXFLAGS) $(INCLUDES) $(DEFINES) -c $< -o $@ +$(OBJ_DIR)/%.o: ../../%.cpp $(CORE_MAKEFILE_LIST) + @mkdir -p $(@D) + $(LOG_CXX)$(CXX) $(CXXFLAGS) $(INCLUDES) $(DEFINES) -c $< -o $@ + +$(OBJ_DIR)/%.o: %.c $(CORE_MAKEFILE_LIST) + @mkdir -p $(@D) + $(LOG_CC)$(CC) $(CCFLAGS) $(INCLUDES) $(DEFINES) -c $< -o $@ + $(OBJ_DIR)/%.o: ../%.c $(CORE_MAKEFILE_LIST) @mkdir -p $(@D) $(LOG_CC)$(CC) $(CCFLAGS) $(INCLUDES) $(DEFINES) -c $< -o $@ + + diff --git a/cocos/2d/cocos2dx.mk b/cocos/2d/cocos2dx.mk index 0058e43bac..41ef87b631 100644 --- a/cocos/2d/cocos2dx.mk +++ b/cocos/2d/cocos2dx.mk @@ -45,28 +45,30 @@ THIS_MAKEFILE := $(CURDIR)/$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) ifndef COCOS_ROOT COCOS_ROOT := $(realpath $(dir $(THIS_MAKEFILE))/../..) endif -COCOS_SRC = $(COCOS_ROOT)/cocos2dx +COCOS_SRC = $(COCOS_ROOT)/cocos/2d OBJ_DIR ?= obj LIB_DIR = $(COCOS_ROOT)/lib/linux BIN_DIR = bin INCLUDES += \ - -I$(COCOS_SRC) \ - -I$(COCOS_SRC)/cocoa \ - -I$(COCOS_SRC)/include \ - -I$(COCOS_SRC)/kazmath/include \ + -I$(COCOS_SRC)/ \ + -I$(COCOS_SRC)/../math/kazmath/include \ -I$(COCOS_SRC)/platform/linux \ - -I$(COCOS_SRC)/platform/third_party/linux/libjpeg \ - -I$(COCOS_SRC)/platform/third_party/linux/libtiff \ - -I$(COCOS_SRC)/platform/third_party/linux/libwebp + -I$(COCOS_SRC)/../../external/jpeg/include/linux \ + -I$(COCOS_SRC)/../../external/tiff/include/linux \ + -I$(COCOS_SRC)/../../external/webp/include/linux \ + -I$(COCOS_SRC)/../../external/tinyxml2 \ + -I$(COCOS_SRC)/../../external/unzip \ + -I$(COCOS_SRC)/../../external/glfw3/include/linux \ + -I$(COCOS_SRC)/../physics \ + -I$(COCOS_SRC)/../base \ + -I$(COCOS_SRC)/../../external/chipmunk/include/chipmunk \ + -I$(COCOS_SRC)/../../external/freetype2/include/linux \ + -I$(COCOS_SRC)/../.. \ + -I$(COCOS_SRC)/../audio/include LBITS := $(shell getconf LONG_BIT) -ifeq ($(LBITS),64) -INCLUDES += -I$(COCOS_SRC)/platform/third_party/linux/include64 -else -INCLUDES += -I$(COCOS_SRC)/platform/third_party/linux -endif ifeq ($(DEBUG), 1) CCFLAGS += -g3 -O0 @@ -100,22 +102,23 @@ DEPS = $(OBJECTS:.o=.d) CORE_MAKEFILE_LIST := $(MAKEFILE_LIST) -include $(DEPS) +STATICLIBS_DIR = $(COCOS_ROOT)/external ifeq ($(LBITS),64) -STATICLIBS_DIR = $(COCOS_SRC)/platform/third_party/linux/libraries/lib64 +POSTFIX = 64-bit else -STATICLIBS_DIR = $(COCOS_SRC)/platform/third_party/linux/libraries +POSTFIX = 32-bit endif -STATICLIBS = $(STATICLIBS_DIR)/libfreetype.a \ - $(STATICLIBS_DIR)/libjpeg.a \ - $(STATICLIBS_DIR)/libtiff.a \ - $(STATICLIBS_DIR)/libwebp.a +STATICLIBS = $(STATICLIBS_DIR)/freetype2/prebuilt/linux/$(POSTFIX)/libfreetype.a \ + $(STATICLIBS_DIR)/jpeg/prebuilt/linux/$(POSTFIX)/libjpeg.a \ + $(STATICLIBS_DIR)/tiff/prebuilt/linux/$(POSTFIX)/libtiff.a \ + $(STATICLIBS_DIR)/webp/prebuilt/linux/$(POSTFIX)/libwebp.a ifneq ($(OPENAL),1) ifeq ($(LBITS),64) -FMOD_LIBDIR = $(COCOS_ROOT)/audio/third_party/fmod/lib64/api/lib +FMOD_LIBDIR = $(COCOS_ROOT)/cocos/audio/third-party/fmod/lib64/api/lib SHAREDLIBS += -lfmodex64 else -FMOD_LIBDIR = $(COCOS_ROOT)/audio/third_party/fmod/api/lib +FMOD_LIBDIR = $(COCOS_ROOT)/cocos/audio/third-party/fmod/api/lib SHAREDLIBS += -lfmodex endif endif diff --git a/cocos/2d/platform/linux/CCEGLView.cpp b/cocos/2d/platform/linux/CCEGLView.cpp index 452d5738a3..561fedcca8 100644 --- a/cocos/2d/platform/linux/CCEGLView.cpp +++ b/cocos/2d/platform/linux/CCEGLView.cpp @@ -10,7 +10,7 @@ #include "ccMacros.h" #include "CCDirector.h" #include "CCTouch.h" -#include "/CCIMEDispatcher.h" +#include "CCIMEDispatcher.h" #include "CCEventDispatcher.h" #include "CCEventKeyboard.h" #include diff --git a/cocos/2d/platform/linux/CCEGLView.h b/cocos/2d/platform/linux/CCEGLView.h index 9d29d9c188..ed4fc18245 100644 --- a/cocos/2d/platform/linux/CCEGLView.h +++ b/cocos/2d/platform/linux/CCEGLView.h @@ -11,7 +11,7 @@ #include "platform/CCCommon.h" #include "CCGeometry.h" #include "platform/CCEGLViewProtocol.h" -#include "platform/third_party/linux/glfw/glfw3.h" +#include "glfw3.h" #include bool initExtensions(); diff --git a/cocos/audio/proj.linux/Makefile b/cocos/audio/proj.linux/Makefile index 82dc89a6d6..e8b18e3972 100644 --- a/cocos/audio/proj.linux/Makefile +++ b/cocos/audio/proj.linux/Makefile @@ -1,6 +1,6 @@ TARGET = libcocosdenshion.so -INCLUDES += -I.. -I../include +INCLUDES = -I.. -I../include ##Using OpenAL ifeq ($(OPENAL),1) @@ -26,15 +26,15 @@ SOURCES = \ ../linux/FmodAudioPlayer.cpp ifeq ($(LBITS),64) -INCLUDES += -I../third_party/fmod/lib64/api/inc +INCLUDES += -I../third-party/fmod/lib64/api/inc else -INCLUDES += -I../third_party/fmod/api/inc +INCLUDES += -I../third-party/fmod/api/inc endif endif -COCOS_ROOT = ../.. -include $(COCOS_ROOT)/cocos2dx/proj.linux/cocos2dx.mk +COCOS_ROOT = ../../.. +include $(COCOS_ROOT)/cocos/2d/cocos2dx.mk TARGET := $(LIB_DIR)/$(TARGET) diff --git a/cocos/editor-support/cocosbuilder/Makefile b/cocos/editor-support/cocosbuilder/Makefile new file mode 100644 index 0000000000..688c5d49d5 --- /dev/null +++ b/cocos/editor-support/cocosbuilder/Makefile @@ -0,0 +1,44 @@ +TARGET = libcocosbuilder.a + +INCLUDES = + +SOURCES = CCBFileLoader.cpp \ +CCMenuItemImageLoader.cpp \ +CCBReader.cpp \ +CCMenuItemLoader.cpp \ +CCControlButtonLoader.cpp \ +CCNodeLoader.cpp \ +CCControlLoader.cpp \ +CCNodeLoaderLibrary.cpp \ +CCLabelBMFontLoader.cpp \ +CCParticleSystemQuadLoader.cpp \ +CCLabelTTFLoader.cpp \ +CCScale9SpriteLoader.cpp \ +CCLayerColorLoader.cpp \ +CCScrollViewLoader.cpp \ +CCLayerGradientLoader.cpp \ +CCSpriteLoader.cpp \ +CCLayerLoader.cpp \ +CCBAnimationManager.cpp \ +CCBKeyframe.cpp \ +CCBSequence.cpp \ +CCBSequenceProperty.cpp \ +CCBValue.cpp \ +CCNode+CCBRelativePositioning.cpp + +include ../../2d/cocos2dx.mk + +CXXFLAGS += -Wno-multichar + +TARGET := $(LIB_DIR)/$(TARGET) + +all: $(TARGET) + +$(TARGET): $(OBJECTS) $(CORE_MAKEFILE_LIST) + @mkdir -p $(@D) + $(LOG_AR)$(AR) $(ARFLAGS) $@ $(OBJECTS) + +$(OBJ_DIR)/%.o: %.cpp $(CORE_MAKEFILE_LIST) + @mkdir -p $(@D) + $(LOG_CXX)$(CXX) $(CXXFLAGS) $(INCLUDES) $(DEFINES) -c $< -o $@ + diff --git a/cocos/editor-support/cocostudio/Makefile b/cocos/editor-support/cocostudio/Makefile new file mode 100644 index 0000000000..810c28372e --- /dev/null +++ b/cocos/editor-support/cocostudio/Makefile @@ -0,0 +1,69 @@ +TARGET = libcocostudio.a + +COCOS_ROOT=../../.. + +INCLUDES = -I../../2d \ +-I../../../external \ +-I.. \ +-I../.. \ + +SOURCES = 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 \ +CCTweenFunction.cpp \ +CCUtilMath.cpp \ +CCComAttribute.cpp \ +CCComAudio.cpp \ +CCComController.cpp \ +CCComRender.cpp \ +CCInputDelegate.cpp \ +CSContentJsonDictionary.cpp \ +DictionaryHelper.cpp \ +CCSGUIReader.cpp \ +CCSSceneReader.cpp \ +../../../external/json/json_reader.cpp \ +../../../external/json/json_value.cpp \ +../../../external/json/json_writer.cpp + +include ../../2d/cocos2dx.mk + +CXXFLAGS += -Wno-multichar + +TARGET := $(LIB_DIR)/$(TARGET) + +all: $(TARGET) + +$(TARGET): $(OBJECTS) $(CORE_MAKEFILE_LIST) + @mkdir -p $(@D) + $(LOG_AR)$(AR) $(ARFLAGS) $@ $(OBJECTS) + +$(OBJ_DIR)/%.o: %.cpp $(CORE_MAKEFILE_LIST) + @mkdir -p $(@D) + $(LOG_CXX)$(CXX) $(CXXFLAGS) $(INCLUDES) $(DEFINES) -c $< -o $@ + +$(OBJ_DIR)/%.o: ../../../%.cpp $(CORE_MAKEFILE_LIST) + @mkdir -p $(@D) + $(LOG_CXX)$(CXX) $(CXXFLAGS) $(INCLUDES) $(DEFINES) -c $< -o $@ + +$(OBJ_DIR)/%.o: %.c $(CORE_MAKEFILE_LIST) + @mkdir -p $(@D) + $(LOG_CC)$(CC) $(CCFLAGS) $(INCLUDES) $(DEFINES) -c $< -o $@ diff --git a/cocos/editor-support/spine/Makefile b/cocos/editor-support/spine/Makefile new file mode 100644 index 0000000000..88514a824e --- /dev/null +++ b/cocos/editor-support/spine/Makefile @@ -0,0 +1,42 @@ +TARGET = libspine.a + +INCLUDES = -I.. + +SOURCES = Animation.cpp \ +AnimationState.cpp \ +AnimationStateData.cpp \ +Atlas.cpp \ +AtlasAttachmentLoader.cpp \ +Attachment.cpp \ +AttachmentLoader.cpp \ +Bone.cpp \ +BoneData.cpp \ +Json.cpp \ +RegionAttachment.cpp \ +Skeleton.cpp \ +SkeletonData.cpp \ +SkeletonJson.cpp \ +Skin.cpp \ +Slot.cpp \ +SlotData.cpp \ +extension.cpp \ +spine-cocos2dx.cpp \ +CCSkeleton.cpp \ +CCSkeletonAnimation.cpp + +include ../../2d/cocos2dx.mk + +CXXFLAGS += -Wno-multichar + +TARGET := $(LIB_DIR)/$(TARGET) + +all: $(TARGET) + +$(TARGET): $(OBJECTS) $(CORE_MAKEFILE_LIST) + @mkdir -p $(@D) + $(LOG_AR)$(AR) $(ARFLAGS) $@ $(OBJECTS) + +$(OBJ_DIR)/%.o: %.cpp $(CORE_MAKEFILE_LIST) + @mkdir -p $(@D) + $(LOG_CXX)$(CXX) $(CXXFLAGS) $(INCLUDES) $(DEFINES) -c $< -o $@ + diff --git a/cocos/gui/Layout.cpp b/cocos/gui/Layout.cpp index b7014ac1ed..a9e4f75a30 100644 --- a/cocos/gui/Layout.cpp +++ b/cocos/gui/Layout.cpp @@ -22,7 +22,7 @@ THE SOFTWARE. ****************************************************************************/ -#include "gui/layout.h" +#include "gui/Layout.h" #include "gui/UILayer.h" #include "gui/UIHelper.h" #include "extensions/GUI/CCControlExtension/CCScale9Sprite.h" @@ -782,4 +782,4 @@ bool RectClippingNode::isEnabled() const return _enabled; } -} \ No newline at end of file +} diff --git a/cocos/gui/Makefile b/cocos/gui/Makefile new file mode 100644 index 0000000000..0e8501cc63 --- /dev/null +++ b/cocos/gui/Makefile @@ -0,0 +1,44 @@ +TARGET = libgui.a + +INCLUDES = -I../ \ +-I../editor-support \ +-I../../external + +SOURCES = UIRootWidget.cpp \ +UIWidget.cpp \ +Layout.cpp \ +LayoutParameter.cpp \ +UILayoutDefine.cpp \ +CocosGUI.cpp \ +UIHelper.cpp \ +UIInputManager.cpp \ +UILayer.cpp \ +UIDragPanel.cpp \ +UIListView.cpp \ +UIPageView.cpp \ +UIScrollView.cpp \ +UIButton.cpp \ +UICheckBox.cpp \ +UIImageView.cpp \ +UILabel.cpp \ +UILabelAtlas.cpp \ +UILabelBMFont.cpp \ +UILoadingBar.cpp \ +UISlider.cpp \ +UITextField.cpp + +include ../2d/cocos2dx.mk + +CXXFLAGS += -Wno-multichar + +TARGET := $(LIB_DIR)/$(TARGET) + +all: $(TARGET) + +$(TARGET): $(OBJECTS) $(CORE_MAKEFILE_LIST) + @mkdir -p $(@D) + $(LOG_AR)$(AR) $(ARFLAGS) $@ $(OBJECTS) + +$(OBJ_DIR)/%.o: %.cpp $(CORE_MAKEFILE_LIST) + @mkdir -p $(@D) + $(LOG_CXX)$(CXX) $(CXXFLAGS) $(INCLUDES) $(DEFINES) -c $< -o $@ diff --git a/cocos/network/Makefile b/cocos/network/Makefile new file mode 100644 index 0000000000..029078722d --- /dev/null +++ b/cocos/network/Makefile @@ -0,0 +1,22 @@ +TARGET = libnetwork.a + +INCLUDES = -I.. + +SOURCES = HttpClient.cpp \ +SocketIO.cpp + +include ../2d/cocos2dx.mk + +CXXFLAGS += -Wno-multichar + +TARGET := $(LIB_DIR)/$(TARGET) + +all: $(TARGET) + +$(TARGET): $(OBJECTS) $(CORE_MAKEFILE_LIST) + @mkdir -p $(@D) + $(LOG_AR)$(AR) $(ARFLAGS) $@ $(OBJECTS) + +$(OBJ_DIR)/%.o: %.cpp $(CORE_MAKEFILE_LIST) + @mkdir -p $(@D) + $(LOG_CXX)$(CXX) $(CXXFLAGS) $(INCLUDES) $(DEFINES) -c $< -o $@ diff --git a/cocos/physics/CCPhysicsBody.cpp b/cocos/physics/CCPhysicsBody.cpp index 2dc38bf286..2fb6c4458b 100644 --- a/cocos/physics/CCPhysicsBody.cpp +++ b/cocos/physics/CCPhysicsBody.cpp @@ -37,16 +37,16 @@ #include "CCPhysicsWorld.h" #include "chipmunk/CCPhysicsBodyInfo.h" -#include "Box2D/CCPhysicsBodyInfo.h" +#include "box2d/CCPhysicsBodyInfo.h" #include "chipmunk/CCPhysicsJointInfo.h" -#include "Box2D/CCPhysicsJointInfo.h" +#include "box2d/CCPhysicsJointInfo.h" #include "chipmunk/CCPhysicsWorldInfo.h" -#include "Box2D/CCPhysicsWorldInfo.h" +#include "box2d/CCPhysicsWorldInfo.h" #include "chipmunk/CCPhysicsShapeInfo.h" -#include "Box2D/CCPhysicsShapeInfo.h" +#include "box2d/CCPhysicsShapeInfo.h" #include "chipmunk/CCPhysicsHelper.h" -#include "Box2D/CCPhysicsHelper.h" +#include "box2d/CCPhysicsHelper.h" NS_CC_BEGIN diff --git a/cocos/physics/CCPhysicsContact.cpp b/cocos/physics/CCPhysicsContact.cpp index 928c8c9e59..1ec9667d6f 100644 --- a/cocos/physics/CCPhysicsContact.cpp +++ b/cocos/physics/CCPhysicsContact.cpp @@ -31,7 +31,7 @@ #endif #include "chipmunk/CCPhysicsContactInfo.h" -#include "Box2D/CCPhysicsContactInfo.h" +#include "box2d/CCPhysicsContactInfo.h" NS_CC_BEGIN diff --git a/cocos/physics/CCPhysicsJoint.cpp b/cocos/physics/CCPhysicsJoint.cpp index 63b6ac052e..b2742720e4 100644 --- a/cocos/physics/CCPhysicsJoint.cpp +++ b/cocos/physics/CCPhysicsJoint.cpp @@ -34,11 +34,11 @@ #include "CCPhysicsBody.h" #include "chipmunk/CCPhysicsJointInfo.h" -#include "Box2D/CCPhysicsJointInfo.h" +#include "box2d/CCPhysicsJointInfo.h" #include "chipmunk/CCPhysicsBodyInfo.h" -#include "Box2D/CCPhysicsBodyInfo.h" +#include "box2d/CCPhysicsBodyInfo.h" #include "chipmunk/CCPhysicsHelper.h" -#include "Box2D/CCPhysicsHelper.h" +#include "box2d/CCPhysicsHelper.h" NS_CC_BEGIN diff --git a/cocos/physics/CCPhysicsShape.cpp b/cocos/physics/CCPhysicsShape.cpp index b373e0710e..15e0a82ca0 100644 --- a/cocos/physics/CCPhysicsShape.cpp +++ b/cocos/physics/CCPhysicsShape.cpp @@ -35,9 +35,9 @@ #include "CCPhysicsWorld.h" #include "chipmunk/CCPhysicsBodyInfo.h" -#include "Box2D/CCPhysicsBodyInfo.h" +#include "box2d/CCPhysicsBodyInfo.h" #include "chipmunk/CCPhysicsShapeInfo.h" -#include "Box2D/CCPhysicsShapeInfo.h" +#include "box2d/CCPhysicsShapeInfo.h" #include "chipmunk/CCPhysicsHelper.h" NS_CC_BEGIN @@ -518,4 +518,4 @@ bool PhysicsShapeEdgeChain::init(Point* points, int count, PhysicsMaterial mater NS_CC_END -#endif // CC_USE_PHYSICS \ No newline at end of file +#endif // CC_USE_PHYSICS diff --git a/cocos/physics/CCPhysicsWorld.cpp b/cocos/physics/CCPhysicsWorld.cpp index 1777a395f0..11859579ac 100644 --- a/cocos/physics/CCPhysicsWorld.cpp +++ b/cocos/physics/CCPhysicsWorld.cpp @@ -37,15 +37,15 @@ #include "CCPhysicsJoint.h" #include "chipmunk/CCPhysicsWorldInfo.h" -#include "Box2D/CCPhysicsWorldInfo.h" +#include "box2d/CCPhysicsWorldInfo.h" #include "chipmunk/CCPhysicsBodyInfo.h" -#include "Box2D/CCPhysicsBodyInfo.h" +#include "box2d/CCPhysicsBodyInfo.h" #include "chipmunk/CCPhysicsShapeInfo.h" -#include "Box2D/CCPhysicsShapeInfo.h" +#include "box2d/CCPhysicsShapeInfo.h" #include "chipmunk/CCPhysicsContactInfo.h" -#include "Box2D/CCPhysicsContactInfo.h" +#include "box2d/CCPhysicsContactInfo.h" #include "chipmunk/CCPhysicsJointInfo.h" -#include "Box2D/CCPhysicsJointInfo.h" +#include "box2d/CCPhysicsJointInfo.h" #include "chipmunk/CCPhysicsHelper.h" #include "CCDrawNode.h" diff --git a/cocos/scripting/lua/bindings/Makefile b/cocos/scripting/lua/bindings/Makefile index 1aaa6c897e..95145d5fbc 100644 --- a/cocos/scripting/lua/bindings/Makefile +++ b/cocos/scripting/lua/bindings/Makefile @@ -1,64 +1,72 @@ TARGET = liblua.so -INCLUDES += -I.. -I../lua -I../tolua -I../cocos2dx_support -I../../auto-generated/lua-bindings \ - -I../Classes -I../../../audio/include -I../../../extensions -I../../../external/chipmunk/include/chipmunk +INCLUDES += -I../../../../external/lua/tolua \ +-I../../../../external/lua/lua \ +-I../../auto-generated/lua-bindings \ +-I../../../../extensions \ +-I../../../editor-support \ +-I. \ +-I../../../editor-support/cocosbuilder \ +-I../../../editor-support/cocostudio \ +-I../../../../external \ +-I../../../ -SOURCES = ../lua/lapi.c \ - ../lua/lauxlib.c \ - ../lua/lbaselib.c \ - ../lua/lcode.c \ - ../lua/ldblib.c \ - ../lua/ldebug.c \ - ../lua/ldo.c \ - ../lua/ldump.c \ - ../lua/lfunc.c \ - ../lua/lgc.c \ - ../lua/linit.c \ - ../lua/liolib.c \ - ../lua/llex.c \ - ../lua/lmathlib.c \ - ../lua/lmem.c \ - ../lua/loadlib.c \ - ../lua/lobject.c \ - ../lua/lopcodes.c \ - ../lua/loslib.c \ - ../lua/lparser.c \ - ../lua/lstate.c \ - ../lua/lstring.c \ - ../lua/lstrlib.c \ - ../lua/ltable.c \ - ../lua/ltablib.c \ - ../lua/ltm.c \ - ../lua/lundump.c \ - ../lua/lvm.c \ - ../lua/lzio.c \ - ../lua/print.c \ - ../tolua/tolua_event.c \ - ../tolua/tolua_is.c \ - ../tolua/tolua_map.c \ - ../tolua/tolua_push.c \ - ../tolua/tolua_to.c \ - ../cocos2dx_support/tolua_fix.c \ +SOURCES = ../../../../external/lua/lua/lapi.c \ + ../../../../external/lua/lua/lauxlib.c \ + ../../../../external/lua/lua/lbaselib.c \ + ../../../../external/lua/lua/lcode.c \ + ../../../../external/lua/lua/ldblib.c \ + ../../../../external/lua/lua/ldebug.c \ + ../../../../external/lua/lua/ldo.c \ + ../../../../external/lua/lua/ldump.c \ + ../../../../external/lua/lua/lfunc.c \ + ../../../../external/lua/lua/lgc.c \ + ../../../../external/lua/lua/linit.c \ + ../../../../external/lua/lua/liolib.c \ + ../../../../external/lua/lua/llex.c \ + ../../../../external/lua/lua/lmathlib.c \ + ../../../../external/lua/lua/lmem.c \ + ../../../../external/lua/lua/loadlib.c \ + ../../../../external/lua/lua/lobject.c \ + ../../../../external/lua/lua/lopcodes.c \ + ../../../../external/lua/lua/loslib.c \ + ../../../../external/lua/lua/lparser.c \ + ../../../../external/lua/lua/lstate.c \ + ../../../../external/lua/lua/lstring.c \ + ../../../../external/lua/lua/lstrlib.c \ + ../../../../external/lua/lua/ltable.c \ + ../../../../external/lua/lua/ltablib.c \ + ../../../../external/lua/lua/ltm.c \ + ../../../../external/lua/lua/lundump.c \ + ../../../../external/lua/lua/lvm.c \ + ../../../../external/lua/lua/lzio.c \ + ../../../../external/lua/lua/print.c \ + ../../../../external/lua/tolua/tolua_event.c \ + ../../../../external/lua/tolua/tolua_is.c \ + ../../../../external/lua/tolua/tolua_map.c \ + ../../../../external/lua/tolua/tolua_push.c \ + ../../../../external/lua/tolua/tolua_to.c \ + tolua_fix.c \ ../../auto-generated/lua-bindings/lua_cocos2dx_auto.cpp \ ../../auto-generated/lua-bindings/lua_cocos2dx_extension_auto.cpp \ - ../cocos2dx_support/CCLuaBridge.cpp \ - ../cocos2dx_support/CCLuaEngine.cpp \ - ../cocos2dx_support/CCLuaStack.cpp \ - ../cocos2dx_support/CCLuaValue.cpp \ - ../cocos2dx_support/Cocos2dxLuaLoader.cpp \ - ../cocos2dx_support/CCBProxy.cpp \ - ../cocos2dx_support/LuaOpengl.cpp \ - ../cocos2dx_support/LuaScriptHandlerMgr.cpp \ - ../cocos2dx_support/LuaBasicConversions.cpp \ - ../cocos2dx_support/lua_cocos2dx_manual.cpp \ - ../cocos2dx_support/lua_cocos2dx_extension_manual.cpp \ - ../cocos2dx_support/lua_cocos2dx_deprecated.cpp + CCLuaBridge.cpp \ + CCLuaEngine.cpp \ + CCLuaStack.cpp \ + CCLuaValue.cpp \ + Cocos2dxLuaLoader.cpp \ + CCBProxy.cpp \ + LuaOpengl.cpp \ + LuaScriptHandlerMgr.cpp \ + LuaBasicConversions.cpp \ + lua_cocos2dx_manual.cpp \ + lua_cocos2dx_extension_manual.cpp \ + lua_cocos2dx_deprecated.cpp -include ../../../cocos2dx/proj.linux/cocos2dx.mk +include ../../../2d/cocos2dx.mk TARGET := $(LIB_DIR)/$(TARGET) -SHAREDLIBS += -lextension +SHAREDLIBS += -lextension -lcocostudio -lcocosbuilder STATICLIBS += $(LIB_DIR)/libbox2d.a all: $(TARGET) @@ -67,14 +75,18 @@ $(TARGET): $(OBJECTS) $(CORE_MAKEFILE_LIST) @mkdir -p $(@D) $(LOG_LINK)$(CXX) $(CXXFLAGS) $(OBJECTS) -shared -o $@ $(SHAREDLIBS) $(STATICLIBS) +$(OBJ_DIR)/%.o: %.cpp $(CORE_MAKEFILE_LIST) + @mkdir -p $(@D) + $(LOG_CXX)$(CXX) $(CXXFLAGS) $(INCLUDES) $(DEFINES) -c $< -o $@ + $(OBJ_DIR)/%.o: ../../%.cpp $(CORE_MAKEFILE_LIST) @mkdir -p $(@D) $(LOG_CXX)$(CXX) $(CXXFLAGS) $(INCLUDES) $(DEFINES) -c $< -o $@ -$(OBJ_DIR)/%.o: ../%.cpp $(CORE_MAKEFILE_LIST) - @mkdir -p $(@D) - $(LOG_CXX)$(CXX) $(CXXFLAGS) $(INCLUDES) $(DEFINES) -c $< -o $@ - -$(OBJ_DIR)/%.o: ../%.c $(CORE_MAKEFILE_LIST) +$(OBJ_DIR)/%.o: ../../../../%.c $(CORE_MAKEFILE_LIST) + @mkdir -p $(@D) + $(LOG_CC)$(CC) $(CCFLAGS) $(INCLUDES) $(DEFINES) -c $< -o $@ + +$(OBJ_DIR)/%.o: %.c $(CORE_MAKEFILE_LIST) @mkdir -p $(@D) $(LOG_CC)$(CC) $(CCFLAGS) $(INCLUDES) $(DEFINES) -c $< -o $@ diff --git a/extensions/proj.linux/Makefile b/extensions/proj.linux/Makefile index 6565ee9b94..fe07e988e5 100644 --- a/extensions/proj.linux/Makefile +++ b/extensions/proj.linux/Makefile @@ -1,146 +1,36 @@ TARGET = libextension.a -COCOS_ROOT=../.. +INCLUDES = -I.. -INCLUDES = -I$(COCOS_ROOT)/external \ - -I$(COCOS_ROOT)/external/chipmunk/include/chipmunk \ - -I$(COCOS_ROOT)/audio/include \ - -I.. \ - -I../CCBReader \ - -I../GUI/CCControlExtension \ - -I../GUI/CCEditBox \ - -I../network \ - -I../CocoStudio/Components \ - -I../CocoStudio/Armature +SOURCES = \ +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/CCEditBoxImplTizen.cpp \ +GUI/CCEditBox/CCEditBoxImplWin.cpp \ +GUI/CCScrollView/CCScrollView.cpp \ +GUI/CCScrollView/CCSorting.cpp \ +GUI/CCScrollView/CCTableView.cpp \ +GUI/CCScrollView/CCTableViewCell.cpp \ +physics-nodes/CCPhysicsDebugNode.cpp \ +physics-nodes/CCPhysicsSprite.cpp -SOURCES = ../CCBReader/CCBFileLoader.cpp \ -../CCBReader/CCMenuItemImageLoader.cpp \ -../CCBReader/CCBReader.cpp \ -../CCBReader/CCMenuItemLoader.cpp \ -../CCBReader/CCControlButtonLoader.cpp \ -../CCBReader/CCNodeLoader.cpp \ -../CCBReader/CCControlLoader.cpp \ -../CCBReader/CCNodeLoaderLibrary.cpp \ -../CCBReader/CCLabelBMFontLoader.cpp \ -../CCBReader/CCParticleSystemQuadLoader.cpp \ -../CCBReader/CCLabelTTFLoader.cpp \ -../CCBReader/CCScale9SpriteLoader.cpp \ -../CCBReader/CCLayerColorLoader.cpp \ -../CCBReader/CCScrollViewLoader.cpp \ -../CCBReader/CCLayerGradientLoader.cpp \ -../CCBReader/CCSpriteLoader.cpp \ -../CCBReader/CCLayerLoader.cpp \ -../CCBReader/CCBAnimationManager.cpp \ -../CCBReader/CCBKeyframe.cpp \ -../CCBReader/CCBSequence.cpp \ -../CCBReader/CCBSequenceProperty.cpp \ -../CCBReader/CCBValue.cpp \ -../CCBReader/CCNode+CCBRelativePositioning.cpp \ -../GUI/CCScrollView/CCScrollView.cpp \ -../GUI/CCScrollView/CCSorting.cpp \ -../GUI/CCScrollView/CCTableView.cpp \ -../GUI/CCScrollView/CCTableViewCell.cpp \ -../GUI/CCControlExtension/CCControlButton.cpp \ -../GUI/CCControlExtension/CCControlColourPicker.cpp \ -../GUI/CCControlExtension/CCControl.cpp \ -../GUI/CCControlExtension/CCControlHuePicker.cpp \ -../GUI/CCControlExtension/CCControlSaturationBrightnessPicker.cpp \ -../GUI/CCControlExtension/CCControlSlider.cpp \ -../GUI/CCControlExtension/CCControlSwitch.cpp \ -../GUI/CCControlExtension/CCControlUtils.cpp \ -../GUI/CCControlExtension/CCInvocation.cpp \ -../GUI/CCControlExtension/CCScale9Sprite.cpp \ -../GUI/CCControlExtension/CCControlPotentiometer.cpp \ -../GUI/CCControlExtension/CCControlStepper.cpp \ -../GUI/CCEditBox/CCEditBox.cpp \ -../GUI/CCEditBox/CCEditBoxImplNone.cpp \ -../network/HttpClient.cpp \ -../physics_nodes/CCPhysicsDebugNode.cpp \ -../physics_nodes/CCPhysicsSprite.cpp \ -../CocoStudio/Armature/CCArmature.cpp \ -../CocoStudio/Armature/CCBone.cpp \ -../CocoStudio/Armature/animation/CCArmatureAnimation.cpp \ -../CocoStudio/Armature/animation/CCProcessBase.cpp \ -../CocoStudio/Armature/animation/CCTween.cpp \ -../CocoStudio/Armature/datas/CCDatas.cpp \ -../CocoStudio/Armature/display/CCBatchNode.cpp \ -../CocoStudio/Armature/display/CCDecorativeDisplay.cpp \ -../CocoStudio/Armature/display/CCDisplayFactory.cpp \ -../CocoStudio/Armature/display/CCDisplayManager.cpp \ -../CocoStudio/Armature/display/CCSkin.cpp \ -../CocoStudio/Armature/physics/CCColliderDetector.cpp \ -../CocoStudio/Armature/utils/CCArmatureDefine.cpp \ -../CocoStudio/Armature/utils/CCArmatureDataManager.cpp \ -../CocoStudio/Armature/utils/CCDataReaderHelper.cpp \ -../CocoStudio/Armature/utils/CCSpriteFrameCacheHelper.cpp \ -../CocoStudio/Armature/utils/CCTransformHelp.cpp \ -../CocoStudio/Armature/utils/CCTweenFunction.cpp \ -../CocoStudio/Armature/utils/CCUtilMath.cpp \ -../CocoStudio/Components/CCComAttribute.cpp \ -../CocoStudio/Components/CCComAudio.cpp \ -../CocoStudio/Components/CCComController.cpp \ -../CocoStudio/Components/CCComRender.cpp \ -../CocoStudio/Components/CCInputDelegate.cpp \ -../CocoStudio/GUI/BaseClasses/UIRootWidget.cpp \ -../CocoStudio/GUI/BaseClasses/UIWidget.cpp \ -../CocoStudio/GUI/Layouts/Layout.cpp \ -../CocoStudio/GUI/Layouts/LayoutParameter.cpp \ -../CocoStudio/GUI/Layouts/UILayoutDefine.cpp \ -../CocoStudio/GUI/System/CocosGUI.cpp \ -../CocoStudio/GUI/System/UIHelper.cpp \ -../CocoStudio/GUI/System/UIInputManager.cpp \ -../CocoStudio/GUI/System/UILayer.cpp \ -../CocoStudio/GUI/UIWidgets/UIButton.cpp \ -../CocoStudio/GUI/UIWidgets/UICheckBox.cpp \ -../CocoStudio/GUI/UIWidgets/UIImageView.cpp \ -../CocoStudio/GUI/UIWidgets/UILabel.cpp \ -../CocoStudio/GUI/UIWidgets/UILabelAtlas.cpp \ -../CocoStudio/GUI/UIWidgets/UILabelBMFont.cpp \ -../CocoStudio/GUI/UIWidgets/UILoadingBar.cpp \ -../CocoStudio/GUI/UIWidgets/UISlider.cpp \ -../CocoStudio/GUI/UIWidgets/UITextField.cpp \ -../CocoStudio/GUI/UIWidgets/ScrollWidget/UIDragPanel.cpp \ -../CocoStudio/GUI/UIWidgets/ScrollWidget/UIListView.cpp \ -../CocoStudio/GUI/UIWidgets/ScrollWidget/UIPageView.cpp \ -../CocoStudio/GUI/UIWidgets/ScrollWidget/UIScrollView.cpp \ -../CocoStudio/Json/CSContentJsonDictionary.cpp \ -../CocoStudio/Json/DictionaryHelper.cpp \ -../CocoStudio/Json/lib_json/json_reader.cpp \ -../CocoStudio/Json/lib_json/json_value.cpp \ -../CocoStudio/Json/lib_json/json_writer.cpp \ -../CocoStudio/Reader/CCSGUIReader.cpp \ -../CocoStudio/Reader/CCSSceneReader.cpp \ -../CocoStudio/Action/CCActionFrame.cpp \ -../CocoStudio/Action/CCActionFrameEasing.cpp \ -../CocoStudio/Action/CCActionManagerEx.cpp \ -../CocoStudio/Action/CCActionNode.cpp \ -../CocoStudio/Action/CCActionObject.cpp \ -../spine/Animation.cpp \ -../spine/AnimationState.cpp \ -../spine/AnimationStateData.cpp \ -../spine/Atlas.cpp \ -../spine/AtlasAttachmentLoader.cpp \ -../spine/Attachment.cpp \ -../spine/AttachmentLoader.cpp \ -../spine/Bone.cpp \ -../spine/BoneData.cpp \ -../spine/Json.cpp \ -../spine/RegionAttachment.cpp \ -../spine/Skeleton.cpp \ -../spine/SkeletonData.cpp \ -../spine/SkeletonJson.cpp \ -../spine/Skin.cpp \ -../spine/Slot.cpp \ -../spine/SlotData.cpp \ -../spine/extension.cpp \ -../spine/spine-cocos2dx.cpp \ -../spine/CCSkeleton.cpp \ -../spine/CCSkeletonAnimation.cpp \ -../CCDeprecated-ext.cpp +include ../../cocos/2d/cocos2dx.mk -include $(COCOS_ROOT)/cocos2dx/proj.linux/cocos2dx.mk - -CXXFLAGS += -Wno-multichar +CXXFLAGS += -Wno-multichar -Wno-unused-result TARGET := $(LIB_DIR)/$(TARGET) diff --git a/extensions/proj.linux/extensions.prf b/extensions/proj.linux/extensions.prf deleted file mode 100644 index d399b91272..0000000000 --- a/extensions/proj.linux/extensions.prf +++ /dev/null @@ -1,20 +0,0 @@ -################################################################################ -# Do not include this file in your project: see cocos2dx.pri. -################################################################################ - -linux { - # We will compile extensions on demand using Makefile. - build_extension.name = Build extension static library - build_extension.input = $$PWD/Makefile - build_extension.output = $$CC_LIBRARY_DIR/libextension.a - build_extension.target = $$CC_LIBRARY_DIR/libextension.a - build_extension.CONFIG = no_link target_predeps - build_extension.commands = cd $$PWD && make $$CC_MAKE_FLAGS - - QMAKE_EXTRA_COMPILERS += build_extension - QMAKE_EXTRA_TARGETS += build_extension - - PRE_TARGETDEPS += $$CC_LIBRARY_DIR/libextension.a - LIBS += -Wl,-Bstatic -lextension -Wl,-Bdynamic -} - diff --git a/external/Box2D/proj.linux/Makefile b/external/Box2D/proj.linux/Makefile index e430bc9883..b43814ccef 100644 --- a/external/Box2D/proj.linux/Makefile +++ b/external/Box2D/proj.linux/Makefile @@ -46,7 +46,7 @@ SOURCES = ../Collision/Shapes/b2ChainShape.cpp \ ../Dynamics/b2WorldCallbacks.cpp \ ../Rope/b2Rope.cpp -include ../../../cocos2dx/proj.linux/cocos2dx.mk +include ../../../cocos/2d/cocos2dx.mk INCLUDES = -I../.. diff --git a/external/chipmunk/proj.linux/Makefile b/external/chipmunk/proj.linux/Makefile index b0e5d1f572..a2cb985b7c 100644 --- a/external/chipmunk/proj.linux/Makefile +++ b/external/chipmunk/proj.linux/Makefile @@ -28,7 +28,7 @@ SOURCES = ../src/chipmunk.c \ ../src/constraints/cpSlideJoint.c \ ../src/constraints/cpPinJoint.c \ -include ../../../cocos2dx/proj.linux/cocos2dx.mk +include ../../../cocos/2d/cocos2dx.mk TARGET = $(LIB_DIR)/libchipmunk.a INCLUDES = -I../include/chipmunk diff --git a/samples/Cpp/HelloCpp/proj.linux/Makefile b/samples/Cpp/HelloCpp/proj.linux/Makefile index 178fa06a86..0548290a52 100644 --- a/samples/Cpp/HelloCpp/proj.linux/Makefile +++ b/samples/Cpp/HelloCpp/proj.linux/Makefile @@ -7,7 +7,7 @@ SOURCES = main.cpp \ ../Classes/HelloWorldScene.cpp COCOS_ROOT = ../../../.. -include $(COCOS_ROOT)/cocos2dx/proj.linux/cocos2dx.mk +include $(COCOS_ROOT)/cocos/2d/cocos2dx.mk SHAREDLIBS += -lcocos2d COCOS_LIBS = $(LIB_DIR)/libcocos2d.so diff --git a/samples/Cpp/SimpleGame/proj.linux/Makefile b/samples/Cpp/SimpleGame/proj.linux/Makefile index 61485ebb7f..9204555b28 100644 --- a/samples/Cpp/SimpleGame/proj.linux/Makefile +++ b/samples/Cpp/SimpleGame/proj.linux/Makefile @@ -8,11 +8,10 @@ SOURCES = main.cpp \ ../Classes/GameOverScene.cpp COCOS_ROOT = ../../../.. -include $(COCOS_ROOT)/cocos2dx/proj.linux/cocos2dx.mk +include $(COCOS_ROOT)/cocos/2d/cocos2dx.mk SHAREDLIBS += -lcocos2d -lcocosdenshion -COCOS_LIBS = $(LIB_DIR)/libcocos2d.so $(LIB_DIR)/libcocosdenshion.so -INCLUDES += -I$(COCOS_ROOT)/audio/include +INCLUDES += -I$(COCOS_ROOT)/cocos/audio/include $(TARGET): $(OBJECTS) $(STATICLIBS) $(COCOS_LIBS) $(CORE_MAKEFILE_LIST) @mkdir -p $(@D) diff --git a/samples/Cpp/TestCpp/proj.linux/Makefile b/samples/Cpp/TestCpp/proj.linux/Makefile index 4dda11cafe..ea1051612c 100644 --- a/samples/Cpp/TestCpp/proj.linux/Makefile +++ b/samples/Cpp/TestCpp/proj.linux/Makefile @@ -2,6 +2,11 @@ EXECUTABLE = TestCpp DEFINES += -DCC_KEYBOARD_SUPPORT +INCLUDES = -I../../../../external \ + -I../../../../cocos/editor-support \ + -I../../../../cocos \ + -I../Classes + SOURCES = ../Classes/AccelerometerTest/AccelerometerTest.cpp \ ../Classes/ActionManagerTest/ActionManagerTest.cpp \ ../Classes/ActionsEaseTest/ActionsEaseTest.cpp \ @@ -135,22 +140,19 @@ SOURCES = ../Classes/AccelerometerTest/AccelerometerTest.cpp \ SHAREDLIBS = -lcocos2d -lcocosdenshion -lcurl -lpng COCOS_LIBS = $(LIB_DIR)/libcocos2d.so $(LIB_DIR)/libcocosdenshion.so -include ../../../../cocos2dx/proj.linux/cocos2dx.mk - -INCLUDES += -I../ \ - -I../../ \ - -I../Classes \ - -I$(COCOS_ROOT)/audio/include \ - -I$(COCOS_ROOT)/extensions/ \ - -I$(COCOS_ROOT)/external/ \ - -I$(COCOS_ROOT)/external/chipmunk/include/chipmunk +include ../../../../cocos/2d/cocos2dx.mk STATICLIBS += \ - $(STATICLIBS_DIR)/libcurl.a \ + $(STATICLIBS_DIR)/curl/prebuilt/linux/$(POSTFIX)/libcurl.a \ $(LIB_DIR)/libextension.a \ $(LIB_DIR)/libbox2d.a \ - $(LIB_DIR)/libchipmunk.a + $(LIB_DIR)/libchipmunk.a \ + $(LIB_DIR)/libgui.a \ + $(LIB_DIR)/libcocosbuilder.a \ + $(LIB_DIR)/libspine.a \ + $(LIB_DIR)/libcocostudio.a \ + $(LIB_DIR)/libnetwork.a ####### Build rules $(TARGET): $(OBJECTS) $(STATICLIBS) $(COCOS_LIBS) $(CORE_MAKEFILE_LIST) diff --git a/samples/Lua/HelloLua/proj.linux/Makefile b/samples/Lua/HelloLua/proj.linux/Makefile index 1ebb038045..6a0ddf230c 100644 --- a/samples/Lua/HelloLua/proj.linux/Makefile +++ b/samples/Lua/HelloLua/proj.linux/Makefile @@ -1,28 +1,22 @@ EXECUTABLE = HelloLua COCOS_ROOT = ../../../.. -INCLUDES = -I../ -I../Classes -I$(COCOS_ROOT)/audio/include \ - -I$(COCOS_ROOT)/scripting/lua/lua \ - -I$(COCOS_ROOT)/scripting/lua/tolua \ - -I$(COCOS_ROOT)/scripting/lua/cocos2dx_support \ - -I$(COCOS_ROOT)/extensions \ +INCLUDES = -I../Classes \ + -I$(COCOS_ROOT)/audio/include \ + -I$(COCOS_ROOT)/cocos/scripting/lua/bindings \ + -I$(COCOS_ROOT)/external/lua/lua SOURCES = main.cpp ../Classes/AppDelegate.cpp SHAREDLIBS += -lcocos2d -lcocosdenshion -llua -lextension -COCOS_LIBS = $(LIB_DIR)/libcocos2d.so $(LIB_DIR)/libcocosdenshion.so $(LIB_DIR)/liblua.so -include $(COCOS_ROOT)/cocos2dx/proj.linux/cocos2dx.mk +include $(COCOS_ROOT)/cocos/2d/cocos2dx.mk $(TARGET): $(OBJECTS) $(STATICLIBS) $(COCOS_LIBS) $(CORE_MAKEFILE_LIST) @mkdir -p $(@D) - cp -n ../../../../scripting/lua/script/* ../../../../samples/Lua/HelloLua/Resources + cp -n ../../../../cocos/scripting/lua/script/* ../../../../samples/Lua/HelloLua/Resources $(LOG_LINK)$(CXX) $(CXXFLAGS) $(OBJECTS) -o $@ $(SHAREDLIBS) $(STATICLIBS) $(LIBS) $(OBJ_DIR)/%.o: ../%.cpp $(CORE_MAKEFILE_LIST) @mkdir -p $(@D) $(LOG_CXX)$(CXX) $(CXXFLAGS) $(INCLUDES) $(DEFINES) $(VISIBILITY) -c $< -o $@ - -$(OBJ_DIR)/%.o: %.cpp $(CORE_MAKEFILE_LIST) - @mkdir -p $(@D) - $(LOG_CXX)$(CXX) $(CXXFLAGS) $(INCLUDES) $(DEFINES) $(VISIBILITY) -c $< -o $@ diff --git a/samples/Lua/TestLua/proj.linux/Makefile b/samples/Lua/TestLua/proj.linux/Makefile index a23cc6dda4..5151716394 100644 --- a/samples/Lua/TestLua/proj.linux/Makefile +++ b/samples/Lua/TestLua/proj.linux/Makefile @@ -1,22 +1,22 @@ EXECUTABLE = TestLua COCOS_ROOT = ../../../.. -INCLUDES = -I../ -I../Classes -I$(COCOS_ROOT)/audio/include \ - -I$(COCOS_ROOT)/scripting/lua/lua \ - -I$(COCOS_ROOT)/scripting/lua/tolua \ - -I$(COCOS_ROOT)/scripting/lua/cocos2dx_support +INCLUDES = -I../Classes \ + -I$(COCOS_ROOT)/audio/include \ + -I$(COCOS_ROOT)/cocos/scripting/lua/bindings \ + -I$(COCOS_ROOT)/external/lua/lua -SOURCES = main.cpp ../Classes/AppDelegate.cpp +SOURCES = main.cpp \ +../Classes/AppDelegate.cpp SHAREDLIBS += -lcocos2d -lcocosdenshion -llua -COCOS_LIBS = $(LIB_DIR)/libcocos2d.so $(LIB_DIR)/libcocosdenshion.so $(LIB_DIR)/liblua.so -include $(COCOS_ROOT)/cocos2dx/proj.linux/cocos2dx.mk +include $(COCOS_ROOT)/cocos/2d/cocos2dx.mk $(TARGET): $(OBJECTS) $(STATICLIBS) $(COCOS_LIBS) $(CORE_MAKEFILE_LIST) @mkdir -p $(@D) cp -R -n ../../../../samples/Cpp/TestCpp/Resources ../../../../samples/Lua/TestLua - cp -n ../../../../scripting/lua/script/* ../../../../samples/Lua/TestLua/Resources + cp -n ../../../../cocos/scripting/lua/script/* ../../../../samples/Lua/TestLua/Resources $(LOG_LINK)$(CXX) $(CXXFLAGS) $(OBJECTS) -o $@ $(SHAREDLIBS) $(STATICLIBS) $(LIBS) $(OBJ_DIR)/%.o: ../%.cpp $(CORE_MAKEFILE_LIST) From 3252a8979138bcd7bbada264d733474a6561854f Mon Sep 17 00:00:00 2001 From: Dhilan007 Date: Tue, 22 Oct 2013 18:11:07 +0800 Subject: [PATCH 2/2] issues #2905:add SimpleGame vs-project --- .../SimpleGame/proj.win32/SimpleGame.vcxproj | 151 ++++++++++++++++++ .../proj.win32/SimpleGame.vcxproj.filters | 41 +++++ .../proj.win32/SimpleGame.vcxproj.user | 11 ++ samples/Cpp/SimpleGame/proj.win32/main.cpp | 20 +++ samples/Cpp/SimpleGame/proj.win32/main.h | 13 ++ 5 files changed, 236 insertions(+) create mode 100644 samples/Cpp/SimpleGame/proj.win32/SimpleGame.vcxproj create mode 100644 samples/Cpp/SimpleGame/proj.win32/SimpleGame.vcxproj.filters create mode 100644 samples/Cpp/SimpleGame/proj.win32/SimpleGame.vcxproj.user create mode 100644 samples/Cpp/SimpleGame/proj.win32/main.cpp create mode 100644 samples/Cpp/SimpleGame/proj.win32/main.h diff --git a/samples/Cpp/SimpleGame/proj.win32/SimpleGame.vcxproj b/samples/Cpp/SimpleGame/proj.win32/SimpleGame.vcxproj new file mode 100644 index 0000000000..cb3c74751e --- /dev/null +++ b/samples/Cpp/SimpleGame/proj.win32/SimpleGame.vcxproj @@ -0,0 +1,151 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {E0E282F4-8487-452C-BFAB-CB960EB4D22F} + SimpleGame + Win32Proj + + + + Application + Unicode + true + v100 + v110 + v110_xp + + + Application + Unicode + v100 + v110 + v110_xp + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)$(Configuration).win32\ + $(Configuration).win32\ + true + $(SolutionDir)$(Configuration).win32\ + $(Configuration).win32\ + false + AllRules.ruleset + + + AllRules.ruleset + + + + + $(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\lib;$(LibraryPath) + + + $(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\lib;$(LibraryPath) + + + + Disabled + ..\Classes;$(EngineRoot)cocos\audio\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_WINDOWS;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + EditAndContinue + 4267;4251;4244;%(DisableSpecificWarnings) + + + $(OutDir)$(ProjectName).exe + $(OutDir);%(AdditionalLibraryDirectories) + true + Windows + MachineX86 + libcocos2d.lib;libchipmunk.lib;%(AdditionalDependencies) + + + + + + + + + MaxSpeed + true + ..\Classes;$(EngineRoot)cocos\audio\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + MultiThreadedDLL + true + + + Level3 + ProgramDatabase + 4267;4251;4244;%(DisableSpecificWarnings) + + + libcocos2d.lib;%(AdditionalDependencies) + $(OutDir)$(ProjectName).exe + $(OutDir);%(AdditionalLibraryDirectories) + true + Windows + true + true + MachineX86 + + + + + + + + + + + + + + + + + + + + + {98a51ba8-fc3a-415b-ac8f-8c7bd464e93e} + false + + + {f8edd7fa-9a51-4e80-baeb-860825d2eac6} + + + {207bc7a9-ccf1-4f2f-a04d-45f72242ae25} + + + + + + \ No newline at end of file diff --git a/samples/Cpp/SimpleGame/proj.win32/SimpleGame.vcxproj.filters b/samples/Cpp/SimpleGame/proj.win32/SimpleGame.vcxproj.filters new file mode 100644 index 0000000000..cf39562aaa --- /dev/null +++ b/samples/Cpp/SimpleGame/proj.win32/SimpleGame.vcxproj.filters @@ -0,0 +1,41 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + + + Classes + + + Classes + + + win32 + + + Classes + + + + + Classes + + + Classes + + + win32 + + + Classes + + + \ No newline at end of file diff --git a/samples/Cpp/SimpleGame/proj.win32/SimpleGame.vcxproj.user b/samples/Cpp/SimpleGame/proj.win32/SimpleGame.vcxproj.user new file mode 100644 index 0000000000..32a6296820 --- /dev/null +++ b/samples/Cpp/SimpleGame/proj.win32/SimpleGame.vcxproj.user @@ -0,0 +1,11 @@ + + + + $(ProjectDir)..\Resources + WindowsLocalDebugger + + + $(ProjectDir)..\Resources + WindowsLocalDebugger + + \ No newline at end of file diff --git a/samples/Cpp/SimpleGame/proj.win32/main.cpp b/samples/Cpp/SimpleGame/proj.win32/main.cpp new file mode 100644 index 0000000000..d819bb02e0 --- /dev/null +++ b/samples/Cpp/SimpleGame/proj.win32/main.cpp @@ -0,0 +1,20 @@ +#include "main.h" +#include "../Classes/AppDelegate.h" +#include "CCEGLView.h" + +USING_NS_CC; + +int APIENTRY _tWinMain(HINSTANCE hInstance, + HINSTANCE hPrevInstance, + LPTSTR lpCmdLine, + int nCmdShow) +{ + UNREFERENCED_PARAMETER(hPrevInstance); + UNREFERENCED_PARAMETER(lpCmdLine); + + // create the application instance + AppDelegate app; + EGLView eglView; + eglView.init("SimpleGame",900,640); + return Application::getInstance()->run(); +} diff --git a/samples/Cpp/SimpleGame/proj.win32/main.h b/samples/Cpp/SimpleGame/proj.win32/main.h new file mode 100644 index 0000000000..e74708bdf2 --- /dev/null +++ b/samples/Cpp/SimpleGame/proj.win32/main.h @@ -0,0 +1,13 @@ +#ifndef __MAIN_H__ +#define __MAIN_H__ + +#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers + +// Windows Header Files: +#include +#include + +// C RunTime Header Files +#include "CCStdC.h" + +#endif // __MAIN_H__