mirror of https://github.com/axmolengine/axmol.git
debug & release makefiles for cocos2dx, box2d, chipmunk, cocosdenshion
This commit is contained in:
parent
d098c5900a
commit
ad5836a3ca
|
@ -1,8 +1,8 @@
|
||||||
CC = gcc
|
CC = gcc
|
||||||
CXX = g++
|
CXX = g++
|
||||||
TARGET = libcocosdenshion.so
|
TARGET = libcocosdenshion.so
|
||||||
CCFLAGS = -Wall -g -O2 -fPIC
|
CCFLAGS = -Wall -fPIC
|
||||||
CXXFLAGS = -Wall -g -O2 -fPIC
|
CXXFLAGS = -Wall -fPIC
|
||||||
VISIBILITY =
|
VISIBILITY =
|
||||||
|
|
||||||
LBITS := $(shell getconf LONG_BIT)
|
LBITS := $(shell getconf LONG_BIT)
|
||||||
|
@ -32,6 +32,15 @@ SHAREDLIBS_DIR = ../third_party/fmod/api/lib
|
||||||
SHAREDLIBS = -L$(SHAREDLIBS_DIR) -lfmodex
|
SHAREDLIBS = -L$(SHAREDLIBS_DIR) -lfmodex
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
debug: CCFLAGS += -g3 -O0
|
||||||
|
debug: CXXFLAGS += -g3 -O0
|
||||||
|
debug: DEFINES += -DDEBUG
|
||||||
|
debug: $(TARGET)
|
||||||
|
|
||||||
|
release: CCFLAGS += -O3
|
||||||
|
release: CXXFLAGS += -O3
|
||||||
|
release: DEFINES += -DNDEBUG
|
||||||
|
release: $(TARGET)
|
||||||
|
|
||||||
####### Build rules
|
####### Build rules
|
||||||
$(TARGET): $(OBJECTS)
|
$(TARGET): $(OBJECTS)
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
CC = gcc
|
CC = gcc
|
||||||
CXX = g++
|
CXX = g++
|
||||||
TARGET = libcocos2d.so
|
TARGET = libcocos2d.so
|
||||||
CCFLAGS = -Wall -g -fPIC #-O2
|
CCFLAGS = -Wall -fPIC
|
||||||
CXXFLAGS = -Wall -g -fPIC #-O2
|
CXXFLAGS = -Wall -fPIC
|
||||||
VISIBILITY =
|
VISIBILITY =
|
||||||
|
|
||||||
LIBS =
|
LIBS =
|
||||||
|
@ -202,6 +202,15 @@ SHAREDLIBS += -lglfw -lGL -lcurl
|
||||||
SHAREDLIBS += -Wl,-rpath,../../cocos2dx/platform/third_party/linux/glew-1.7.0/glew-1.7.0/lib
|
SHAREDLIBS += -Wl,-rpath,../../cocos2dx/platform/third_party/linux/glew-1.7.0/glew-1.7.0/lib
|
||||||
SHAREDLIBS += -L../../cocos2dx/platform/third_party/linux/glew-1.7.0/glew-1.7.0/lib -lGLEW
|
SHAREDLIBS += -L../../cocos2dx/platform/third_party/linux/glew-1.7.0/glew-1.7.0/lib -lGLEW
|
||||||
|
|
||||||
|
debug: CCFLAGS += -g3 -O0
|
||||||
|
debug: CXXFLAGS += -g3 -O0
|
||||||
|
debug: DEFINES += -DDEBUG
|
||||||
|
debug: $(TARGET)
|
||||||
|
|
||||||
|
release: CCFLAGS += -O3
|
||||||
|
release: CXXFLAGS += -O3
|
||||||
|
release: DEFINES += -DNDEBUG
|
||||||
|
release: $(TARGET)
|
||||||
|
|
||||||
####### Build rules
|
####### Build rules
|
||||||
$(TARGET): $(OBJECTS)
|
$(TARGET): $(OBJECTS)
|
||||||
|
|
|
@ -2,8 +2,8 @@ CC = gcc
|
||||||
CXX = g++
|
CXX = g++
|
||||||
AR = ar
|
AR = ar
|
||||||
TARGET = libbox2d.a
|
TARGET = libbox2d.a
|
||||||
CCFLAGS = -Wall -g -O2
|
CCFLAGS = -Wall
|
||||||
CXXFLAGS = -Wall -g -O2
|
CXXFLAGS = -Wall
|
||||||
ARFLAGS = cr
|
ARFLAGS = cr
|
||||||
|
|
||||||
INCLUDES = -I../../
|
INCLUDES = -I../../
|
||||||
|
@ -56,7 +56,15 @@ OBJECTS = ../Collision/Shapes/b2ChainShape.o \
|
||||||
../Dynamics/b2WorldCallbacks.o \
|
../Dynamics/b2WorldCallbacks.o \
|
||||||
../Rope/b2Rope.o
|
../Rope/b2Rope.o
|
||||||
|
|
||||||
|
debug: CCFLAGS += -g3 -O0
|
||||||
|
debug: CXXFLAGS += -g3 -O0
|
||||||
|
debug: DEFINES += -DDEBUG
|
||||||
|
debug: $(TARGET)
|
||||||
|
|
||||||
|
release: CCFLAGS += -O3
|
||||||
|
release: CXXFLAGS += -O3
|
||||||
|
release: DEFINES += -DNDEBUG
|
||||||
|
release: $(TARGET)
|
||||||
|
|
||||||
####### Build rules
|
####### Build rules
|
||||||
$(TARGET): $(OBJECTS)
|
$(TARGET): $(OBJECTS)
|
||||||
|
|
|
@ -2,8 +2,8 @@ CC = gcc
|
||||||
CXX = g++
|
CXX = g++
|
||||||
AR = ar
|
AR = ar
|
||||||
TARGET = libchipmunk.a
|
TARGET = libchipmunk.a
|
||||||
CCFLAGS = -Wall -g -O2 -std=gnu99
|
CCFLAGS = -Wall -std=gnu99
|
||||||
CXXFLAGS = -Wall -g -O2
|
CXXFLAGS = -Wall
|
||||||
ARFLAGS = cr
|
ARFLAGS = cr
|
||||||
|
|
||||||
INCLUDES = -I../include/chipmunk
|
INCLUDES = -I../include/chipmunk
|
||||||
|
@ -40,6 +40,15 @@ OBJECTS = ../src/chipmunk.o \
|
||||||
../src/constraints/cpSlideJoint.o \
|
../src/constraints/cpSlideJoint.o \
|
||||||
../src/constraints/cpPinJoint.o \
|
../src/constraints/cpPinJoint.o \
|
||||||
|
|
||||||
|
debug: CCFLAGS += -g3 -O0
|
||||||
|
debug: CXXFLAGS += -g3 -O0
|
||||||
|
debug: DEFINES += -DDEBUG
|
||||||
|
debug: $(TARGET)
|
||||||
|
|
||||||
|
release: CCFLAGS += -O3
|
||||||
|
release: CXXFLAGS += -O3
|
||||||
|
release: DEFINES += -DNDEBIG
|
||||||
|
release: $(TARGET)
|
||||||
|
|
||||||
####### Build rules
|
####### Build rules
|
||||||
$(TARGET): $(OBJECTS)
|
$(TARGET): $(OBJECTS)
|
||||||
|
|
|
@ -6,6 +6,7 @@ TXTCOLOR_GREEN="\033[0;32m"
|
||||||
|
|
||||||
COCOS2DX20_TRUNK=`pwd`
|
COCOS2DX20_TRUNK=`pwd`
|
||||||
OUTPUT_DEBUG=$COCOS2DX20_TRUNK/lib/linux/Debug/
|
OUTPUT_DEBUG=$COCOS2DX20_TRUNK/lib/linux/Debug/
|
||||||
|
OUTPUT_RELEASE=$COCOS2DX20_TRUNK/lib/linux/Release/
|
||||||
|
|
||||||
check_make_result()
|
check_make_result()
|
||||||
{
|
{
|
||||||
|
@ -55,30 +56,51 @@ if ! test -d $OUTPUT_DEBUG; then
|
||||||
mkdir $OUTPUT_DEBUG -p
|
mkdir $OUTPUT_DEBUG -p
|
||||||
fi
|
fi
|
||||||
|
|
||||||
make -C $COCOS2DX20_TRUNK/external/Box2D/proj.linux
|
make -C $COCOS2DX20_TRUNK/external/Box2D/proj.linux clean
|
||||||
|
make -C $COCOS2DX20_TRUNK/external/Box2D/proj.linux debug
|
||||||
check_make_result
|
check_make_result
|
||||||
cp $COCOS2DX20_TRUNK/external/Box2D/proj.linux/libbox2d.a $OUTPUT_DEBUG
|
cp $COCOS2DX20_TRUNK/external/Box2D/proj.linux/libbox2d.a $OUTPUT_DEBUG
|
||||||
|
|
||||||
make -C $COCOS2DX20_TRUNK/external/chipmunk/proj.linux
|
make -C $COCOS2DX20_TRUNK/external/Box2D/proj.linux clean
|
||||||
|
make -C $COCOS2DX20_TRUNK/external/Box2D/proj.linux release
|
||||||
|
check_make_result
|
||||||
|
cp $COCOS2DX20_TRUNK/external/Box2D/proj.linux/libbox2d.a $OUTPUT_RELEASE
|
||||||
|
|
||||||
|
make -C $COCOS2DX20_TRUNK/external/chipmunk/proj.linux clean
|
||||||
|
make -C $COCOS2DX20_TRUNK/external/chipmunk/proj.linux debug
|
||||||
check_make_result
|
check_make_result
|
||||||
cp $COCOS2DX20_TRUNK/external/chipmunk/proj.linux/libchipmunk.a $OUTPUT_DEBUG
|
cp $COCOS2DX20_TRUNK/external/chipmunk/proj.linux/libchipmunk.a $OUTPUT_DEBUG
|
||||||
|
|
||||||
make -C $COCOS2DX20_TRUNK/cocos2dx/proj.linux
|
make -C $COCOS2DX20_TRUNK/external/chipmunk/proj.linux clean
|
||||||
|
make -C $COCOS2DX20_TRUNK/external/chipmunk/proj.linux release
|
||||||
|
check_make_result
|
||||||
|
cp $COCOS2DX20_TRUNK/external/chipmunk/proj.linux/libchipmunk.a $OUTPUT_RELEASE
|
||||||
|
|
||||||
|
make -C $COCOS2DX20_TRUNK/cocos2dx/proj.linux clean
|
||||||
|
make -C $COCOS2DX20_TRUNK/cocos2dx/proj.linux debug
|
||||||
check_make_result
|
check_make_result
|
||||||
cp $COCOS2DX20_TRUNK/cocos2dx/proj.linux/libcocos2d.so $OUTPUT_DEBUG
|
cp $COCOS2DX20_TRUNK/cocos2dx/proj.linux/libcocos2d.so $OUTPUT_DEBUG
|
||||||
|
rm $COCOS2DX20_TRUNK/cocos2dx/proj.linux/libcocos2d.so
|
||||||
|
|
||||||
make -C $COCOS2DX20_TRUNK/CocosDenshion/proj.linux
|
make -C $COCOS2DX20_TRUNK/cocos2dx/proj.linux clean
|
||||||
|
make -C $COCOS2DX20_TRUNK/cocos2dx/proj.linux release
|
||||||
|
check_make_result
|
||||||
|
cp $COCOS2DX20_TRUNK/cocos2dx/proj.linux/libcocos2d.so $OUTPUT_RELEASE
|
||||||
|
rm $COCOS2DX20_TRUNK/cocos2dx/proj.linux/libcocos2d.so
|
||||||
|
|
||||||
|
make -C $COCOS2DX20_TRUNK/CocosDenshion/proj.linux clean
|
||||||
|
make -C $COCOS2DX20_TRUNK/CocosDenshion/proj.linux debug
|
||||||
check_make_result
|
check_make_result
|
||||||
cp $COCOS2DX20_TRUNK/CocosDenshion/proj.linux/libcocosdenshion.so $OUTPUT_DEBUG
|
cp $COCOS2DX20_TRUNK/CocosDenshion/proj.linux/libcocosdenshion.so $OUTPUT_DEBUG
|
||||||
|
|
||||||
|
make -C $COCOS2DX20_TRUNK/CocosDenshion/proj.linux clean
|
||||||
make -C $COCOS2DX20_TRUNK/samples/TestCpp/proj.linux clean
|
make -C $COCOS2DX20_TRUNK/CocosDenshion/proj.linux release
|
||||||
make -C $COCOS2DX20_TRUNK/samples/TestCpp/proj.linux
|
|
||||||
check_make_result
|
|
||||||
make -C $COCOS2DX20_TRUNK/samples/HelloCpp/proj.linux clean
|
|
||||||
make -C $COCOS2DX20_TRUNK/samples/HelloCpp/proj.linux
|
|
||||||
check_make_result
|
check_make_result
|
||||||
|
cp $COCOS2DX20_TRUNK/CocosDenshion/proj.linux/libcocosdenshion.so $OUTPUT_RELEASE
|
||||||
|
|
||||||
#cd $COCOS2DX20_TRUNK/tests/proj.linux
|
#make -C $COCOS2DX20_TRUNK/samples/TestCpp/proj.linux clean
|
||||||
#./cocos2dx-test
|
#make -C $COCOS2DX20_TRUNK/samples/TestCpp/proj.linux
|
||||||
#cd -
|
#check_make_result
|
||||||
|
#make -C $COCOS2DX20_TRUNK/samples/HelloCpp/proj.linux clean
|
||||||
|
#make -C $COCOS2DX20_TRUNK/samples/HelloCpp/proj.linux
|
||||||
|
#check_make_result
|
||||||
|
|
Loading…
Reference in New Issue