axmol/samples/Lua/HelloLua/proj.nacl/Makefile

67 lines
2.3 KiB
Makefile
Raw Normal View History

2013-03-02 01:09:58 +08:00
COCOS_ROOT = ../../../..
COCOS2DX_PATH = $(COCOS_ROOT)/cocos2dx
INCLUDES = -I.. \
-I../Classes \
-I$(COCOS_ROOT)/CocosDenshion/include \
-I$(COCOS_ROOT)/scripting/lua/lua \
-I$(COCOS_ROOT)/scripting/lua/tolua \
-I$(COCOS_ROOT)/scripting/lua/cocos2dx_support \
-I$(NACL_SDK_ROOT)/include \
2013-06-08 16:08:55 +08:00
-I$(COCOS_ROOT)/external \
2013-05-24 13:55:05 +08:00
-I$(COCOS_ROOT)/external/chipmunk/include/chipmunk \
-I$(COCOS_ROOT)/extensions \
2013-06-08 15:35:45 +08:00
-I$(COCOS_ROOT)/extensions/Components
2013-05-24 11:42:27 +08:00
2013-03-02 01:09:58 +08:00
SOURCES = main.cpp \
../Classes/AppDelegate.cpp \
$(COCOS_ROOT)/scripting/lua/cocos2dx_support/CCLuaEngine.cpp \
$(COCOS_ROOT)/scripting/lua/cocos2dx_support/CCLuaStack.cpp \
$(COCOS_ROOT)/scripting/lua/cocos2dx_support/Cocos2dxLuaLoader.cpp \
$(COCOS_ROOT)/scripting/lua/cocos2dx_support/LuaCocos2d.cpp \
2013-06-08 16:08:55 +08:00
$(COCOS_ROOT)/scripting/lua/cocos2dx_support/tolua_fix.c \
$(COCOS_ROOT)/scripting/lua/cocos2dx_support/CCBProxy.cpp \
$(COCOS_ROOT)/scripting/lua/cocos2dx_support/Lua_extensions_CCB.cpp
2013-03-02 01:09:58 +08:00
2013-05-24 11:42:27 +08:00
include $(COCOS2DX_PATH)/../extensions/proj.nacl/Makefile
SOURCES += $(addprefix $(COCOS_ROOT)/extensions/, $(EXTENSIONS_SOURCES))
2013-03-02 01:09:58 +08:00
include $(COCOS_ROOT)/cocos2dx/proj.nacl/cocos2dx.mk
2013-05-24 11:42:27 +08:00
CXXFLAGS += -Wno-multichar
2013-06-08 16:08:55 +08:00
STATICLIBS += -llua -lnosys
SHAREDLIBS += -lbox2d
2013-05-24 11:42:27 +08:00
2013-03-02 01:09:58 +08:00
APP_NAME = HelloLua
TARGET = $(BIN_DIR)/$(APP_NAME)_$(NACL_ARCH).nexe
NMF = $(BIN_DIR)/$(APP_NAME).nmf
all: $(NMF)
$(TARGET): $(OBJECTS) $(LIB_DIR)/libcocos2d.a
@mkdir -p $(@D)
$(LOG_LINK)$(NACL_CXX) $(CXXFLAGS) $(LDFLAGS) $(OBJECTS) -o $@ $(SHAREDLIBS) $(STATICLIBS)
2013-03-02 01:09:58 +08:00
$(OBJ_DIR)/%.o: ../%.cpp
@mkdir -p $(@D)
$(LOG_CXX)$(NACL_CXX) -MMD $(CXXFLAGS) $(INCLUDES) $(DEFINES) -c $< -o $@
2013-03-02 01:09:58 +08:00
$(OBJ_DIR)/%.o: %.cpp
@mkdir -p $(@D)
$(LOG_CXX)$(NACL_CXX) -MMD $(CXXFLAGS) $(INCLUDES) $(DEFINES) -c $< -o $@
2013-03-02 01:09:58 +08:00
$(OBJ_DIR)/%.o: $(COCOS_ROOT)/%.cpp
@mkdir -p $(@D)
$(LOG_CXX)$(NACL_CXX) -MMD $(CXXFLAGS) $(INCLUDES) $(DEFINES) -c $< -o $@
2013-03-02 01:09:58 +08:00
$(OBJ_DIR)/%.o: $(COCOS_ROOT)/%.c
@mkdir -p $(@D)
$(LOG_CC)$(NACL_CC) -MMD $(CCFLAGS) $(INCLUDES) $(DEFINES) -c $< -o $@
2013-03-02 01:09:58 +08:00
$(NMF): $(TARGET)
$(NACL_SDK_ROOT)/tools/create_nmf.py -o $@ $(BIN_DIR)/*.nexe --objdump=i686-nacl-objdump -L$(NACL_SDK_ROOT)/toolchain/linux_x86_newlib/x86_64-nacl/lib/ -s $(BIN_DIR)
run: all
/bin/cp -ar ../Resources/ .
$(NACL_SDK_ROOT)/tools/httpd.py --no_dir_check