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
|
||||
CXX = g++
|
||||
TARGET = libcocosdenshion.so
|
||||
CCFLAGS = -Wall -g -O2 -fPIC
|
||||
CXXFLAGS = -Wall -g -O2 -fPIC
|
||||
CCFLAGS = -Wall -fPIC
|
||||
CXXFLAGS = -Wall -fPIC
|
||||
VISIBILITY =
|
||||
|
||||
LBITS := $(shell getconf LONG_BIT)
|
||||
|
@ -32,17 +32,26 @@ SHAREDLIBS_DIR = ../third_party/fmod/api/lib
|
|||
SHAREDLIBS = -L$(SHAREDLIBS_DIR) -lfmodex
|
||||
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
|
||||
$(TARGET): $(OBJECTS)
|
||||
$(CXX) $(CXXFLAGS) $(INCLUDES) $(DEFINES) $(OBJECTS) -shared -o $(TARGET) $(SHAREDLIBS) $(STATICLIBS)
|
||||
|
||||
|
||||
####### Compile
|
||||
%.o: %.cpp
|
||||
$(CXX) $(CXXFLAGS) $(INCLUDES) $(DEFINES) $(VISIBILITY) -c $< -o $@
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CCFLAGS) $(INCLUDES) $(DEFINES) $(VISIBILITY) -c $< -o $@
|
||||
|
||||
|
||||
clean:
|
||||
rm -f $(OBJECTS) $(TARGET) core
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
CC = gcc
|
||||
CXX = g++
|
||||
TARGET = libcocos2d.so
|
||||
CCFLAGS = -Wall -g -fPIC #-O2
|
||||
CXXFLAGS = -Wall -g -fPIC #-O2
|
||||
CCFLAGS = -Wall -fPIC
|
||||
CXXFLAGS = -Wall -fPIC
|
||||
VISIBILITY =
|
||||
|
||||
LIBS =
|
||||
|
@ -202,17 +202,26 @@ SHAREDLIBS += -lglfw -lGL -lcurl
|
|||
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
|
||||
|
||||
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
|
||||
$(TARGET): $(OBJECTS)
|
||||
$(CXX) $(CXXFLAGS) $(INCLUDES) $(DEFINES) $(OBJECTS) -shared -o $(TARGET) $(SHAREDLIBS) $(STATICLIBS) $(LIBS)
|
||||
|
||||
|
||||
####### Compile
|
||||
%.o: %.cpp
|
||||
$(CXX) $(CXXFLAGS) $(INCLUDES) $(DEFINES) $(VISIBILITY) -c $< -o $@
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CCFLAGS) $(INCLUDES) $(DEFINES) $(VISIBILITY) -c $< -o $@
|
||||
|
||||
|
||||
clean:
|
||||
rm -f $(OBJECTS) $(TARGET) core
|
||||
|
|
|
@ -2,8 +2,8 @@ CC = gcc
|
|||
CXX = g++
|
||||
AR = ar
|
||||
TARGET = libbox2d.a
|
||||
CCFLAGS = -Wall -g -O2
|
||||
CXXFLAGS = -Wall -g -O2
|
||||
CCFLAGS = -Wall
|
||||
CXXFLAGS = -Wall
|
||||
ARFLAGS = cr
|
||||
|
||||
INCLUDES = -I../../
|
||||
|
@ -56,18 +56,26 @@ OBJECTS = ../Collision/Shapes/b2ChainShape.o \
|
|||
../Dynamics/b2WorldCallbacks.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
|
||||
$(TARGET): $(OBJECTS)
|
||||
$(AR) $(ARFLAGS) $(TARGET) $(OBJECTS)
|
||||
|
||||
|
||||
####### Compile
|
||||
%.o: %.cpp
|
||||
$(CXX) $(CXXFLAGS) $(INCLUDES) $(DEFINES) -c $< -o $@
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CCFLAGS) $(INCLUDES) $(DEFINES) -c $< -o $@
|
||||
|
||||
|
||||
clean:
|
||||
rm -f $(OBJECTS) $(TARGET) core
|
||||
|
|
|
@ -2,8 +2,8 @@ CC = gcc
|
|||
CXX = g++
|
||||
AR = ar
|
||||
TARGET = libchipmunk.a
|
||||
CCFLAGS = -Wall -g -O2 -std=gnu99
|
||||
CXXFLAGS = -Wall -g -O2
|
||||
CCFLAGS = -Wall -std=gnu99
|
||||
CXXFLAGS = -Wall
|
||||
ARFLAGS = cr
|
||||
|
||||
INCLUDES = -I../include/chipmunk
|
||||
|
@ -40,17 +40,26 @@ OBJECTS = ../src/chipmunk.o \
|
|||
../src/constraints/cpSlideJoint.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
|
||||
$(TARGET): $(OBJECTS)
|
||||
$(AR) $(ARFLAGS) $(TARGET) $(OBJECTS)
|
||||
|
||||
|
||||
####### Compile
|
||||
%.o: %.cpp
|
||||
$(CXX) $(CXXFLAGS) $(INCLUDES) $(DEFINES) -c $< -o $@
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CCFLAGS) $(INCLUDES) $(DEFINES) -c $< -o $@
|
||||
|
||||
|
||||
clean:
|
||||
rm -f $(OBJECTS) $(TARGET) core
|
||||
|
|
|
@ -6,6 +6,7 @@ TXTCOLOR_GREEN="\033[0;32m"
|
|||
|
||||
COCOS2DX20_TRUNK=`pwd`
|
||||
OUTPUT_DEBUG=$COCOS2DX20_TRUNK/lib/linux/Debug/
|
||||
OUTPUT_RELEASE=$COCOS2DX20_TRUNK/lib/linux/Release/
|
||||
|
||||
check_make_result()
|
||||
{
|
||||
|
@ -55,30 +56,51 @@ if ! test -d $OUTPUT_DEBUG; then
|
|||
mkdir $OUTPUT_DEBUG -p
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
cp $COCOS2DX20_TRUNK/CocosDenshion/proj.linux/libcocosdenshion.so $OUTPUT_DEBUG
|
||||
|
||||
|
||||
make -C $COCOS2DX20_TRUNK/samples/TestCpp/proj.linux clean
|
||||
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
|
||||
make -C $COCOS2DX20_TRUNK/CocosDenshion/proj.linux clean
|
||||
make -C $COCOS2DX20_TRUNK/CocosDenshion/proj.linux release
|
||||
check_make_result
|
||||
cp $COCOS2DX20_TRUNK/CocosDenshion/proj.linux/libcocosdenshion.so $OUTPUT_RELEASE
|
||||
|
||||
#cd $COCOS2DX20_TRUNK/tests/proj.linux
|
||||
#./cocos2dx-test
|
||||
#cd -
|
||||
#make -C $COCOS2DX20_TRUNK/samples/TestCpp/proj.linux clean
|
||||
#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
|
||||
|
|
Loading…
Reference in New Issue