2013-03-02 01:09:58 +08:00
|
|
|
DEFINES += -DCC_ENABLE_BOX2D_INTEGRATION
|
|
|
|
|
|
|
|
COCOS_ROOT = ../../../..
|
|
|
|
COCOS2DX_PATH = $(COCOS_ROOT)/cocos2dx
|
|
|
|
|
|
|
|
INCLUDES = -I.. -I../Classes \
|
|
|
|
-I$(COCOS_ROOT)/CocosDenshion/include \
|
|
|
|
-I$(COCOS_ROOT)/extensions \
|
|
|
|
-I$(COCOS_ROOT)/external \
|
|
|
|
-I$(COCOS_ROOT)/external/chipmunk/include/chipmunk \
|
|
|
|
|
|
|
|
SOURCES = ../Classes/AccelerometerTest/AccelerometerTest.cpp \
|
|
|
|
../Classes/ActionManagerTest/ActionManagerTest.cpp \
|
|
|
|
../Classes/ActionsEaseTest/ActionsEaseTest.cpp \
|
|
|
|
../Classes/ActionsProgressTest/ActionsProgressTest.cpp \
|
|
|
|
../Classes/ActionsTest/ActionsTest.cpp \
|
|
|
|
../Classes/Box2DTest/Box2dTest.cpp \
|
|
|
|
../Classes/Box2DTestBed/Box2dView.cpp \
|
|
|
|
../Classes/Box2DTestBed/GLES-Render.cpp \
|
|
|
|
../Classes/Box2DTestBed/Test.cpp \
|
|
|
|
../Classes/Box2DTestBed/TestEntries.cpp \
|
|
|
|
../Classes/BugsTest/Bug-1159.cpp \
|
|
|
|
../Classes/BugsTest/Bug-1174.cpp \
|
|
|
|
../Classes/BugsTest/Bug-350.cpp \
|
|
|
|
../Classes/BugsTest/Bug-422.cpp \
|
|
|
|
../Classes/BugsTest/Bug-458/Bug-458.cpp \
|
|
|
|
../Classes/BugsTest/Bug-458/QuestionContainerSprite.cpp \
|
|
|
|
../Classes/BugsTest/Bug-624.cpp \
|
|
|
|
../Classes/BugsTest/Bug-886.cpp \
|
|
|
|
../Classes/BugsTest/Bug-899.cpp \
|
|
|
|
../Classes/BugsTest/Bug-914.cpp \
|
|
|
|
../Classes/BugsTest/BugsTest.cpp \
|
|
|
|
../Classes/ChipmunkTest/ChipmunkTest.cpp \
|
|
|
|
../Classes/ClickAndMoveTest/ClickAndMoveTest.cpp \
|
|
|
|
../Classes/ClippingNodeTest/ClippingNodeTest.cpp \
|
|
|
|
../Classes/CocosDenshionTest/CocosDenshionTest.cpp \
|
|
|
|
../Classes/CurrentLanguageTest/CurrentLanguageTest.cpp \
|
|
|
|
../Classes/DrawPrimitivesTest/DrawPrimitivesTest.cpp \
|
|
|
|
../Classes/EffectsAdvancedTest/EffectsAdvancedTest.cpp \
|
|
|
|
../Classes/EffectsTest/EffectsTest.cpp \
|
|
|
|
../Classes/ExtensionsTest/CocosBuilderTest/ButtonTest/ButtonTestLayer.cpp \
|
|
|
|
../Classes/ExtensionsTest/CocosBuilderTest/CocosBuilderTest.cpp \
|
|
|
|
../Classes/ExtensionsTest/CocosBuilderTest/HelloCocosBuilder/HelloCocosBuilderLayer.cpp \
|
|
|
|
../Classes/ExtensionsTest/CocosBuilderTest/AnimationsTest/AnimationsTestLayer.cpp \
|
|
|
|
../Classes/ExtensionsTest/CocosBuilderTest/MenuTest/MenuTestLayer.cpp \
|
|
|
|
../Classes/ExtensionsTest/CocosBuilderTest/TestHeader/TestHeaderLayer.cpp \
|
|
|
|
../Classes/ExtensionsTest/ControlExtensionTest/CCControlButtonTest/CCControlButtonTest.cpp \
|
|
|
|
../Classes/ExtensionsTest/ControlExtensionTest/CCControlColourPicker/CCControlColourPickerTest.cpp \
|
|
|
|
../Classes/ExtensionsTest/ControlExtensionTest/CCControlScene.cpp \
|
|
|
|
../Classes/ExtensionsTest/ControlExtensionTest/CCControlSceneManager.cpp \
|
|
|
|
../Classes/ExtensionsTest/ControlExtensionTest/CCControlSliderTest/CCControlSliderTest.cpp \
|
|
|
|
../Classes/ExtensionsTest/ControlExtensionTest/CCControlSwitchTest/CCControlSwitchTest.cpp \
|
|
|
|
../Classes/ExtensionsTest/ControlExtensionTest/CCControlPotentiometerTest/CCControlPotentiometerTest.cpp \
|
|
|
|
../Classes/ExtensionsTest/ControlExtensionTest/CCControlStepperTest/CCControlStepperTest.cpp \
|
|
|
|
../Classes/ExtensionsTest/TableViewTest/TableViewTestScene.cpp \
|
|
|
|
../Classes/ExtensionsTest/TableViewTest/CustomTableViewCell.cpp \
|
|
|
|
../Classes/ExtensionsTest/ExtensionsTest.cpp \
|
|
|
|
../Classes/ExtensionsTest/NotificationCenterTest/NotificationCenterTest.cpp \
|
|
|
|
../Classes/FileUtilsTest/FileUtilsTest.cpp \
|
|
|
|
../Classes/FontTest/FontTest.cpp \
|
|
|
|
../Classes/IntervalTest/IntervalTest.cpp \
|
|
|
|
../Classes/KeypadTest/KeypadTest.cpp \
|
|
|
|
../Classes/LabelTest/LabelTest.cpp \
|
|
|
|
../Classes/LayerTest/LayerTest.cpp \
|
|
|
|
../Classes/MenuTest/MenuTest.cpp \
|
|
|
|
../Classes/MotionStreakTest/MotionStreakTest.cpp \
|
|
|
|
../Classes/MutiTouchTest/MutiTouchTest.cpp \
|
|
|
|
../Classes/NodeTest/NodeTest.cpp \
|
|
|
|
../Classes/ParallaxTest/ParallaxTest.cpp \
|
|
|
|
../Classes/ParticleTest/ParticleTest.cpp \
|
|
|
|
../Classes/PerformanceTest/PerformanceNodeChildrenTest.cpp \
|
|
|
|
../Classes/PerformanceTest/PerformanceParticleTest.cpp \
|
|
|
|
../Classes/PerformanceTest/PerformanceSpriteTest.cpp \
|
|
|
|
../Classes/PerformanceTest/PerformanceTest.cpp \
|
|
|
|
../Classes/PerformanceTest/PerformanceTextureTest.cpp \
|
|
|
|
../Classes/PerformanceTest/PerformanceTouchesTest.cpp \
|
|
|
|
../Classes/RenderTextureTest/RenderTextureTest.cpp \
|
|
|
|
../Classes/RotateWorldTest/RotateWorldTest.cpp \
|
|
|
|
../Classes/SceneTest/SceneTest.cpp \
|
|
|
|
../Classes/SchedulerTest/SchedulerTest.cpp \
|
|
|
|
../Classes/ShaderTest/ShaderTest.cpp \
|
|
|
|
../Classes/SpriteTest/SpriteTest.cpp \
|
|
|
|
../Classes/TextInputTest/TextInputTest.cpp \
|
|
|
|
../Classes/Texture2dTest/Texture2dTest.cpp \
|
|
|
|
../Classes/TextureCacheTest/TextureCacheTest.cpp \
|
|
|
|
../Classes/TileMapTest/TileMapTest.cpp \
|
|
|
|
../Classes/TouchesTest/Ball.cpp \
|
|
|
|
../Classes/TouchesTest/Paddle.cpp \
|
|
|
|
../Classes/TouchesTest/TouchesTest.cpp \
|
|
|
|
../Classes/TransitionsTest/TransitionsTest.cpp \
|
|
|
|
../Classes/UserDefaultTest/UserDefaultTest.cpp \
|
|
|
|
../Classes/ZwoptexTest/ZwoptexTest.cpp \
|
|
|
|
../Classes/controller.cpp \
|
|
|
|
../Classes/testBasic.cpp \
|
|
|
|
../Classes/AppDelegate.cpp \
|
|
|
|
../Classes/VisibleRect.cpp \
|
|
|
|
main.cpp
|
|
|
|
|
|
|
|
include $(COCOS2DX_PATH)/../extensions/proj.nacl/Makefile
|
|
|
|
SOURCES += $(addprefix $(COCOS_ROOT)/extensions/, $(EXTENSIONS_SOURCES))
|
|
|
|
|
|
|
|
include $(COCOS_ROOT)/cocos2dx/proj.nacl/cocos2dx.mk
|
|
|
|
|
2013-03-05 02:19:50 +08:00
|
|
|
CXXFLAGS += -Wno-multichar
|
|
|
|
|
2013-03-02 01:09:58 +08:00
|
|
|
SHAREDLIBS += -lchipmunk -lbox2d
|
|
|
|
|
|
|
|
APP_NAME = TestCpp
|
|
|
|
TARGET = $(BIN_DIR)/$(APP_NAME)_$(NACL_ARCH).nexe
|
|
|
|
NMF = $(BIN_DIR)/$(APP_NAME).nmf
|
|
|
|
|
|
|
|
all: $(NMF)
|
|
|
|
|
2013-03-05 02:19:50 +08:00
|
|
|
$(TARGET): $(OBJECTS) $(LIB_DIR)/libcocos2d.a $(LIB_DIR)/libcocosdenshion.a $(CORE_MAKEFILE_LIST)
|
2013-03-02 01:09:58 +08:00
|
|
|
@mkdir -p $(@D)
|
2013-03-05 02:19:50 +08:00
|
|
|
$(LOG_LINK)$(NACL_CXX) $(CXXFLAGS) $(LDFLAGS) $(OBJECTS) -o $@ $(SHAREDLIBS) $(STATICLIBS)
|
2013-03-02 01:09:58 +08:00
|
|
|
|
2013-03-05 02:19:50 +08:00
|
|
|
$(OBJ_DIR)/%.o: ../%.cpp $(CORE_MAKEFILE_LIST)
|
2013-03-02 01:09:58 +08:00
|
|
|
@mkdir -p $(@D)
|
2013-03-05 02:19:50 +08:00
|
|
|
$(LOG_CXX)$(NACL_CXX) -MMD $(CXXFLAGS) $(INCLUDES) $(DEFINES) -c $< -o $@
|
2013-03-02 01:09:58 +08:00
|
|
|
|
2013-03-05 02:19:50 +08:00
|
|
|
$(OBJ_DIR)/%.o: ../../../../%.cpp $(CORE_MAKEFILE_LIST)
|
2013-03-02 01:09:58 +08:00
|
|
|
@mkdir -p $(@D)
|
2013-03-05 02:19:50 +08:00
|
|
|
$(LOG_CXX)$(NACL_CXX) -MMD $(CXXFLAGS) $(INCLUDES) $(DEFINES) -c $< -o $@
|
2013-03-02 01:09:58 +08:00
|
|
|
|
2013-03-05 02:19:50 +08:00
|
|
|
$(OBJ_DIR)/%.o: %.cpp $(CORE_MAKEFILE_LIST)
|
2013-03-02 01:09:58 +08:00
|
|
|
@mkdir -p $(@D)
|
2013-03-05 02:19:50 +08:00
|
|
|
$(LOG_CXX)$(NACL_CXX) -MMD $(CXXFLAGS) $(INCLUDES) $(DEFINES) -c $< -o $@
|
2013-03-02 01:09:58 +08:00
|
|
|
|
2013-03-05 02:19:50 +08:00
|
|
|
$(OBJ_DIR)/%.o: ../%.c $(CORE_MAKEFILE_LIST)
|
2013-03-02 01:09:58 +08:00
|
|
|
@mkdir -p $(@D)
|
2013-03-05 02:19:50 +08:00
|
|
|
$(LOG_CC)$(NACL_CC) -MMD $(CCFLAGS) $(INCLUDES) $(DEFINES) -c $< -o $@
|
2013-03-02 01:09:58 +08:00
|
|
|
|
|
|
|
$(NMF): $(TARGET)
|
|
|
|
$(NACL_SDK_ROOT)/tools/create_nmf.py -o $@ $(BIN_DIR)/*.nexe --objdump=i686-nacl-objdump -L$(NACL_SDK_ROOT)/toolchain/linux_x86_newlib/x86_64-nacl/lib/ -s $(BIN_DIR)
|
|
|
|
|
|
|
|
PACKAGE_ROOT = $(OUT_DIR)/package
|
|
|
|
|
|
|
|
package: all
|
|
|
|
rm -rf $(PACKAGE_ROOT)
|
|
|
|
mkdir -p $(PACKAGE_ROOT)
|
|
|
|
/bin/cp -ar ../Resources/ $(PACKAGE_ROOT)
|
|
|
|
/bin/cp -ar $(BIN_DIR)/* $(PACKAGE_ROOT)
|
|
|
|
/bin/cp res/*.js res/icon*.png res/manifest.json $(PACKAGE_ROOT)
|
|
|
|
/bin/cp res/package_index.html $(PACKAGE_ROOT)/index.html
|
|
|
|
|
|
|
|
zipfile: package
|
|
|
|
cd $(PACKAGE_ROOT) && zip -r ../$(APP_NAME).zip .
|
|
|
|
|
|
|
|
run: all
|
|
|
|
/bin/cp -ar ../Resources/ .
|
|
|
|
$(NACL_SDK_ROOT)/tools/httpd.py --no_dir_check
|
|
|
|
|
2013-03-05 02:19:50 +08:00
|
|
|
.PHONY: run zipfile package
|