2012-08-02 13:02:59 +08:00
|
|
|
CC = gcc
|
|
|
|
CXX = g++
|
2012-08-16 18:20:00 +08:00
|
|
|
TARGET = TestCpp
|
2012-09-21 13:34:05 +08:00
|
|
|
CCFLAGS = -Wall
|
|
|
|
CXXFLAGS = -Wall
|
2012-08-02 13:02:59 +08:00
|
|
|
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/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-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
|
|
|
|
2012-11-26 11:46:37 +08:00
|
|
|
|
2012-11-01 15:38:48 +08:00
|
|
|
LBITS := $(shell getconf LONG_BIT)
|
|
|
|
ifeq ($(LBITS),64)
|
|
|
|
INCLUDES += -I$(COCOS2DX_PATH)/platform/third_party/linux/include64
|
|
|
|
else
|
|
|
|
INCLUDES += -I$(COCOS2DX_PATH)/platform/third_party/linux
|
|
|
|
endif
|
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 \
|
2012-11-26 11:46:37 +08:00
|
|
|
../Classes/ChipmunkTest/ChipmunkTest.o \
|
2012-08-02 13:19:40 +08:00
|
|
|
../Classes/ClickAndMoveTest/ClickAndMoveTest.o \
|
2012-11-26 11:46:37 +08:00
|
|
|
../Classes/ClippingNodeTest/ClippingNodeTest.o \
|
2012-08-02 13:19:40 +08:00
|
|
|
../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 \
|
2012-09-22 02:18:26 +08:00
|
|
|
../Classes/ExtensionsTest/CocosBuilderTest/AnimationsTest/AnimationsTestLayer.o \
|
2012-08-02 13:19:40 +08:00
|
|
|
../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-26 14:06:49 +08:00
|
|
|
../Classes/ExtensionsTest/ControlExtensionTest/CCControlPotentiometerTest/CCControlPotentiometerTest.o \
|
|
|
|
../Classes/ExtensionsTest/ControlExtensionTest/CCControlStepperTest/CCControlStepperTest.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-10-23 17:48:50 +08:00
|
|
|
../Classes/VisibleRect.o \
|
2012-08-02 13:02:59 +08:00
|
|
|
./main.o
|
|
|
|
|
2012-11-26 11:46:37 +08:00
|
|
|
include $(COCOS2DX_PATH)/../extensions/proj.linux/Makefile
|
|
|
|
OBJECTS += $(addprefix ../../../extensions/proj.linux/, $(EXTENSIONS_OBJECTS))
|
|
|
|
|
2012-08-02 13:02:59 +08:00
|
|
|
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
|
|
|
|
|
|
|
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
|
2012-09-21 13:34:05 +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-09-21 13:34:05 +08:00
|
|
|
SHAREDLIBS += -Wl,-rpath,../../../../../cocos2dx/platform/third_party/linux/glew-1.7.0/glew-1.7.0/lib
|
|
|
|
|
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-09-21 13:34:05 +08:00
|
|
|
BIN_DIR_ROOT=bin
|
|
|
|
BIN_DIR = BIN_DIR_ROOT
|
|
|
|
|
|
|
|
debug: SHAREDLIBS += -L../../../lib/linux/Debug -lcocos2d -lrt -lz -lcocosdenshion -Wl,-rpath,../../../../../lib/linux/Debug
|
|
|
|
debug: CCFLAGS += -g3 -O0
|
|
|
|
debug: CXXFLAGS += -g3 -O0
|
2012-12-04 16:43:47 +08:00
|
|
|
debug: DEFINES += -DDEBUG -DCC_ENABLE_CHIPMUNK_INTEGRATION -DCOCOS2D_DEBUG=1
|
2012-09-21 13:34:05 +08:00
|
|
|
debug: BIN_DIR = $(BIN_DIR_ROOT)/debug
|
|
|
|
debug: $(TARGET)
|
|
|
|
|
|
|
|
release: SHAREDLIBS += -L../../../lib/linux/Release -lcocos2d -lrt -lz -lcocosdenshion -Wl,-rpath,../../../../../lib/linux/Release
|
|
|
|
release: CCFLAGS += -O3
|
|
|
|
release: CXXFLAGS += -O3
|
2012-11-26 11:46:37 +08:00
|
|
|
release: DEFINES += -DNDEBUG -DCC_ENABLE_CHIPMUNK_INTEGRATION
|
2012-09-21 13:34:05 +08:00
|
|
|
release: BIN_DIR = $(BIN_DIR_ROOT)/release
|
|
|
|
release: $(TARGET)
|
2012-08-02 13:02:59 +08:00
|
|
|
|
|
|
|
####### Build rules
|
2012-08-27 16:43:02 +08:00
|
|
|
$(TARGET): $(OBJECTS)
|
2012-09-21 13:34:05 +08:00
|
|
|
mkdir -p $(BIN_DIR)
|
2012-08-27 16:43:02 +08:00
|
|
|
$(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-09-21 13:34:05 +08:00
|
|
|
|
2012-08-27 16:43:02 +08:00
|
|
|
|
2012-08-02 13:02:59 +08:00
|
|
|
clean:
|
|
|
|
rm -f $(OBJECTS) $(TARGET) core
|