2013-03-02 01:09:58 +08:00
|
|
|
COCOS_ROOT = ../../../..
|
|
|
|
COCOS2DX_PATH = $(COCOS_ROOT)/cocos2dx
|
|
|
|
INCLUDES = -I../ -I../Classes
|
|
|
|
|
|
|
|
SOURCES = main.cpp \
|
|
|
|
../Classes/AppDelegate.cpp \
|
|
|
|
../Classes/HelloWorldScene.cpp
|
|
|
|
|
|
|
|
include $(COCOS_ROOT)/cocos2dx/proj.nacl/cocos2dx.mk
|
|
|
|
|
|
|
|
APP_NAME = HelloCpp
|
|
|
|
TARGET = $(BIN_DIR)/$(APP_NAME)_$(NACL_ARCH).nexe
|
|
|
|
NMF = $(BIN_DIR)/$(APP_NAME).nmf
|
|
|
|
|
|
|
|
all: $(NMF)
|
|
|
|
|
2013-03-05 02:19:50 +08:00
|
|
|
$(TARGET): $(OBJECTS) $(LIB_DIR)/libcocos2d.a $(CORE_MAKEFILE_LIST)
|
2013-03-02 01:09:58 +08:00
|
|
|
@mkdir -p $(@D)
|
2013-03-05 02:19:50 +08:00
|
|
|
$(LOG_LINK)$(NACL_CXX) $(CXXFLAGS) $(LDFLAGS) $(OBJECTS) -o $@ $(SHAREDLIBS) $(STATICLIBS)
|
2013-03-02 01:09:58 +08:00
|
|
|
|
2013-03-05 02:19:50 +08:00
|
|
|
$(OBJ_DIR)/%.o: ../%.cpp $(CORE_MAKEFILE_LIST)
|
2013-03-02 01:09:58 +08:00
|
|
|
@mkdir -p $(@D)
|
2013-03-05 02:19:50 +08:00
|
|
|
$(LOG_CXX)$(NACL_CXX) -MMD $(CXXFLAGS) $(INCLUDES) $(DEFINES) -c $< -o $@
|
2013-03-02 01:09:58 +08:00
|
|
|
|
2013-03-05 02:19:50 +08:00
|
|
|
$(OBJ_DIR)/%.o: %.cpp $(CORE_MAKEFILE_LIST)
|
2013-03-02 01:09:58 +08:00
|
|
|
@mkdir -p $(@D)
|
2013-03-05 02:19:50 +08:00
|
|
|
$(LOG_CXX)$(NACL_CXX) -MMD $(CXXFLAGS) $(INCLUDES) $(DEFINES) -c $< -o $@
|
2013-03-02 01:09:58 +08:00
|
|
|
|
|
|
|
$(NMF): $(TARGET)
|
2013-05-03 03:59:16 +08:00
|
|
|
$(NACL_SDK_ROOT)/tools/create_nmf.py -o $@ $(BIN_DIR)/*.nexe -s $(BIN_DIR) $(NMF_FLAGS)
|
2013-03-02 01:09:58 +08:00
|
|
|
|
|
|
|
run: all
|
|
|
|
/bin/cp -ar ../Resources/ .
|
|
|
|
$(NACL_SDK_ROOT)/tools/httpd.py --no_dir_check
|
|
|
|
|
2013-03-05 02:19:50 +08:00
|
|
|
.PHONY: run
|