Build fixes for emscripten, add linkage to libfreetype.a

This commit is contained in:
James Gregory 2013-04-03 21:43:31 -07:00
parent fab342f931
commit 520832c1ed
1 changed files with 6 additions and 15 deletions

View File

@ -14,8 +14,8 @@ OBJ_DIR ?= obj
CC := $(COCOS_ROOT)/external/emscripten/emcc CC := $(COCOS_ROOT)/external/emscripten/emcc
CXX := $(COCOS_ROOT)/external/emscripten/em++ CXX := $(COCOS_ROOT)/external/emscripten/em++
AR := $(COCOS_ROOT)/external/emscripten/emar AR := $(COCOS_ROOT)/external/emscripten/emar
CCFLAGS += -MMD -Wall -fPIC -Qunused-arguments CCFLAGS += -MMD -Wall -fPIC -Qunused-arguments -Wno-overloaded-virtual -Qunused-variable
CXXFLAGS += -MMD -Wall -fPIC -Qunused-arguments CXXFLAGS += -MMD -Wall -fPIC -Qunused-arguments -Wno-overloaded-virtual -Qunused-variable
ARFLAGS = cr ARFLAGS = cr
LIB_DIR = $(COCOS_SRC)/lib/linux LIB_DIR = $(COCOS_SRC)/lib/linux
@ -48,8 +48,8 @@ OBJ_DIR := $(OBJ_DIR)/debug
LIB_DIR := $(LIB_DIR)/debug LIB_DIR := $(LIB_DIR)/debug
BIN_DIR := $(BIN_DIR)/debug BIN_DIR := $(BIN_DIR)/debug
else else
CCFLAGS += -O1 CCFLAGS += -O0
CXXFLAGS += -O1 CXXFLAGS += -O0
DEFINES += -DNDEBUG DEFINES += -DNDEBUG
OBJ_DIR := $(OBJ_DIR)/release OBJ_DIR := $(OBJ_DIR)/release
LIB_DIR := $(LIB_DIR)/release LIB_DIR := $(LIB_DIR)/release
@ -72,24 +72,15 @@ DEPS = $(OBJECTS:.o=.d)
CORE_MAKEFILE_LIST := $(MAKEFILE_LIST) CORE_MAKEFILE_LIST := $(MAKEFILE_LIST)
-include $(DEPS) -include $(DEPS)
ifeq ($(LBITS),64) STATICLIBS_DIR = $(COCOS_SRC)/platform/third_party/emscripten/libraries
STATICLIBS_DIR = $(COCOS_SRC)/platform/third_party/linux/libraries/lib64 STATICLIBS = $(STATICLIBS_DIR)/libfreetype.a #\
else
STATICLIBS_DIR = $(COCOS_SRC)/platform/third_party/linux/libraries
endif
STATICLIBS = $(STATICLIBS_DIR)/libfreetype.a \
$(STATICLIBS_DIR)/libpng.a \ $(STATICLIBS_DIR)/libpng.a \
$(STATICLIBS_DIR)/libjpeg.a \ $(STATICLIBS_DIR)/libjpeg.a \
$(STATICLIBS_DIR)/libtiff.a \ $(STATICLIBS_DIR)/libtiff.a \
$(STATICLIBS_DIR)/libwebp.a $(STATICLIBS_DIR)/libwebp.a
ifeq ($(LBITS),64)
FMOD_LIBDIR = $(COCOS_ROOT)/CocosDenshion/third_party/fmod/lib64/api/lib
SHAREDLIBS += -lfmodex64
else
FMOD_LIBDIR = $(COCOS_ROOT)/CocosDenshion/third_party/fmod/api/lib FMOD_LIBDIR = $(COCOS_ROOT)/CocosDenshion/third_party/fmod/api/lib
SHAREDLIBS += -lfmodex SHAREDLIBS += -lfmodex
endif
SHAREDLIBS += -lglfw -lGLEW -lfontconfig SHAREDLIBS += -lglfw -lGLEW -lfontconfig
SHAREDLIBS += -L$(FMOD_LIBDIR) -Wl,-rpath,$(RPATH_REL)/$(FMOD_LIBDIR) SHAREDLIBS += -L$(FMOD_LIBDIR) -Wl,-rpath,$(RPATH_REL)/$(FMOD_LIBDIR)