2012-08-02 13:02:59 +08:00
|
|
|
CC = gcc
|
|
|
|
CXX = g++
|
2012-08-16 18:20:00 +08:00
|
|
|
TARGET = TestCpp
|
2012-08-02 13:02:59 +08:00
|
|
|
CCFLAGS = -Wall -g #-O2
|
|
|
|
CXXFLAGS = -Wall -g #-O2
|
|
|
|
VISIBILITY =
|
|
|
|
LIBS =
|
|
|
|
|
2012-08-02 13:19:40 +08:00
|
|
|
COCOS2DX_PATH = ../../../cocos2dx
|
2012-08-02 13:02:59 +08:00
|
|
|
INCLUDES = -I../ \
|
|
|
|
-I../../ \
|
|
|
|
-I../Classes \
|
|
|
|
-I$(COCOS2DX_PATH) \
|
|
|
|
-I$(COCOS2DX_PATH)/platform/third_party/linux \
|
|
|
|
-I$(COCOS2DX_PATH)/platform/third_party/linux/libfreetype2 \
|
|
|
|
-I$(COCOS2DX_PATH)/cocoa \
|
|
|
|
-I$(COCOS2DX_PATH)/include \
|
|
|
|
-I$(COCOS2DX_PATH)/kazmath/include \
|
|
|
|
-I$(COCOS2DX_PATH)/platform \
|
2012-08-02 16:23:31 +08:00
|
|
|
-I$(COCOS2DX_PATH)/platform/linux \
|
2012-08-02 13:02:59 +08:00
|
|
|
-I$(COCOS2DX_PATH)/platform/third_party/linux/glew-1.7.0/glew-1.7.0/include/ \
|
|
|
|
-I$(COCOS2DX_PATH)/platform/third_party/linux/libxml2 \
|
|
|
|
-I$(COCOS2DX_PATH)/platform/third_party/linux/libjpeg \
|
2012-08-09 10:45:11 +08:00
|
|
|
-I$(COCOS2DX_PATH)/platform/third_party/linux/curl \
|
2012-08-02 13:19:40 +08:00
|
|
|
-I../../../CocosDenshion/include \
|
2012-08-02 16:23:31 +08:00
|
|
|
-I../../../extensions/ \
|
|
|
|
-I../../../external/ \
|
2012-08-02 13:19:40 +08:00
|
|
|
-I../../../external/chipmunk/include/chipmunk \
|
2012-08-02 13:02:59 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#CCFLAGS += -fno-tree-scev-cprop
|
|
|
|
#CXXFLAGS = -fno-tree-scev-cprop
|
|
|
|
|
|
|
|
DEFINES = -DLINUX
|
|
|
|
#DEFINES += -D__LP64__
|
|
|
|
|
2012-08-02 13:19:40 +08:00
|
|
|
OBJECTS = ../Classes/AccelerometerTest/AccelerometerTest.o \
|
|
|
|
../Classes/ActionManagerTest/ActionManagerTest.o \
|
|
|
|
../Classes/ActionsEaseTest/ActionsEaseTest.o \
|
|
|
|
../Classes/ActionsProgressTest/ActionsProgressTest.o \
|
|
|
|
../Classes/ActionsTest/ActionsTest.o \
|
|
|
|
../Classes/Box2DTest/Box2dTest.o \
|
|
|
|
../Classes/Box2DTestBed/Box2dView.o \
|
|
|
|
../Classes/Box2DTestBed/GLES-Render.o \
|
|
|
|
../Classes/Box2DTestBed/Test.o \
|
|
|
|
../Classes/Box2DTestBed/TestEntries.o \
|
|
|
|
../Classes/BugsTest/Bug-1159.o \
|
|
|
|
../Classes/BugsTest/Bug-1174.o \
|
|
|
|
../Classes/BugsTest/Bug-350.o \
|
|
|
|
../Classes/BugsTest/Bug-422.o \
|
|
|
|
../Classes/BugsTest/Bug-458/Bug-458.o \
|
|
|
|
../Classes/BugsTest/Bug-458/QuestionContainerSprite.o \
|
|
|
|
../Classes/BugsTest/Bug-624.o \
|
|
|
|
../Classes/BugsTest/Bug-886.o \
|
|
|
|
../Classes/BugsTest/Bug-899.o \
|
|
|
|
../Classes/BugsTest/Bug-914.o \
|
|
|
|
../Classes/BugsTest/BugsTest.o \
|
|
|
|
../Classes/ChipmunkAccelTouchTest/ChipmunkAccelTouchTest.o \
|
|
|
|
../Classes/ClickAndMoveTest/ClickAndMoveTest.o \
|
|
|
|
../Classes/CocosDenshionTest/CocosDenshionTest.o \
|
|
|
|
../Classes/CurlTest/CurlTest.o \
|
|
|
|
../Classes/CurrentLanguageTest/CurrentLanguageTest.o \
|
|
|
|
../Classes/DrawPrimitivesTest/DrawPrimitivesTest.o \
|
|
|
|
../Classes/EffectsAdvancedTest/EffectsAdvancedTest.o \
|
|
|
|
../Classes/EffectsTest/EffectsTest.o \
|
|
|
|
../Classes/ExtensionsTest/CocosBuilderTest/ButtonTest/ButtonTestLayer.o \
|
|
|
|
../Classes/ExtensionsTest/CocosBuilderTest/CocosBuilderTest.o \
|
|
|
|
../Classes/ExtensionsTest/CocosBuilderTest/HelloCocosBuilder/HelloCocosBuilderLayer.o \
|
|
|
|
../Classes/ExtensionsTest/CocosBuilderTest/MenuTest/MenuTestLayer.o \
|
|
|
|
../Classes/ExtensionsTest/CocosBuilderTest/TestHeader/TestHeaderLayer.o \
|
|
|
|
../Classes/ExtensionsTest/ControlExtensionTest/CCControlButtonTest/CCControlButtonTest.o \
|
|
|
|
../Classes/ExtensionsTest/ControlExtensionTest/CCControlColourPicker/CCControlColourPickerTest.o \
|
|
|
|
../Classes/ExtensionsTest/ControlExtensionTest/CCControlScene.o \
|
|
|
|
../Classes/ExtensionsTest/ControlExtensionTest/CCControlSceneManager.o \
|
|
|
|
../Classes/ExtensionsTest/ControlExtensionTest/CCControlSliderTest/CCControlSliderTest.o \
|
|
|
|
../Classes/ExtensionsTest/ControlExtensionTest/CCControlSwitchTest/CCControlSwitchTest.o \
|
2012-09-10 14:50:19 +08:00
|
|
|
../Classes/ExtensionsTest/TableViewTest/TableViewTestScene.o \
|
|
|
|
../Classes/ExtensionsTest/TableViewTest/CustomTableViewCell.o \
|
2012-08-02 13:19:40 +08:00
|
|
|
../Classes/ExtensionsTest/ExtensionsTest.o \
|
|
|
|
../Classes/ExtensionsTest/NotificationCenterTest/NotificationCenterTest.o \
|
2012-08-09 10:45:11 +08:00
|
|
|
../Classes/ExtensionsTest/NetworkTest/HttpClientTest.o \
|
2012-08-02 13:19:40 +08:00
|
|
|
../Classes/FontTest/FontTest.o \
|
|
|
|
../Classes/IntervalTest/IntervalTest.o \
|
|
|
|
../Classes/KeypadTest/KeypadTest.o \
|
|
|
|
../Classes/LabelTest/LabelTest.o \
|
|
|
|
../Classes/LayerTest/LayerTest.o \
|
|
|
|
../Classes/MenuTest/MenuTest.o \
|
|
|
|
../Classes/MotionStreakTest/MotionStreakTest.o \
|
|
|
|
../Classes/MutiTouchTest/MutiTouchTest.o \
|
|
|
|
../Classes/NodeTest/NodeTest.o \
|
|
|
|
../Classes/ParallaxTest/ParallaxTest.o \
|
|
|
|
../Classes/ParticleTest/ParticleTest.o \
|
|
|
|
../Classes/PerformanceTest/PerformanceNodeChildrenTest.o \
|
|
|
|
../Classes/PerformanceTest/PerformanceParticleTest.o \
|
|
|
|
../Classes/PerformanceTest/PerformanceSpriteTest.o \
|
|
|
|
../Classes/PerformanceTest/PerformanceTest.o \
|
|
|
|
../Classes/PerformanceTest/PerformanceTextureTest.o \
|
|
|
|
../Classes/PerformanceTest/PerformanceTouchesTest.o \
|
|
|
|
../Classes/RenderTextureTest/RenderTextureTest.o \
|
|
|
|
../Classes/RotateWorldTest/RotateWorldTest.o \
|
|
|
|
../Classes/SceneTest/SceneTest.o \
|
|
|
|
../Classes/SchedulerTest/SchedulerTest.o \
|
|
|
|
../Classes/ShaderTest/ShaderTest.o \
|
|
|
|
../Classes/SpriteTest/SpriteTest.o \
|
|
|
|
../Classes/TextInputTest/TextInputTest.o \
|
|
|
|
../Classes/Texture2dTest/Texture2dTest.o \
|
|
|
|
../Classes/TextureCacheTest/TextureCacheTest.o \
|
|
|
|
../Classes/TileMapTest/TileMapTest.o \
|
|
|
|
../Classes/TouchesTest/Ball.o \
|
|
|
|
../Classes/TouchesTest/Paddle.o \
|
|
|
|
../Classes/TouchesTest/TouchesTest.o \
|
|
|
|
../Classes/TransitionsTest/TransitionsTest.o \
|
|
|
|
../Classes/UserDefaultTest/UserDefaultTest.o \
|
|
|
|
../Classes/ZwoptexTest/ZwoptexTest.o \
|
|
|
|
../Classes/controller.o \
|
|
|
|
../Classes/testBasic.o \
|
2012-08-02 16:23:31 +08:00
|
|
|
../Classes/AppDelegate.o \
|
2012-08-02 13:02:59 +08:00
|
|
|
./main.o
|
|
|
|
|
|
|
|
|
|
|
|
LBITS := $(shell getconf LONG_BIT)
|
|
|
|
ifeq ($(LBITS),64)
|
2012-08-02 13:19:40 +08:00
|
|
|
STATICLIBS_DIR = ../../../cocos2dx/platform/third_party/linux/libraries/lib64
|
2012-08-02 13:02:59 +08:00
|
|
|
else
|
2012-08-02 13:19:40 +08:00
|
|
|
STATICLIBS_DIR = ../../../cocos2dx/platform/third_party/linux/libraries
|
2012-08-02 13:02:59 +08:00
|
|
|
endif
|
|
|
|
STATICLIBS =
|
|
|
|
STATICLIBS = $(STATICLIBS_DIR)/libfreetype.a \
|
|
|
|
$(STATICLIBS_DIR)/libcurl.a \
|
|
|
|
$(STATICLIBS_DIR)/libxml2.a \
|
|
|
|
$(STATICLIBS_DIR)/libpng.a \
|
|
|
|
$(STATICLIBS_DIR)/libjpeg.a \
|
|
|
|
$(STATICLIBS_DIR)/libtiff.a \
|
2012-08-02 13:19:40 +08:00
|
|
|
../../../lib/linux/Debug/libbox2d.a \
|
|
|
|
../../../lib/linux/Debug/libchipmunk.a \
|
2012-08-02 13:02:59 +08:00
|
|
|
# $(STATICLIBS_DIR)/libGLEW.a \
|
|
|
|
|
|
|
|
SHAREDLIBS =
|
|
|
|
ifeq ($(LBITS),64)
|
2012-08-02 13:19:40 +08:00
|
|
|
SHAREDLIBS_DIR = ../../../CocosDenshion/third_party/fmod/lib64/api/lib
|
2012-08-02 13:02:59 +08:00
|
|
|
SHAREDLIBS = -L$(SHAREDLIBS_DIR) -lfmodex64
|
|
|
|
else
|
2012-08-02 13:19:40 +08:00
|
|
|
SHAREDLIBS_DIR = ../../../CocosDenshion/third_party/fmod/api/lib
|
2012-08-02 13:02:59 +08:00
|
|
|
SHAREDLIBS = -L$(SHAREDLIBS_DIR) -lfmodex
|
|
|
|
endif
|
|
|
|
|
|
|
|
SHAREDLIBS += -lglfw -lGL
|
|
|
|
#SHAREDLIBS += -lGLEW
|
2012-08-27 16:43:02 +08:00
|
|
|
SHAREDLIBS += -L../../../lib/linux/Debug -lcocos2d -lrt -lz -lcocosdenshion -Wl,-rpath,../../../../lib/linux/Debug/
|
|
|
|
SHAREDLIBS += -Wl,-rpath,../$(SHAREDLIBS_DIR)
|
|
|
|
SHAREDLIBS += -Wl,-rpath,../../../../cocos2dx/platform/third_party/linux/glew-1.7.0/glew-1.7.0/lib
|
2012-08-02 13:19:40 +08:00
|
|
|
SHAREDLIBS += -L../../../cocos2dx/platform/third_party/linux/glew-1.7.0/glew-1.7.0/lib -lGLEW
|
2012-08-02 13:02:59 +08:00
|
|
|
|
2012-08-27 16:43:02 +08:00
|
|
|
SHAREDLIBS += -Wl,-rpath,../$(STATICLIBS_DIR)
|
2012-08-24 15:53:26 +08:00
|
|
|
SHAREDLIBS += -lcurl
|
2012-08-02 13:02:59 +08:00
|
|
|
|
2012-08-27 16:43:02 +08:00
|
|
|
BIN_DIR=bin
|
2012-08-02 13:02:59 +08:00
|
|
|
|
|
|
|
####### Build rules
|
2012-08-27 16:43:02 +08:00
|
|
|
$(TARGET): $(OBJECTS)
|
|
|
|
test -d $(BIN_DIR) || mkdir $(BIN_DIR)
|
|
|
|
$(CXX) $(CXXFLAGS) $(INCLUDES) $(DEFINES) $(OBJECTS) -o $(BIN_DIR)/$(TARGET) $(SHAREDLIBS) $(STATICLIBS) $(LIBS)
|
|
|
|
|
|
|
|
|
2012-08-02 13:02:59 +08:00
|
|
|
####### Compile
|
|
|
|
%.o: %.cpp
|
|
|
|
$(CXX) $(CXXFLAGS) $(INCLUDES) $(DEFINES) $(VISIBILITY) -c $< -o $@
|
|
|
|
|
|
|
|
%.o: %.c
|
|
|
|
$(CC) $(CCFLAGS) $(INCLUDES) $(DEFINES) $(VISIBILITY) -c $< -o $@
|
|
|
|
|
2012-08-27 16:43:02 +08:00
|
|
|
|
2012-08-02 13:02:59 +08:00
|
|
|
clean:
|
|
|
|
rm -f $(OBJECTS) $(TARGET) core
|
2012-08-27 16:43:02 +08:00
|
|
|
rm -r $(BIN_DIR)
|