2011-09-20 14:38:12 +08:00
|
|
|
CC = gcc
|
|
|
|
CXX = g++
|
|
|
|
TARGET = HelloWorld
|
|
|
|
CCFLAGS = -Wall -g -O2
|
|
|
|
CXXFLAGS = -Wall -g -O2
|
|
|
|
VISIBILITY =
|
|
|
|
|
|
|
|
INCLUDES = -I../../cocos2dx/platform/third_party/linux \
|
|
|
|
-I../../cocos2dx/include \
|
|
|
|
-I../../cocos2dx \
|
|
|
|
-I../../cocos2dx/platform \
|
|
|
|
-I../../CocosDenshion/include \
|
|
|
|
-I../Classes/
|
|
|
|
|
|
|
|
DEFINES = -DLINUX
|
|
|
|
|
|
|
|
OBJECTS = ./main.o \
|
|
|
|
../Classes/AppDelegate.o \
|
|
|
|
../Classes/HelloWorldScene.o
|
2011-09-20 18:13:24 +08:00
|
|
|
|
|
|
|
STATICLIBS =
|
2011-09-20 14:38:12 +08:00
|
|
|
SHAREDLIBS = -L../../lib/linux/Debug -lcocos2d -lrt -lz -lcocosdenshion -Wl,-rpath,../../lib/linux/Debug/
|
|
|
|
|
2011-09-20 18:13:24 +08:00
|
|
|
$(shell ../../build-linux.sh $<)
|
2011-09-20 14:38:12 +08:00
|
|
|
####### Build rules
|
|
|
|
$(TARGET): $(OBJECTS)
|
|
|
|
$(CXX) $(CXXFLAGS) $(INCLUDES) $(DEFINES) $(OBJECTS) -o $(TARGET) $(SHAREDLIBS) $(STATICLIBS)
|
|
|
|
|
|
|
|
####### Compile
|
|
|
|
%.o: %.cpp
|
|
|
|
$(CXX) $(CXXFLAGS) $(INCLUDES) $(DEFINES) $(VISIBILITY) -c $< -o $@
|
|
|
|
|
|
|
|
%.o: %.c
|
|
|
|
$(CC) $(CCFLAGS) $(INCLUDES) $(DEFINES) $(VISIBILITY) -c $< -o $@
|
|
|
|
|
|
|
|
clean:
|
2011-09-20 18:13:24 +08:00
|
|
|
rm -f $(OBJECTS) $(TARGET) core
|