mirror of https://github.com/axmolengine/axmol.git
make-all-linux now builds debug & release, testCpp also gets both
This commit is contained in:
parent
4a4ef87163
commit
4d04a1863b
|
@ -51,10 +51,12 @@ if ! test -d $DIR_GLEW170/glew-1.7.0/; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
OUTPUT_DEBUG=$COCOS2DX20_TRUNK/lib/linux/Debug/
|
#OUTPUT_DEBUG=$COCOS2DX20_TRUNK/lib/linux/Debug/
|
||||||
if ! test -d $OUTPUT_DEBUG; then
|
#if ! test -d $OUTPUT_DEBUG; then
|
||||||
mkdir $OUTPUT_DEBUG -p
|
# mkdir $OUTPUT_DEBUG -p
|
||||||
fi
|
#fi
|
||||||
|
mkdir -p $OUTPUT_DEBUG
|
||||||
|
mkdir -p $OUTPUT_RELEASE
|
||||||
|
|
||||||
make -C $COCOS2DX20_TRUNK/external/Box2D/proj.linux clean
|
make -C $COCOS2DX20_TRUNK/external/Box2D/proj.linux clean
|
||||||
make -C $COCOS2DX20_TRUNK/external/Box2D/proj.linux debug
|
make -C $COCOS2DX20_TRUNK/external/Box2D/proj.linux debug
|
||||||
|
@ -98,9 +100,13 @@ make -C $COCOS2DX20_TRUNK/CocosDenshion/proj.linux release
|
||||||
check_make_result
|
check_make_result
|
||||||
cp $COCOS2DX20_TRUNK/CocosDenshion/proj.linux/libcocosdenshion.so $OUTPUT_RELEASE
|
cp $COCOS2DX20_TRUNK/CocosDenshion/proj.linux/libcocosdenshion.so $OUTPUT_RELEASE
|
||||||
|
|
||||||
#make -C $COCOS2DX20_TRUNK/samples/TestCpp/proj.linux clean
|
make -C $COCOS2DX20_TRUNK/samples/TestCpp/proj.linux clean
|
||||||
#make -C $COCOS2DX20_TRUNK/samples/TestCpp/proj.linux
|
make -C $COCOS2DX20_TRUNK/samples/TestCpp/proj.linux debug
|
||||||
#check_make_result
|
check_make_result
|
||||||
|
make -C $COCOS2DX20_TRUNK/samples/TestCpp/proj.linux clean
|
||||||
|
make -C $COCOS2DX20_TRUNK/samples/TestCpp/proj.linux release
|
||||||
|
check_make_result
|
||||||
|
|
||||||
#make -C $COCOS2DX20_TRUNK/samples/HelloCpp/proj.linux clean
|
#make -C $COCOS2DX20_TRUNK/samples/HelloCpp/proj.linux clean
|
||||||
#make -C $COCOS2DX20_TRUNK/samples/HelloCpp/proj.linux
|
#make -C $COCOS2DX20_TRUNK/samples/HelloCpp/proj.linux
|
||||||
#check_make_result
|
#check_make_result
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
CC = gcc
|
CC = gcc
|
||||||
CXX = g++
|
CXX = g++
|
||||||
TARGET = TestCpp
|
TARGET = TestCpp
|
||||||
CCFLAGS = -Wall -g #-O2
|
CCFLAGS = -Wall
|
||||||
CXXFLAGS = -Wall -g #-O2
|
CXXFLAGS = -Wall
|
||||||
VISIBILITY =
|
VISIBILITY =
|
||||||
LIBS =
|
LIBS =
|
||||||
|
|
||||||
|
@ -136,7 +136,6 @@ STATICLIBS = $(STATICLIBS_DIR)/libfreetype.a \
|
||||||
$(STATICLIBS_DIR)/libtiff.a \
|
$(STATICLIBS_DIR)/libtiff.a \
|
||||||
../../../lib/linux/Debug/libbox2d.a \
|
../../../lib/linux/Debug/libbox2d.a \
|
||||||
../../../lib/linux/Debug/libchipmunk.a \
|
../../../lib/linux/Debug/libchipmunk.a \
|
||||||
# $(STATICLIBS_DIR)/libGLEW.a \
|
|
||||||
|
|
||||||
SHAREDLIBS =
|
SHAREDLIBS =
|
||||||
ifeq ($(LBITS),64)
|
ifeq ($(LBITS),64)
|
||||||
|
@ -148,20 +147,36 @@ SHAREDLIBS = -L$(SHAREDLIBS_DIR) -lfmodex
|
||||||
endif
|
endif
|
||||||
|
|
||||||
SHAREDLIBS += -lglfw -lGL
|
SHAREDLIBS += -lglfw -lGL
|
||||||
#SHAREDLIBS += -lGLEW
|
#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/
|
SHAREDLIBS += -Wl,-rpath,../../$(SHAREDLIBS_DIR)
|
||||||
SHAREDLIBS += -Wl,-rpath,../$(SHAREDLIBS_DIR)
|
#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
|
||||||
|
SHAREDLIBS += -Wl,-rpath,../../../../../cocos2dx/platform/third_party/linux/glew-1.7.0/glew-1.7.0/lib
|
||||||
|
|
||||||
|
|
||||||
SHAREDLIBS += -Wl,-rpath,../$(STATICLIBS_DIR)
|
SHAREDLIBS += -Wl,-rpath,../$(STATICLIBS_DIR)
|
||||||
SHAREDLIBS += -lcurl
|
SHAREDLIBS += -lcurl
|
||||||
|
|
||||||
BIN_DIR=bin
|
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
|
||||||
|
debug: DEFINES += -DDEBUG
|
||||||
|
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
|
||||||
|
release: DEFINES += -DNDEBUG
|
||||||
|
release: BIN_DIR = $(BIN_DIR_ROOT)/release
|
||||||
|
release: $(TARGET)
|
||||||
|
|
||||||
####### Build rules
|
####### Build rules
|
||||||
$(TARGET): $(OBJECTS)
|
$(TARGET): $(OBJECTS)
|
||||||
test -d $(BIN_DIR) || mkdir $(BIN_DIR)
|
mkdir -p $(BIN_DIR)
|
||||||
$(CXX) $(CXXFLAGS) $(INCLUDES) $(DEFINES) $(OBJECTS) -o $(BIN_DIR)/$(TARGET) $(SHAREDLIBS) $(STATICLIBS) $(LIBS)
|
$(CXX) $(CXXFLAGS) $(INCLUDES) $(DEFINES) $(OBJECTS) -o $(BIN_DIR)/$(TARGET) $(SHAREDLIBS) $(STATICLIBS) $(LIBS)
|
||||||
|
|
||||||
|
|
||||||
|
@ -175,4 +190,3 @@ $(TARGET): $(OBJECTS)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f $(OBJECTS) $(TARGET) core
|
rm -f $(OBJECTS) $(TARGET) core
|
||||||
rm -r $(BIN_DIR)
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ int main(int argc, char **argv)
|
||||||
|
|
||||||
std::string resourcePath = fullpath;
|
std::string resourcePath = fullpath;
|
||||||
resourcePath = resourcePath.substr(0, resourcePath.find_last_of("/"));
|
resourcePath = resourcePath.substr(0, resourcePath.find_last_of("/"));
|
||||||
resourcePath += "/../../Resources/";
|
resourcePath += "/../../../Resources/";
|
||||||
|
|
||||||
// create the application instance
|
// create the application instance
|
||||||
AppDelegate app;
|
AppDelegate app;
|
||||||
|
|
Loading…
Reference in New Issue