EXECUTABLE = TestCpp 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/CocosBuilderTest/TimelineCallbackTest/TimelineCallbackTestLayer.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/ExtensionsTest/NetworkTest/HttpClientTest.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/FileUtilsTest/FileUtilsTest.cpp \ ../Classes/controller.cpp \ ../Classes/testBasic.cpp \ ../Classes/AppDelegate.cpp \ ../Classes/VisibleRect.cpp \ main.cpp RESOURCE_PATH = ../Resources RESOURCES = \ Hello.png \ Images/Comet.png \ Images/Fog.png \ Images/HelloWorld.png \ Images/Icon.png \ Images/Pea.png \ Images/PlanetCute-1024x1024.png \ Images/SendScoreButton.png \ Images/SendScoreButtonPressed.png \ Images/SpinningPeas.png \ Images/SpookyPeas.png \ Images/arrows.png \ Images/arrowsBar.png \ Images/atlastest.png \ Images/b1.png \ Images/b2.png \ Images/background.png \ Images/background1.jpg \ Images/background1.png \ Images/background2.jpg \ Images/background2.png \ Images/background3.jpg \ Images/background3.png \ Images/ball.png \ Images/bitmapFontTest3.fnt \ Images/bitmapFontTest3.png \ Images/blocks.png \ Images/btn-about-normal.png \ Images/btn-about-selected.png \ Images/btn-highscores-normal.png \ Images/btn-highscores-selected.png \ Images/btn-play-normal.png \ Images/btn-play-selected.png \ Images/bugs/RetinaDisplay.jpg \ Images/bugs/bug886.jpg \ Images/bugs/bug886.png \ Images/bugs/circle.plist \ Images/bugs/circle.png \ Images/bugs/corner.png \ Images/bugs/edge.png \ Images/bugs/fill.png \ Images/bugs/picture.png \ Images/close.png \ Images/f1.png \ Images/f2.png \ Images/fire-grayscale.png \ Images/fire.png \ Images/fire_rgba8888.pvr \ Images/grossini.png \ Images/grossini_128x256_mipmap.pvr \ Images/grossini_dance_01.png \ Images/grossini_dance_02.png \ Images/grossini_dance_03.png \ Images/grossini_dance_04.png \ Images/grossini_dance_05.png \ Images/grossini_dance_06.png \ Images/grossini_dance_07.png \ Images/grossini_dance_08.png \ Images/grossini_dance_09.png \ Images/grossini_dance_10.png \ Images/grossini_dance_11.png \ Images/grossini_dance_12.png \ Images/grossini_dance_13.png \ Images/grossini_dance_14.png \ Images/grossini_dance_atlas-mono.png \ Images/grossini_dance_atlas.png \ Images/grossini_dance_atlas_nomipmap.png \ Images/grossini_pvr_rgba4444.pvr \ Images/grossini_pvr_rgba8888.pvr \ Images/grossinis_sister1-testalpha.png \ Images/grossinis_sister1-testalpha.ppng \ Images/grossinis_sister1-testalpha_nopremult.pvr \ Images/grossinis_sister1-testalpha_premult.pvr \ Images/grossinis_sister1.png \ Images/grossinis_sister2.png \ Images/hole_effect.png \ Images/hole_stencil.png \ Images/labelatlas.png \ Images/landscape-1024x1024.png \ Images/logo-mipmap.pvr \ Images/logo-nomipmap.pvr \ Images/menuitemsprite.png \ Images/paddle.png \ Images/particles.png \ Images/pattern1.png \ Images/piece.png \ Images/powered.png \ Images/r1.png \ Images/r2.png \ Images/snow.png \ Images/sprites_test/sprite-0-0.png \ Images/sprites_test/sprite-0-1.png \ Images/sprites_test/sprite-0-2.png \ Images/sprites_test/sprite-0-3.png \ Images/sprites_test/sprite-0-4.png \ Images/sprites_test/sprite-0-5.png \ Images/sprites_test/sprite-0-6.png \ Images/sprites_test/sprite-0-7.png \ Images/sprites_test/sprite-1-0.png \ Images/sprites_test/sprite-1-1.png \ Images/sprites_test/sprite-1-2.png \ Images/sprites_test/sprite-1-3.png \ Images/sprites_test/sprite-1-4.png \ Images/sprites_test/sprite-1-5.png \ Images/sprites_test/sprite-1-6.png \ Images/sprites_test/sprite-1-7.png \ Images/sprites_test/sprite-2-0.png \ Images/sprites_test/sprite-2-1.png \ Images/sprites_test/sprite-2-2.png \ Images/sprites_test/sprite-2-3.png \ Images/sprites_test/sprite-2-4.png \ Images/sprites_test/sprite-2-5.png \ Images/sprites_test/sprite-2-6.png \ Images/sprites_test/sprite-2-7.png \ Images/sprites_test/sprite-3-0.png \ Images/sprites_test/sprite-3-1.png \ Images/sprites_test/sprite-3-2.png \ Images/sprites_test/sprite-3-3.png \ Images/sprites_test/sprite-3-4.png \ Images/sprites_test/sprite-3-5.png \ Images/sprites_test/sprite-3-6.png \ Images/sprites_test/sprite-3-7.png \ Images/sprites_test/sprite-4-0.png \ Images/sprites_test/sprite-4-1.png \ Images/sprites_test/sprite-4-2.png \ Images/sprites_test/sprite-4-3.png \ Images/sprites_test/sprite-4-4.png \ Images/sprites_test/sprite-4-5.png \ Images/sprites_test/sprite-4-6.png \ Images/sprites_test/sprite-4-7.png \ Images/sprites_test/sprite-5-0.png \ Images/sprites_test/sprite-5-1.png \ Images/sprites_test/sprite-5-2.png \ Images/sprites_test/sprite-5-3.png \ Images/sprites_test/sprite-5-4.png \ Images/sprites_test/sprite-5-5.png \ Images/sprites_test/sprite-5-6.png \ Images/sprites_test/sprite-5-7.png \ Images/sprites_test/sprite-6-0.png \ Images/sprites_test/sprite-6-1.png \ Images/sprites_test/sprite-6-2.png \ Images/sprites_test/sprite-6-3.png \ Images/sprites_test/sprite-6-4.png \ Images/sprites_test/sprite-6-5.png \ Images/sprites_test/sprite-6-6.png \ Images/sprites_test/sprite-6-7.png \ Images/sprites_test/sprite-7-0.png \ Images/sprites_test/sprite-7-1.png \ Images/sprites_test/sprite-7-2.png \ Images/sprites_test/sprite-7-3.png \ Images/sprites_test/sprite-7-4.png \ Images/sprites_test/sprite-7-5.png \ Images/sprites_test/sprite-7-6.png \ Images/sprites_test/sprite-7-7.png \ Images/spritesheet1.png \ Images/stars-grayscale.png \ Images/stars.png \ Images/stars2-grayscale.png \ Images/stars2.png \ Images/streak.png \ Images/test-rgba1.png \ Images/test_1021x1024.png \ Images/test_1021x1024_a8.pvr \ Images/test_1021x1024_a8.pvr.gz \ Images/test_1021x1024_rgb888.pvr \ Images/test_1021x1024_rgb888.pvr.gz \ Images/test_1021x1024_rgba4444.pvr \ Images/test_1021x1024_rgba4444.pvr.gz \ Images/test_1021x1024_rgba8888.pvr \ Images/test_1021x1024_rgba8888.pvr.gz \ Images/test_blend.png \ Images/test_image-bad_encoding.pvr \ Images/test_image.jpeg \ Images/test_image.png \ Images/test_image.pvr \ Images/test_image.pvrraw \ Images/test_image.tiff \ Images/test_image.webp \ Images/test_image_a8.pvr \ Images/test_image_a8_v3.pvr \ Images/test_image_ai88.pvr \ Images/test_image_ai88_v3.pvr \ Images/test_image_bgra8888.pvr \ Images/test_image_bgra8888_v3.pvr \ Images/test_image_i8.pvr \ Images/test_image_i8_v3.pvr \ Images/test_image_pvrtc2bpp.pvr \ Images/test_image_pvrtc2bpp_v3.pvr \ Images/test_image_pvrtc4bpp.pvr \ Images/test_image_pvrtc4bpp_v3.pvr \ Images/test_image_pvrtcii2bpp_v3.pvr \ Images/test_image_pvrtcii4bpp_v3.pvr \ Images/test_image_rgb565.pvr \ Images/test_image_rgb565_v3.pvr \ Images/test_image_rgb888.pvr \ Images/test_image_rgb888_v3.pvr \ Images/test_image_rgba4444.pvr \ Images/test_image_rgba4444.pvr.ccz \ Images/test_image_rgba4444.pvr.gz \ Images/test_image_rgba4444_mipmap.pvr \ Images/test_image_rgba4444_v3.pvr \ Images/test_image_rgba5551.pvr \ Images/test_image_rgba5551_v3.pvr \ Images/test_image_rgba8888.pvr \ Images/test_image_rgba8888_v3.pvr \ Images/texture1024x1024.png \ Images/texture2048x2048.png \ Images/texture512x512.png \ Images/white-512x512.png \ Particles/BoilingFoam.plist \ Particles/BurstPipe.plist \ Particles/Comet.plist \ Particles/ExplodingRing.plist \ Particles/Flower.plist \ Particles/Galaxy.plist \ Particles/LavaFlow.plist \ Particles/Phoenix.plist \ Particles/SmallSun.plist \ Particles/SpinningPeas.plist \ Particles/Spiral.plist \ Particles/SpookyPeas.plist \ Particles/TestPremultipliedAlpha.plist \ Particles/Upsidedown.plist \ Particles/debian.plist \ Particles/lines.plist \ TileMaps/fixed-ortho-test2.png \ TileMaps/hexa-test.tmx \ TileMaps/hexa-tiles.png \ TileMaps/iso-test-bug787.tmx \ TileMaps/iso-test-movelayer.tmx \ TileMaps/iso-test-objectgroup.tmx \ TileMaps/iso-test-vertexz.tmx \ TileMaps/iso-test-zorder.tmx \ TileMaps/iso-test.png \ TileMaps/iso-test.tmx \ TileMaps/iso-test1.tmx \ TileMaps/iso-test2-uncompressed.tmx \ TileMaps/iso-test2.png \ TileMaps/iso-test2.tmx \ TileMaps/iso.png \ TileMaps/levelmap.tga \ TileMaps/ortho-objects.tmx \ TileMaps/ortho-rotation-test.tmx \ TileMaps/ortho-test1.png \ TileMaps/ortho-test1_bw.png \ TileMaps/ortho-test2.png \ TileMaps/ortho-tile-property.tmx \ TileMaps/orthogonal-test-movelayer.tmx \ TileMaps/orthogonal-test-vertexz.tmx \ TileMaps/orthogonal-test-zorder.tmx \ TileMaps/orthogonal-test1.tmx \ TileMaps/orthogonal-test1.tsx \ TileMaps/orthogonal-test2.tmx \ TileMaps/orthogonal-test3.tmx \ TileMaps/orthogonal-test4.tmx \ TileMaps/orthogonal-test5.tmx \ TileMaps/orthogonal-test6.tmx \ TileMaps/test-object-layer.tmx \ TileMaps/tiles.png \ TileMaps/tmw_desert_spacing.png \ animations/dragon_animation.png \ animations/ghosts.png \ animations/grossini-aliases.png \ animations/grossini.png \ animations/grossini_blue.png \ animations/grossini_family.png \ animations/grossini_gray.png \ extensions/CCControlColourPickerSpriteSheet.png \ extensions/background.png \ extensions/button.png \ extensions/buttonBackground.png \ extensions/buttonHighlighted.png \ extensions/green_edit.png \ extensions/orange_edit.png \ extensions/potentiometerButton.png \ extensions/potentiometerProgress.png \ extensions/potentiometerTrack.png \ extensions/ribbon.png \ extensions/sliderProgress.png \ extensions/sliderProgress2.png \ extensions/sliderThumb.png \ extensions/sliderTrack.png \ extensions/sliderTrack2.png \ extensions/stepper-minus.png \ extensions/stepper-plus.png \ extensions/switch-mask.png \ extensions/switch-off.png \ extensions/switch-on.png \ extensions/switch-thumb.png \ extensions/yellow_edit.png \ fonts/Abberancy.ttf \ fonts/Abduction.ttf \ fonts/Thonburi.ttf \ fonts/ThonburiBold.ttf \ fonts/arial-unicode-26.GlyphProject \ fonts/arial-unicode-26.fnt \ fonts/arial-unicode-26.png \ fonts/arial.ttf \ fonts/arial16.fnt \ fonts/arial16.png \ fonts/bitmapFontChinese.fnt \ fonts/bitmapFontChinese.png \ fonts/bitmapFontTest.fnt \ fonts/bitmapFontTest.png \ fonts/bitmapFontTest2.bmp \ fonts/bitmapFontTest2.fnt \ fonts/bitmapFontTest2.png \ fonts/bitmapFontTest3.fnt \ fonts/bitmapFontTest3.png \ fonts/bitmapFontTest4.fnt \ fonts/bitmapFontTest4.png \ fonts/bitmapFontTest5.fnt \ fonts/bitmapFontTest5.png \ fonts/boundsTestFont.fnt \ fonts/boundsTestFont.png \ fonts/font-issue1343-hd.fnt \ fonts/font-issue1343-hd.png \ fonts/font-issue1343.fnt \ fonts/font-issue1343.png \ fonts/futura-48.fnt \ fonts/futura-48.png \ fonts/geneva-32.fnt \ fonts/helvetica-32.fnt \ fonts/helvetica-geneva-32.png \ fonts/konqa32.fnt \ fonts/konqa32.png \ fonts/labelatlas.png \ fonts/larabie-16.plist \ fonts/larabie-16.png \ fonts/markerFelt.fnt \ fonts/markerFelt.png \ fonts/strings.xml \ fonts/tahoma.ttf \ fonts/tuffy_bold_italic-charmap.plist \ fonts/tuffy_bold_italic-charmap.png \ fonts/west_england-64.fnt \ fonts/west_england-64.png \ fps_images.png \ fonts/bitmapFontTest.fnt \ zwoptex/grossini-generic.plist \ zwoptex/grossini-generic.png \ zwoptex/grossini.plist \ zwoptex/grossini.png # XXX: Need to figure out how to accept filnames with spaces in them. # fonts/A\ Damn\ Mess.ttf \ fonts/American\ Typewriter.ttf \ fonts/Courier New.ttf \ fonts/Marker Felt.ttf \ fonts/Paint Boy.ttf \ fonts/Schwarzwald Regular.ttf \ fonts/Scissor Cuts.ttf \ SHAREDLIBS = -lcocos2d -lcocosdenshion COCOS_LIBS = $(LIB_DIR)/libcocos2d.so $(LIB_DIR)/libcocosdenshion.so include ../../../../cocos2dx/proj.emscripten/cocos2dx.mk INCLUDES += -I../ \ -I../../ \ -I../Classes \ -I$(COCOS_ROOT)/CocosDenshion/include \ -I$(COCOS_ROOT)/extensions/ \ -I$(COCOS_ROOT)/external/ \ -I$(COCOS_ROOT)/external/chipmunk/include/chipmunk STATICLIBS += \ $(LIB_DIR)/libextension.a \ $(LIB_DIR)/libbox2d.a \ $(LIB_DIR)/libchipmunk.a DEFINES += -DCC_ENABLE_CHIPMUNK_INTEGRATION=1 ####### Build rules $(TARGET).js: $(OBJECTS) $(STATICLIBS) $(COCOS_LIBS) $(CORE_MAKEFILE_LIST) @mkdir -p $(@D) $(CXX) $(CXXFLAGS) $(OBJECTS) -o $@ $(SHAREDLIBS) $(STATICLIBS) $(LIBS) $(TARGET).data: $(CORE_MAKEFILE_LIST) $(patsubst %,$(RESOURCE_PATH)/%,$(RESOURCES)) @mkdir -p $(@D) $(eval RESTMP := $(shell mktemp -d /tmp/cocos-emscripten.XXXXXX)) # Always need a font path, so ensure that it is created first. mkdir -p $(RESTMP)/fonts (cd $(RESOURCE_PATH) && tar cf - $(RESOURCES)) | (cd $(RESTMP) && tar xvf -) # NOTE: we copy the system arial.ttf so that there is always a fallback. cp /Library/Fonts/Arial.ttf $(RESTMP)/fonts/arial.ttf (cd $(RESTMP); python $(PACKAGER) $(EXECUTABLE).data $(patsubst %,--preload %,$(RESOURCES)) --preload fonts --pre-run > $(EXECUTABLE).data.js) mv $(RESTMP)/$(EXECUTABLE).data $@ mv $(RESTMP)/$(EXECUTABLE).data.js $@.js rm -rf $(RESTMP) $(BIN_DIR)/index.html: index.html $(CORE_MAKEFILE_LIST) @mkdir -p $(@D) cp index.html $(@D) ####### Compile $(OBJ_DIR)/%.o: ../%.cpp $(CORE_MAKEFILE_LIST) @mkdir -p $(@D) $(CXX) $(CXXFLAGS) $(INCLUDES) $(DEFINES) -c $< -o $@ $(OBJ_DIR)/%.o: %.cpp $(CORE_MAKEFILE_LIST) @mkdir -p $(@D) $(CXX) $(CXXFLAGS) $(INCLUDES) $(DEFINES) -c $< -o $@ $(OBJ_DIR)/%.o: %.c $(CORE_MAKEFILE_LIST) @mkdir -p $(@D) $(CC) $(CCFLAGS) $(INCLUDES) $(DEFINES) -c $< -o $@