mirror of https://github.com/axmolengine/axmol.git
modify makefile
This commit is contained in:
parent
6b2ff4605f
commit
eb9b3e3787
|
@ -17,14 +17,11 @@ DEFINES = -DLINUX
|
|||
OBJECTS = ./main.o \
|
||||
../Classes/AppDelegate.o \
|
||||
../Classes/HelloWorldScene.o
|
||||
|
||||
STATICLIBS_DIR = ../../cocos2dx/platform/third_party/linux/libraries
|
||||
STATICLIBS = ../../Box2D/lib/linux/libBox2D.a \
|
||||
../../chipmunk/lib/linux/libchipmunk.a \
|
||||
$(STATICLIBS_DIR)/libcurl.a
|
||||
|
||||
|
||||
STATICLIBS =
|
||||
SHAREDLIBS = -L../../lib/linux/Debug -lcocos2d -lrt -lz -lcocosdenshion -Wl,-rpath,../../lib/linux/Debug/
|
||||
|
||||
$(shell ../../build-linux.sh $<)
|
||||
####### Build rules
|
||||
$(TARGET): $(OBJECTS)
|
||||
$(CXX) $(CXXFLAGS) $(INCLUDES) $(DEFINES) $(OBJECTS) -o $(TARGET) $(SHAREDLIBS) $(STATICLIBS)
|
||||
|
@ -37,4 +34,4 @@ $(TARGET): $(OBJECTS)
|
|||
$(CC) $(CCFLAGS) $(INCLUDES) $(DEFINES) $(VISIBILITY) -c $< -o $@
|
||||
|
||||
clean:
|
||||
rm -f $(OBJECTS) $(TARGET) core
|
||||
rm -f $(OBJECTS) $(TARGET) core
|
||||
|
|
|
@ -1,4 +1,10 @@
|
|||
#!/bin/sh
|
||||
#p=$(dirname $_)
|
||||
#echo "$p"
|
||||
|
||||
path=$(dirname $0)
|
||||
path=${path/\./$(pwd)}
|
||||
echo $path
|
||||
|
||||
if [ ! -d "lib" ]; then
|
||||
mkdir "lib"
|
||||
|
@ -8,10 +14,6 @@ if [ ! -d "lib/linux" ]; then
|
|||
mkdir "lib/linux"
|
||||
fi
|
||||
|
||||
if [ ! -d "lib/android" ]; then
|
||||
mkdir "lib/android"
|
||||
fi
|
||||
|
||||
if [ ! -d "lib/linux/Debug" ]; then
|
||||
mkdir "lib/linux/Debug"
|
||||
fi
|
||||
|
@ -20,54 +22,29 @@ if [ ! -d "lib/linux/Release" ]; then
|
|||
mkdir "lib/linux/Release"
|
||||
fi
|
||||
|
||||
if [ ! -d "lib/android/Debug" ]; then
|
||||
mkdir "lib/android/Debug"
|
||||
fi
|
||||
|
||||
if [ ! -d "lib/android/Release" ]; then
|
||||
mkdir "lib/android/Release"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
if [ $# -ne 0 ]; then
|
||||
if [ $1 = "clean" ]; then
|
||||
cd ./cocos2dx/proj.linux
|
||||
cd $p/cocos2dx/proj.linux
|
||||
make clean
|
||||
|
||||
cd ../../
|
||||
cd ./CocosDenshion/proj.linux
|
||||
cd $p/CocosDenshion/proj.linux
|
||||
make clean
|
||||
|
||||
cd ../../
|
||||
cd ./HelloWorld/Linux
|
||||
make clean
|
||||
|
||||
cd ../../
|
||||
cd ./tests/test.linux
|
||||
make clean
|
||||
|
||||
cd ../../
|
||||
rm -r lib
|
||||
rm -r lib/linux/Debug/*.so
|
||||
fi
|
||||
|
||||
else
|
||||
cd ./cocos2dx/proj.linux
|
||||
cd $p/cocos2dx/proj.linux
|
||||
make
|
||||
|
||||
cp -f libcocos2d.so ../../lib/linux/Debug
|
||||
cd ../../
|
||||
cd ./CocosDenshion/proj.linux
|
||||
cd $p/CocosDenshion/proj.linux
|
||||
make
|
||||
|
||||
cp -f libCocosDenshion.so ../../lib/linux/Debug
|
||||
cd ../../
|
||||
cd ./HelloWorld/Linux
|
||||
make
|
||||
|
||||
cd ../../
|
||||
cd ./tests/test.linux
|
||||
make
|
||||
|
||||
cd ../../
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue