mirror of https://github.com/axmolengine/axmol.git
make HelloWorld and tests runs ok on linux
This commit is contained in:
parent
4b02dc3e45
commit
446bd86fce
|
@ -1,7 +1,7 @@
|
||||||
CC = gcc
|
CC = gcc
|
||||||
CXX = g++
|
CXX = g++
|
||||||
AR = ar
|
AR = ar
|
||||||
TARGET = libBox2D.a
|
TARGET = libbox2d.a
|
||||||
CCFLAGS = -Wall -g -O2
|
CCFLAGS = -Wall -g -O2
|
||||||
CXXFLAGS = -Wall -g -O2
|
CXXFLAGS = -Wall -g -O2
|
||||||
ARFLAGS = cr
|
ARFLAGS = cr
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
CC = gcc
|
CC = gcc
|
||||||
CXX = g++
|
CXX = g++
|
||||||
TARGET = libCocosDenshion.so
|
TARGET = libcocosdenshion.so
|
||||||
CCFLAGS = -Wall -g -O2
|
CCFLAGS = -Wall -g -O2
|
||||||
CXXFLAGS = -Wall -g -O2
|
CXXFLAGS = -Wall -g -O2
|
||||||
VISIBILITY =
|
VISIBILITY =
|
||||||
|
|
|
@ -21,7 +21,7 @@ OBJECTS = ./main.o \
|
||||||
STATICLIBS =
|
STATICLIBS =
|
||||||
SHAREDLIBS = -L../../lib/linux/Debug -lcocos2d -lrt -lz -lcocosdenshion -Wl,-rpath,../../lib/linux/Debug/
|
SHAREDLIBS = -L../../lib/linux/Debug -lcocos2d -lrt -lz -lcocosdenshion -Wl,-rpath,../../lib/linux/Debug/
|
||||||
|
|
||||||
$(shell ../../build-linux.sh $<)
|
#$(shell ../../build-linux.sh $<)
|
||||||
####### Build rules
|
####### Build rules
|
||||||
$(TARGET): $(OBJECTS)
|
$(TARGET): $(OBJECTS)
|
||||||
$(CXX) $(CXXFLAGS) $(INCLUDES) $(DEFINES) $(OBJECTS) -o $(TARGET) $(SHAREDLIBS) $(STATICLIBS)
|
$(CXX) $(CXXFLAGS) $(INCLUDES) $(DEFINES) $(OBJECTS) -o $(TARGET) $(SHAREDLIBS) $(STATICLIBS)
|
||||||
|
|
|
@ -2,9 +2,10 @@
|
||||||
#p=$(dirname $_)
|
#p=$(dirname $_)
|
||||||
#echo "$p"
|
#echo "$p"
|
||||||
|
|
||||||
path=$(dirname $0)
|
#path=$(dirname $0)
|
||||||
path=${path/\./$(pwd)}
|
#path=${path/\./$(pwd)}
|
||||||
echo $path
|
#echo $path
|
||||||
|
p=.
|
||||||
|
|
||||||
if [ ! -d "lib" ]; then
|
if [ ! -d "lib" ]; then
|
||||||
mkdir "lib"
|
mkdir "lib"
|
||||||
|
@ -31,20 +32,41 @@ if [ $# -ne 0 ]; then
|
||||||
cd $p/CocosDenshion/proj.linux
|
cd $p/CocosDenshion/proj.linux
|
||||||
make clean
|
make clean
|
||||||
|
|
||||||
|
cd ../..
|
||||||
|
cd $p/Box2D/proj.linux
|
||||||
|
make clean
|
||||||
|
|
||||||
|
cd ../..
|
||||||
|
cd $p/chipmunk/proj.linux
|
||||||
|
make clean
|
||||||
|
|
||||||
cd ../../
|
cd ../../
|
||||||
rm -r lib/linux/Debug/*.so
|
rm -r lib/linux/Debug/*.so
|
||||||
fi
|
fi
|
||||||
|
|
||||||
else
|
else
|
||||||
cd $p/cocos2dx/proj.linux
|
cd $p/cocos2dx/proj.linux
|
||||||
|
echo "**********************building cocos2dx**************************"
|
||||||
make
|
make
|
||||||
|
|
||||||
cp -f libcocos2d.so ../../lib/linux/Debug
|
cp -f libcocos2d.so ../../lib/linux/Debug
|
||||||
|
|
||||||
|
echo "**********************building cocosdenshion*********************"
|
||||||
cd ../../
|
cd ../../
|
||||||
cd $p/CocosDenshion/proj.linux
|
cd $p/CocosDenshion/proj.linux
|
||||||
make
|
make
|
||||||
|
cp -f libcocosdenshion.so ../../lib/linux/Debug
|
||||||
|
|
||||||
cp -f libCocosDenshion.so ../../lib/linux/Debug
|
echo "**********************building Box2D******************************"
|
||||||
|
cd ../..
|
||||||
|
cd $p/Box2D/proj.linux
|
||||||
|
make
|
||||||
|
cp -f libbox2d.a ../../lib/linux/Debug
|
||||||
|
|
||||||
|
echo "**********************building chipmunk***************************"
|
||||||
|
cd ../..
|
||||||
|
cd $p/chipmunk/proj.linux
|
||||||
|
make
|
||||||
|
cp -f libchipmunk.a ../../lib/linux/Debug
|
||||||
|
|
||||||
cd ../../
|
cd ../../
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -103,8 +103,8 @@ OBJECTS = ../tests/AccelerometerTest/AccelerometerTest.o \
|
||||||
./main.o
|
./main.o
|
||||||
|
|
||||||
STATICLIBS_DIR = ../../cocos2dx/platform/third_party/linux/libraries
|
STATICLIBS_DIR = ../../cocos2dx/platform/third_party/linux/libraries
|
||||||
STATICLIBS = ../../Box2D/lib/linux/libBox2D.a \
|
STATICLIBS = ../../lib/linux/Debug/libbox2d.a \
|
||||||
../../chipmunk/lib/linux/libchipmunk.a \
|
../../lib/linux/Debug/libchipmunk.a \
|
||||||
$(STATICLIBS_DIR)/libcurl.a
|
$(STATICLIBS_DIR)/libcurl.a
|
||||||
|
|
||||||
SHAREDLIBS = -L../../lib/linux/Debug -lcocos2d -lrt -lz -lcocosdenshion -Wl,-rpath,../../lib/linux/Debug/
|
SHAREDLIBS = -L../../lib/linux/Debug -lcocos2d -lrt -lz -lcocosdenshion -Wl,-rpath,../../lib/linux/Debug/
|
||||||
|
|
Loading…
Reference in New Issue