mirror of http://git.sylixos.com/liblua.git/
Hanhui
8 years ago
9 changed files with 347 additions and 1274 deletions
@ -1,317 +0,0 @@ |
|||
#*********************************************************************************************************
|
|||
# liblua Makefile
|
|||
# target -> liblua
|
|||
#*********************************************************************************************************
|
|||
|
|||
#*********************************************************************************************************
|
|||
# include config.mk
|
|||
#*********************************************************************************************************
|
|||
CONFIG_MK_EXIST = $(shell if [ -f ../config.mk ]; then echo exist; else echo notexist; fi;) |
|||
ifeq ($(CONFIG_MK_EXIST), exist) |
|||
include ../config.mk |
|||
else |
|||
CONFIG_MK_EXIST = $(shell if [ -f config.mk ]; then echo exist; else echo notexist; fi;) |
|||
ifeq ($(CONFIG_MK_EXIST), exist) |
|||
include config.mk |
|||
else |
|||
CONFIG_MK_EXIST = |
|||
endif |
|||
endif |
|||
|
|||
#*********************************************************************************************************
|
|||
# check configure
|
|||
#*********************************************************************************************************
|
|||
check_defined = \
|
|||
$(foreach 1,$1,$(__check_defined)) |
|||
__check_defined = \
|
|||
$(if $(value $1),, \
|
|||
$(error Undefined $1$(if $(value 2), ($(strip $2))))) |
|||
|
|||
$(call check_defined, CONFIG_MK_EXIST, Please configure this project in RealEvo-IDE or \ |
|||
create a config.mk file!) |
|||
$(call check_defined, SYLIXOS_BASE_PATH, SylixOS base project path) |
|||
$(call check_defined, TOOLCHAIN_PREFIX, the prefix name of toolchain) |
|||
$(call check_defined, DEBUG_LEVEL, debug level(debug or release)) |
|||
|
|||
#*********************************************************************************************************
|
|||
# toolchain select
|
|||
#*********************************************************************************************************
|
|||
CC = $(TOOLCHAIN_PREFIX)gcc |
|||
CXX = $(TOOLCHAIN_PREFIX)g++ |
|||
AS = $(TOOLCHAIN_PREFIX)gcc |
|||
AR = $(TOOLCHAIN_PREFIX)ar |
|||
LD = $(TOOLCHAIN_PREFIX)g++ |
|||
STRIP = $(TOOLCHAIN_PREFIX)strip |
|||
|
|||
#*********************************************************************************************************
|
|||
# do not change the following code
|
|||
# buildin internal application source
|
|||
#*********************************************************************************************************
|
|||
#*********************************************************************************************************
|
|||
# src(s) file
|
|||
#*********************************************************************************************************
|
|||
SRCS_LUA = \
|
|||
lua/src/lua |
|||
|
|||
SRCS_LUAC = \
|
|||
lua/src/luac |
|||
|
|||
SRCS_LIB = \
|
|||
lua/src/lapi.c \ |
|||
lua/src/lauxlib.c \ |
|||
lua/src/lbaselib.c \ |
|||
lua/src/lbitlib.c \ |
|||
lua/src/lcode.c \ |
|||
lua/src/lcorolib.c \ |
|||
lua/src/lctype.c \ |
|||
lua/src/ldblib.c \ |
|||
lua/src/ldebug.c \ |
|||
lua/src/ldo.c \ |
|||
lua/src/ldump.c \ |
|||
lua/src/lfunc.c \ |
|||
lua/src/lgc.c \ |
|||
lua/src/linit.c \ |
|||
lua/src/liolib.c \ |
|||
lua/src/llex.c \ |
|||
lua/src/lmathlib.c \ |
|||
lua/src/lmem.c \ |
|||
lua/src/loadlib.c \ |
|||
lua/src/lobject.c \ |
|||
lua/src/lopcodes.c \ |
|||
lua/src/loslib.c \ |
|||
lua/src/lparser.c \ |
|||
lua/src/lstate.c \ |
|||
lua/src/lstring.c \ |
|||
lua/src/lstrlib.c \ |
|||
lua/src/ltable.c \ |
|||
lua/src/ltablib.c \ |
|||
lua/src/ltm.c \ |
|||
lua/src/lundump.c \ |
|||
lua/src/lutf8lib.c \ |
|||
lua/src/lvm.c \ |
|||
lua/src/lzio.c |
|||
|
|||
#*********************************************************************************************************
|
|||
# build path
|
|||
#*********************************************************************************************************
|
|||
ifeq ($(DEBUG_LEVEL), debug) |
|||
OUTDIR = Debug |
|||
else |
|||
OUTDIR = Release |
|||
endif |
|||
|
|||
OUTPATH = ./$(OUTDIR) |
|||
OBJPATH = $(OUTPATH)/obj |
|||
DEPPATH = $(OUTPATH)/dep |
|||
|
|||
#*********************************************************************************************************
|
|||
# target
|
|||
#*********************************************************************************************************
|
|||
LIB = $(OUTPATH)/liblua.a |
|||
DLL = $(OUTPATH)/liblua.so |
|||
LUAC = $(OUTPATH)/luac |
|||
LUA = $(OUTPATH)/lua |
|||
STRIP_DLL = $(OUTPATH)/strip/liblua.so |
|||
STRIP_LUAC = $(OUTPATH)/strip/luac |
|||
STRIP_LUA = $(OUTPATH)/strip/lua |
|||
|
|||
#*********************************************************************************************************
|
|||
# liblua objects
|
|||
#*********************************************************************************************************
|
|||
LIB_OBJS = $(addprefix $(OBJPATH)/, $(addsuffix .o, $(basename $(SRCS_LIB)))) |
|||
LIB_DEPS = $(addprefix $(DEPPATH)/, $(addsuffix .d, $(basename $(SRCS_LIB)))) |
|||
|
|||
LUAC_OBJS = $(addprefix $(OBJPATH)/, $(addsuffix .o, $(basename $(SRCS_LUAC)))) |
|||
LUAC_DEPS = $(addprefix $(DEPPATH)/, $(addsuffix .d, $(basename $(SRCS_LUAC)))) |
|||
|
|||
LUA_OBJS = $(addprefix $(OBJPATH)/, $(addsuffix .o, $(basename $(SRCS_LUA)))) |
|||
LUA_DEPS = $(addprefix $(DEPPATH)/, $(addsuffix .d, $(basename $(SRCS_LUA)))) |
|||
|
|||
#*********************************************************************************************************
|
|||
# include path
|
|||
#*********************************************************************************************************
|
|||
INCDIR = -I"$(SYLIXOS_BASE_PATH)/libsylixos/SylixOS" |
|||
INCDIR += -I"$(SYLIXOS_BASE_PATH)/libsylixos/SylixOS/include" |
|||
INCDIR += -I"$(SYLIXOS_BASE_PATH)/libsylixos/SylixOS/include/inet" |
|||
INCDIR += -I"$(SYLIXOS_BASE_PATH)/libreadline" |
|||
INCDIR += -I"./lua/src" |
|||
|
|||
#*********************************************************************************************************
|
|||
# compiler preprocess
|
|||
#*********************************************************************************************************
|
|||
DSYMBOL = -DSYLIXOS |
|||
DSYMBOL += -DSYLIXOS_LIB |
|||
DSYMBOL += -DLUA_USE_LINUX |
|||
|
|||
#*********************************************************************************************************
|
|||
# depend dynamic library
|
|||
#*********************************************************************************************************
|
|||
DEPEND_DLL = -lreadline |
|||
|
|||
#*********************************************************************************************************
|
|||
# depend dynamic library search path
|
|||
#*********************************************************************************************************
|
|||
DEPEND_DLL_PATH = -L"$(SYLIXOS_BASE_PATH)/libreadline/$(OUTDIR)" |
|||
|
|||
#*********************************************************************************************************
|
|||
# compiler optimize
|
|||
#*********************************************************************************************************
|
|||
ifeq ($(DEBUG_LEVEL), debug) |
|||
OPTIMIZE = -O0 -g3 -gdwarf-2 |
|||
else |
|||
OPTIMIZE = -O2 -g1 -gdwarf-2 # Do NOT use -O3 and -Os |
|||
endif # -Os is not align for function
|
|||
# loop and jump. |
|||
#*********************************************************************************************************
|
|||
# depends and compiler parameter (cplusplus in kernel MUST NOT use exceptions and rtti)
|
|||
#*********************************************************************************************************
|
|||
DEPENDFLAG = -MM |
|||
CXX_EXCEPT = -fno-exceptions -fno-rtti |
|||
COMMONFLAGS = $(CPUFLAGS) $(OPTIMIZE) -Wall -fmessage-length=0 -fsigned-char -fno-short-enums -mno-unaligned-access |
|||
ASFLAGS = -x assembler-with-cpp $(DSYMBOL) $(INCDIR) $(COMMONFLAGS) -c |
|||
CFLAGS = $(DSYMBOL) $(INCDIR) $(COMMONFLAGS) -fPIC -c |
|||
CXXFLAGS = $(DSYMBOL) $(INCDIR) $(CXX_EXCEPT) $(COMMONFLAGS) -fPIC -c |
|||
ARFLAGS = -r |
|||
|
|||
#*********************************************************************************************************
|
|||
# define some useful variable
|
|||
#*********************************************************************************************************
|
|||
DEPEND = $(CC) $(DEPENDFLAG) $(CFLAGS) |
|||
DEPEND.d = $(subst -g ,,$(DEPEND)) |
|||
COMPILE.S = $(AS) $(ASFLAGS) |
|||
COMPILE_VFP.S = $(AS) $(ASFLAGS) |
|||
COMPILE.c = $(CC) $(CFLAGS) |
|||
COMPILE.cxx = $(CXX) $(CXXFLAGS) |
|||
|
|||
#*********************************************************************************************************
|
|||
# target
|
|||
#*********************************************************************************************************
|
|||
all: $(LIB) $(DLL) $(LUAC) $(LUA) $(STRIP_DLL) $(STRIP_LUAC) $(STRIP_LUA) |
|||
@echo create "$(LIB) $(DLL) $(LUAC) $(LUA) $(STRIP_DLL) $(STRIP_LUAC) $(STRIP_LUA)" success. |
|||
|
|||
#*********************************************************************************************************
|
|||
# include depends
|
|||
#*********************************************************************************************************
|
|||
ifneq ($(MAKECMDGOALS), clean) |
|||
ifneq ($(MAKECMDGOALS), clean_project) |
|||
sinclude $(LIB_DEPS) $(LUA_DEPS) $(LUAC_DEPS) |
|||
endif |
|||
endif |
|||
|
|||
#*********************************************************************************************************
|
|||
# create depends files
|
|||
#*********************************************************************************************************
|
|||
$(DEPPATH)/%.d: %.c |
|||
@echo creating $@ |
|||
@if [ ! -d "$(dir $@)" ]; then mkdir -p "$(dir $@)"; fi |
|||
@rm -f $@; \
|
|||
echo -n '$@ $(addprefix $(OBJPATH)/, $(dir $<))' > $@; \
|
|||
$(DEPEND.d) $< >> $@ || rm -f $@; exit; |
|||
|
|||
$(DEPPATH)/%.d: %.cpp |
|||
@echo creating $@ |
|||
@if [ ! -d "$(dir $@)" ]; then mkdir -p "$(dir $@)"; fi |
|||
@rm -f $@; \
|
|||
echo -n '$@ $(addprefix $(OBJPATH)/, $(dir $<))' > $@; \
|
|||
$(DEPEND.d) $< >> $@ || rm -f $@; exit; |
|||
|
|||
#*********************************************************************************************************
|
|||
# compile source files
|
|||
#*********************************************************************************************************
|
|||
$(OBJPATH)/%.o: %.S |
|||
@if [ ! -d "$(dir $@)" ]; then mkdir -p "$(dir $@)"; fi |
|||
$(COMPILE.S) $< -o $@ |
|||
|
|||
$(OBJPATH)/%.o: %.c |
|||
@if [ ! -d "$(dir $@)" ]; then mkdir -p "$(dir $@)"; fi |
|||
$(COMPILE.c) $< -o $@ |
|||
|
|||
$(OBJPATH)/%.o: %.cpp |
|||
@if [ ! -d "$(dir $@)" ]; then mkdir -p "$(dir $@)"; fi |
|||
$(COMPILE.cxx) $< -o $@ |
|||
|
|||
#*********************************************************************************************************
|
|||
# link liblua.a object files
|
|||
#*********************************************************************************************************
|
|||
$(LIB): $(LIB_OBJS) |
|||
$(AR) $(ARFLAGS) $(LIB) $(LIB_OBJS) |
|||
|
|||
#*********************************************************************************************************
|
|||
# link liblua.so object files
|
|||
#*********************************************************************************************************
|
|||
$(DLL): $(LIB_OBJS) |
|||
$(LD) $(CPUFLAGS) -nostdlib -fPIC -shared -o $(DLL) $(LIB_OBJS) \
|
|||
-lm -lgcc |
|||
|
|||
#*********************************************************************************************************
|
|||
# strip liblua.so
|
|||
#*********************************************************************************************************
|
|||
$(STRIP_DLL): $(DLL) |
|||
@if [ ! -d "$(dir $@)" ]; then mkdir -p "$(dir $@)"; fi |
|||
@rm -f $@ |
|||
$(STRIP) $(DLL) -o $(STRIP_DLL) |
|||
|
|||
#*********************************************************************************************************
|
|||
# link luac object files
|
|||
#*********************************************************************************************************
|
|||
$(LUAC): $(LUAC_OBJS) $(LIB_OBJS) |
|||
$(LD) $(CPUFLAGS) -nostdlib -fPIC -shared -o $(LUAC) $(LUAC_OBJS) $(LIB_OBJS) \
|
|||
-L"./Debug" -L"./Release" -L"$(SYLIXOS_BASE_PATH)/libsylixos/$(OUTDIR)" \
|
|||
-lvpmpdm -lm -lgcc |
|||
|
|||
#*********************************************************************************************************
|
|||
# strip luac
|
|||
#*********************************************************************************************************
|
|||
$(STRIP_LUAC): $(LUAC) |
|||
@if [ ! -d "$(dir $@)" ]; then mkdir -p "$(dir $@)"; fi |
|||
@rm -f $@ |
|||
$(STRIP) $(LUAC) -o $(STRIP_LUAC) |
|||
|
|||
#*********************************************************************************************************
|
|||
# link lua object files
|
|||
#*********************************************************************************************************
|
|||
$(LUA): $(LUA_OBJS) $(DLL) |
|||
$(LD) $(CPUFLAGS) -nostdlib -fPIC -shared -o $(LUA) $(LUA_OBJS) \
|
|||
-L"./Debug" -L"./Release" -L"$(SYLIXOS_BASE_PATH)/libsylixos/$(OUTDIR)" $(DEPEND_DLL_PATH) $(DEPEND_DLL) \
|
|||
-llua -lvpmpdm -lm -lgcc |
|||
|
|||
#*********************************************************************************************************
|
|||
# strip lua
|
|||
#*********************************************************************************************************
|
|||
$(STRIP_LUA): $(LUA) |
|||
@if [ ! -d "$(dir $@)" ]; then mkdir -p "$(dir $@)"; fi |
|||
@rm -f $@ |
|||
$(STRIP) $(LUA) -o $(STRIP_LUA) |
|||
|
|||
#*********************************************************************************************************
|
|||
# clean
|
|||
#*********************************************************************************************************
|
|||
.PHONY: clean |
|||
.PHONY: clean_project |
|||
|
|||
#*********************************************************************************************************
|
|||
# clean objects
|
|||
#*********************************************************************************************************
|
|||
clean: |
|||
-rm -rf $(LIB) |
|||
-rm -rf $(DLL) |
|||
-rm -rf $(LUAC) |
|||
-rm -rf $(LUA) |
|||
-rm -rf $(STRIP_DLL) |
|||
-rm -rf $(STRIP_LUAC) |
|||
-rm -rf $(STRIP_LUA) |
|||
-rm -rf $(LIB_OBJS) |
|||
-rm -rf $(LUAC_OBJS) |
|||
-rm -rf $(LUA_OBJS) |
|||
-rm -rf $(OBJPATH) |
|||
-rm -rf $(DEPPATH) |
|||
|
|||
#*********************************************************************************************************
|
|||
# clean project
|
|||
#*********************************************************************************************************
|
|||
clean_project: |
|||
-rm -rf $(OUTPATH) |
|||
|
|||
#*********************************************************************************************************
|
|||
# END
|
|||
#*********************************************************************************************************
|
@ -1,317 +0,0 @@ |
|||
#*********************************************************************************************************
|
|||
# liblua Makefile
|
|||
# target -> liblua
|
|||
#*********************************************************************************************************
|
|||
|
|||
#*********************************************************************************************************
|
|||
# include config.mk
|
|||
#*********************************************************************************************************
|
|||
CONFIG_MK_EXIST = $(shell if [ -f ../config.mk ]; then echo exist; else echo notexist; fi;) |
|||
ifeq ($(CONFIG_MK_EXIST), exist) |
|||
include ../config.mk |
|||
else |
|||
CONFIG_MK_EXIST = $(shell if [ -f config.mk ]; then echo exist; else echo notexist; fi;) |
|||
ifeq ($(CONFIG_MK_EXIST), exist) |
|||
include config.mk |
|||
else |
|||
CONFIG_MK_EXIST = |
|||
endif |
|||
endif |
|||
|
|||
#*********************************************************************************************************
|
|||
# check configure
|
|||
#*********************************************************************************************************
|
|||
check_defined = \
|
|||
$(foreach 1,$1,$(__check_defined)) |
|||
__check_defined = \
|
|||
$(if $(value $1),, \
|
|||
$(error Undefined $1$(if $(value 2), ($(strip $2))))) |
|||
|
|||
$(call check_defined, CONFIG_MK_EXIST, Please configure this project in RealEvo-IDE or \ |
|||
create a config.mk file!) |
|||
$(call check_defined, SYLIXOS_BASE_PATH, SylixOS base project path) |
|||
$(call check_defined, TOOLCHAIN_PREFIX, the prefix name of toolchain) |
|||
$(call check_defined, DEBUG_LEVEL, debug level(debug or release)) |
|||
|
|||
#*********************************************************************************************************
|
|||
# toolchain select
|
|||
#*********************************************************************************************************
|
|||
CC = $(TOOLCHAIN_PREFIX)gcc |
|||
CXX = $(TOOLCHAIN_PREFIX)g++ |
|||
AS = $(TOOLCHAIN_PREFIX)gcc |
|||
AR = $(TOOLCHAIN_PREFIX)ar |
|||
LD = $(TOOLCHAIN_PREFIX)g++ |
|||
STRIP = $(TOOLCHAIN_PREFIX)strip |
|||
|
|||
#*********************************************************************************************************
|
|||
# do not change the following code
|
|||
# buildin internal application source
|
|||
#*********************************************************************************************************
|
|||
#*********************************************************************************************************
|
|||
# src(s) file
|
|||
#*********************************************************************************************************
|
|||
SRCS_LUA = \
|
|||
lua/src/lua |
|||
|
|||
SRCS_LUAC = \
|
|||
lua/src/luac |
|||
|
|||
SRCS_LIB = \
|
|||
lua/src/lapi.c \ |
|||
lua/src/lauxlib.c \ |
|||
lua/src/lbaselib.c \ |
|||
lua/src/lbitlib.c \ |
|||
lua/src/lcode.c \ |
|||
lua/src/lcorolib.c \ |
|||
lua/src/lctype.c \ |
|||
lua/src/ldblib.c \ |
|||
lua/src/ldebug.c \ |
|||
lua/src/ldo.c \ |
|||
lua/src/ldump.c \ |
|||
lua/src/lfunc.c \ |
|||
lua/src/lgc.c \ |
|||
lua/src/linit.c \ |
|||
lua/src/liolib.c \ |
|||
lua/src/llex.c \ |
|||
lua/src/lmathlib.c \ |
|||
lua/src/lmem.c \ |
|||
lua/src/loadlib.c \ |
|||
lua/src/lobject.c \ |
|||
lua/src/lopcodes.c \ |
|||
lua/src/loslib.c \ |
|||
lua/src/lparser.c \ |
|||
lua/src/lstate.c \ |
|||
lua/src/lstring.c \ |
|||
lua/src/lstrlib.c \ |
|||
lua/src/ltable.c \ |
|||
lua/src/ltablib.c \ |
|||
lua/src/ltm.c \ |
|||
lua/src/lundump.c \ |
|||
lua/src/lutf8lib.c \ |
|||
lua/src/lvm.c \ |
|||
lua/src/lzio.c |
|||
|
|||
#*********************************************************************************************************
|
|||
# build path
|
|||
#*********************************************************************************************************
|
|||
ifeq ($(DEBUG_LEVEL), debug) |
|||
OUTDIR = Debug |
|||
else |
|||
OUTDIR = Release |
|||
endif |
|||
|
|||
OUTPATH = ./$(OUTDIR) |
|||
OBJPATH = $(OUTPATH)/obj |
|||
DEPPATH = $(OUTPATH)/dep |
|||
|
|||
#*********************************************************************************************************
|
|||
# target
|
|||
#*********************************************************************************************************
|
|||
LIB = $(OUTPATH)/liblua.a |
|||
DLL = $(OUTPATH)/liblua.so |
|||
LUAC = $(OUTPATH)/luac |
|||
LUA = $(OUTPATH)/lua |
|||
STRIP_DLL = $(OUTPATH)/strip/liblua.so |
|||
STRIP_LUAC = $(OUTPATH)/strip/luac |
|||
STRIP_LUA = $(OUTPATH)/strip/lua |
|||
|
|||
#*********************************************************************************************************
|
|||
# liblua objects
|
|||
#*********************************************************************************************************
|
|||
LIB_OBJS = $(addprefix $(OBJPATH)/, $(addsuffix .o, $(basename $(SRCS_LIB)))) |
|||
LIB_DEPS = $(addprefix $(DEPPATH)/, $(addsuffix .d, $(basename $(SRCS_LIB)))) |
|||
|
|||
LUAC_OBJS = $(addprefix $(OBJPATH)/, $(addsuffix .o, $(basename $(SRCS_LUAC)))) |
|||
LUAC_DEPS = $(addprefix $(DEPPATH)/, $(addsuffix .d, $(basename $(SRCS_LUAC)))) |
|||
|
|||
LUA_OBJS = $(addprefix $(OBJPATH)/, $(addsuffix .o, $(basename $(SRCS_LUA)))) |
|||
LUA_DEPS = $(addprefix $(DEPPATH)/, $(addsuffix .d, $(basename $(SRCS_LUA)))) |
|||
|
|||
#*********************************************************************************************************
|
|||
# include path
|
|||
#*********************************************************************************************************
|
|||
INCDIR = -I"$(SYLIXOS_BASE_PATH)/libsylixos/SylixOS" |
|||
INCDIR += -I"$(SYLIXOS_BASE_PATH)/libsylixos/SylixOS/include" |
|||
INCDIR += -I"$(SYLIXOS_BASE_PATH)/libsylixos/SylixOS/include/inet" |
|||
INCDIR += -I"$(SYLIXOS_BASE_PATH)/libreadline" |
|||
INCDIR += -I"./lua/src" |
|||
|
|||
#*********************************************************************************************************
|
|||
# compiler preprocess
|
|||
#*********************************************************************************************************
|
|||
DSYMBOL = -DSYLIXOS |
|||
DSYMBOL += -DSYLIXOS_LIB |
|||
DSYMBOL += -DLUA_USE_LINUX |
|||
|
|||
#*********************************************************************************************************
|
|||
# depend dynamic library
|
|||
#*********************************************************************************************************
|
|||
DEPEND_DLL = -lreadline |
|||
|
|||
#*********************************************************************************************************
|
|||
# depend dynamic library search path
|
|||
#*********************************************************************************************************
|
|||
DEPEND_DLL_PATH = -L"$(SYLIXOS_BASE_PATH)/libreadline/$(OUTDIR)" |
|||
|
|||
#*********************************************************************************************************
|
|||
# compiler optimize
|
|||
#*********************************************************************************************************
|
|||
ifeq ($(DEBUG_LEVEL), debug) |
|||
OPTIMIZE = -O0 -g3 -gdwarf-2 |
|||
else |
|||
OPTIMIZE = -O2 -g1 -gdwarf-2 # Do NOT use -O3 and -Os |
|||
endif # -Os is not align for function
|
|||
# loop and jump. |
|||
#*********************************************************************************************************
|
|||
# depends and compiler parameter (cplusplus in kernel MUST NOT use exceptions and rtti)
|
|||
#*********************************************************************************************************
|
|||
DEPENDFLAG = -MM |
|||
CXX_EXCEPT = -fno-exceptions -fno-rtti |
|||
COMMONFLAGS = $(CPUFLAGS) $(OPTIMIZE) -Wall -fmessage-length=0 -fsigned-char -fno-short-enums |
|||
ASFLAGS = -x assembler-with-cpp $(DSYMBOL) $(INCDIR) $(COMMONFLAGS) -mabicalls -c |
|||
CFLAGS = $(DSYMBOL) $(INCDIR) $(COMMONFLAGS) -fPIC -mabicalls -c |
|||
CXXFLAGS = $(DSYMBOL) $(INCDIR) $(CXX_EXCEPT) $(COMMONFLAGS) -fPIC -mabicalls -c |
|||
ARFLAGS = -r |
|||
|
|||
#*********************************************************************************************************
|
|||
# define some useful variable
|
|||
#*********************************************************************************************************
|
|||
DEPEND = $(CC) $(DEPENDFLAG) $(CFLAGS) |
|||
DEPEND.d = $(subst -g ,,$(DEPEND)) |
|||
COMPILE.S = $(AS) $(ASFLAGS) |
|||
COMPILE_VFP.S = $(AS) $(ASFLAGS) -mhard-float |
|||
COMPILE.c = $(CC) $(CFLAGS) |
|||
COMPILE.cxx = $(CXX) $(CXXFLAGS) |
|||
|
|||
#*********************************************************************************************************
|
|||
# target
|
|||
#*********************************************************************************************************
|
|||
all: $(LIB) $(DLL) $(LUAC) $(LUA) $(STRIP_DLL) $(STRIP_LUAC) $(STRIP_LUA) |
|||
@echo create "$(LIB) $(DLL) $(LUAC) $(LUA) $(STRIP_DLL) $(STRIP_LUAC) $(STRIP_LUA)" success. |
|||
|
|||
#*********************************************************************************************************
|
|||
# include depends
|
|||
#*********************************************************************************************************
|
|||
ifneq ($(MAKECMDGOALS), clean) |
|||
ifneq ($(MAKECMDGOALS), clean_project) |
|||
sinclude $(LIB_DEPS) $(LUA_DEPS) $(LUAC_DEPS) |
|||
endif |
|||
endif |
|||
|
|||
#*********************************************************************************************************
|
|||
# create depends files
|
|||
#*********************************************************************************************************
|
|||
$(DEPPATH)/%.d: %.c |
|||
@echo creating $@ |
|||
@if [ ! -d "$(dir $@)" ]; then mkdir -p "$(dir $@)"; fi |
|||
@rm -f $@; \
|
|||
echo -n '$@ $(addprefix $(OBJPATH)/, $(dir $<))' > $@; \
|
|||
$(DEPEND.d) $< >> $@ || rm -f $@; exit; |
|||
|
|||
$(DEPPATH)/%.d: %.cpp |
|||
@echo creating $@ |
|||
@if [ ! -d "$(dir $@)" ]; then mkdir -p "$(dir $@)"; fi |
|||
@rm -f $@; \
|
|||
echo -n '$@ $(addprefix $(OBJPATH)/, $(dir $<))' > $@; \
|
|||
$(DEPEND.d) $< >> $@ || rm -f $@; exit; |
|||
|
|||
#*********************************************************************************************************
|
|||
# compile source files
|
|||
#*********************************************************************************************************
|
|||
$(OBJPATH)/%.o: %.S |
|||
@if [ ! -d "$(dir $@)" ]; then mkdir -p "$(dir $@)"; fi |
|||
$(COMPILE.S) $< -o $@ |
|||
|
|||
$(OBJPATH)/%.o: %.c |
|||
@if [ ! -d "$(dir $@)" ]; then mkdir -p "$(dir $@)"; fi |
|||
$(COMPILE.c) $< -o $@ |
|||
|
|||
$(OBJPATH)/%.o: %.cpp |
|||
@if [ ! -d "$(dir $@)" ]; then mkdir -p "$(dir $@)"; fi |
|||
$(COMPILE.cxx) $< -o $@ |
|||
|
|||
#*********************************************************************************************************
|
|||
# link liblua.a object files
|
|||
#*********************************************************************************************************
|
|||
$(LIB): $(LIB_OBJS) |
|||
$(AR) $(ARFLAGS) $(LIB) $(LIB_OBJS) |
|||
|
|||
#*********************************************************************************************************
|
|||
# link liblua.so object files
|
|||
#*********************************************************************************************************
|
|||
$(DLL): $(LIB_OBJS) |
|||
$(LD) $(CPUFLAGS) -fPIC -mabicalls -shared -o $(DLL) $(LIB_OBJS) \
|
|||
-lm -lgcc |
|||
|
|||
#*********************************************************************************************************
|
|||
# strip liblua.so
|
|||
#*********************************************************************************************************
|
|||
$(STRIP_DLL): $(DLL) |
|||
@if [ ! -d "$(dir $@)" ]; then mkdir -p "$(dir $@)"; fi |
|||
@rm -f $@ |
|||
$(STRIP) $(DLL) -o $(STRIP_DLL) |
|||
|
|||
#*********************************************************************************************************
|
|||
# link luac object files
|
|||
#*********************************************************************************************************
|
|||
$(LUAC): $(LUAC_OBJS) $(LIB_OBJS) |
|||
$(LD) $(CPUFLAGS) -fPIC -mabicalls -shared -o $(LUAC) $(LUAC_OBJS) $(LIB_OBJS) \
|
|||
-L"./Debug" -L"./Release" -L"$(SYLIXOS_BASE_PATH)/libsylixos/$(OUTDIR)" \
|
|||
-lvpmpdm -lm -lgcc |
|||
|
|||
#*********************************************************************************************************
|
|||
# strip luac
|
|||
#*********************************************************************************************************
|
|||
$(STRIP_LUAC): $(LUAC) |
|||
@if [ ! -d "$(dir $@)" ]; then mkdir -p "$(dir $@)"; fi |
|||
@rm -f $@ |
|||
$(STRIP) $(LUAC) -o $(STRIP_LUAC) |
|||
|
|||
#*********************************************************************************************************
|
|||
# link lua object files
|
|||
#*********************************************************************************************************
|
|||
$(LUA): $(LUA_OBJS) $(DLL) |
|||
$(LD) $(CPUFLAGS) -fPIC -mabicalls -shared -o $(LUA) $(LUA_OBJS) \
|
|||
-L"./Debug" -L"./Release" -L"$(SYLIXOS_BASE_PATH)/libsylixos/$(OUTDIR)" $(DEPEND_DLL_PATH) $(DEPEND_DLL) \
|
|||
-llua -lvpmpdm -lm -lgcc |
|||
|
|||
#*********************************************************************************************************
|
|||
# strip lua
|
|||
#*********************************************************************************************************
|
|||
$(STRIP_LUA): $(LUA) |
|||
@if [ ! -d "$(dir $@)" ]; then mkdir -p "$(dir $@)"; fi |
|||
@rm -f $@ |
|||
$(STRIP) $(LUA) -o $(STRIP_LUA) |
|||
|
|||
#*********************************************************************************************************
|
|||
# clean
|
|||
#*********************************************************************************************************
|
|||
.PHONY: clean |
|||
.PHONY: clean_project |
|||
|
|||
#*********************************************************************************************************
|
|||
# clean objects
|
|||
#*********************************************************************************************************
|
|||
clean: |
|||
-rm -rf $(LIB) |
|||
-rm -rf $(DLL) |
|||
-rm -rf $(LUAC) |
|||
-rm -rf $(LUA) |
|||
-rm -rf $(STRIP_DLL) |
|||
-rm -rf $(STRIP_LUAC) |
|||
-rm -rf $(STRIP_LUA) |
|||
-rm -rf $(LIB_OBJS) |
|||
-rm -rf $(LUAC_OBJS) |
|||
-rm -rf $(LUA_OBJS) |
|||
-rm -rf $(OBJPATH) |
|||
-rm -rf $(DEPPATH) |
|||
|
|||
#*********************************************************************************************************
|
|||
# clean project
|
|||
#*********************************************************************************************************
|
|||
clean_project: |
|||
-rm -rf $(OUTPATH) |
|||
|
|||
#*********************************************************************************************************
|
|||
# END
|
|||
#*********************************************************************************************************
|
@ -1,317 +0,0 @@ |
|||
#*********************************************************************************************************
|
|||
# liblua Makefile
|
|||
# target -> liblua
|
|||
#*********************************************************************************************************
|
|||
|
|||
#*********************************************************************************************************
|
|||
# include config.mk
|
|||
#*********************************************************************************************************
|
|||
CONFIG_MK_EXIST = $(shell if [ -f ../config.mk ]; then echo exist; else echo notexist; fi;) |
|||
ifeq ($(CONFIG_MK_EXIST), exist) |
|||
include ../config.mk |
|||
else |
|||
CONFIG_MK_EXIST = $(shell if [ -f config.mk ]; then echo exist; else echo notexist; fi;) |
|||
ifeq ($(CONFIG_MK_EXIST), exist) |
|||
include config.mk |
|||
else |
|||
CONFIG_MK_EXIST = |
|||
endif |
|||
endif |
|||
|
|||
#*********************************************************************************************************
|
|||
# check configure
|
|||
#*********************************************************************************************************
|
|||
check_defined = \
|
|||
$(foreach 1,$1,$(__check_defined)) |
|||
__check_defined = \
|
|||
$(if $(value $1),, \
|
|||
$(error Undefined $1$(if $(value 2), ($(strip $2))))) |
|||
|
|||
$(call check_defined, CONFIG_MK_EXIST, Please configure this project in RealEvo-IDE or \ |
|||
create a config.mk file!) |
|||
$(call check_defined, SYLIXOS_BASE_PATH, SylixOS base project path) |
|||
$(call check_defined, TOOLCHAIN_PREFIX, the prefix name of toolchain) |
|||
$(call check_defined, DEBUG_LEVEL, debug level(debug or release)) |
|||
|
|||
#*********************************************************************************************************
|
|||
# toolchain select
|
|||
#*********************************************************************************************************
|
|||
CC = $(TOOLCHAIN_PREFIX)gcc |
|||
CXX = $(TOOLCHAIN_PREFIX)g++ |
|||
AS = $(TOOLCHAIN_PREFIX)gcc |
|||
AR = $(TOOLCHAIN_PREFIX)ar |
|||
LD = $(TOOLCHAIN_PREFIX)g++ |
|||
STRIP = $(TOOLCHAIN_PREFIX)strip |
|||
|
|||
#*********************************************************************************************************
|
|||
# do not change the following code
|
|||
# buildin internal application source
|
|||
#*********************************************************************************************************
|
|||
#*********************************************************************************************************
|
|||
# src(s) file
|
|||
#*********************************************************************************************************
|
|||
SRCS_LUA = \
|
|||
lua/src/lua |
|||
|
|||
SRCS_LUAC = \
|
|||
lua/src/luac |
|||
|
|||
SRCS_LIB = \
|
|||
lua/src/lapi.c \ |
|||
lua/src/lauxlib.c \ |
|||
lua/src/lbaselib.c \ |
|||
lua/src/lbitlib.c \ |
|||
lua/src/lcode.c \ |
|||
lua/src/lcorolib.c \ |
|||
lua/src/lctype.c \ |
|||
lua/src/ldblib.c \ |
|||
lua/src/ldebug.c \ |
|||
lua/src/ldo.c \ |
|||
lua/src/ldump.c \ |
|||
lua/src/lfunc.c \ |
|||
lua/src/lgc.c \ |
|||
lua/src/linit.c \ |
|||
lua/src/liolib.c \ |
|||
lua/src/llex.c \ |
|||
lua/src/lmathlib.c \ |
|||
lua/src/lmem.c \ |
|||
lua/src/loadlib.c \ |
|||
lua/src/lobject.c \ |
|||
lua/src/lopcodes.c \ |
|||
lua/src/loslib.c \ |
|||
lua/src/lparser.c \ |
|||
lua/src/lstate.c \ |
|||
lua/src/lstring.c \ |
|||
lua/src/lstrlib.c \ |
|||
lua/src/ltable.c \ |
|||
lua/src/ltablib.c \ |
|||
lua/src/ltm.c \ |
|||
lua/src/lundump.c \ |
|||
lua/src/lutf8lib.c \ |
|||
lua/src/lvm.c \ |
|||
lua/src/lzio.c |
|||
|
|||
#*********************************************************************************************************
|
|||
# build path
|
|||
#*********************************************************************************************************
|
|||
ifeq ($(DEBUG_LEVEL), debug) |
|||
OUTDIR = Debug |
|||
else |
|||
OUTDIR = Release |
|||
endif |
|||
|
|||
OUTPATH = ./$(OUTDIR) |
|||
OBJPATH = $(OUTPATH)/obj |
|||
DEPPATH = $(OUTPATH)/dep |
|||
|
|||
#*********************************************************************************************************
|
|||
# target
|
|||
#*********************************************************************************************************
|
|||
LIB = $(OUTPATH)/liblua.a |
|||
DLL = $(OUTPATH)/liblua.so |
|||
LUAC = $(OUTPATH)/luac |
|||
LUA = $(OUTPATH)/lua |
|||
STRIP_DLL = $(OUTPATH)/strip/liblua.so |
|||
STRIP_LUAC = $(OUTPATH)/strip/luac |
|||
STRIP_LUA = $(OUTPATH)/strip/lua |
|||
|
|||
#*********************************************************************************************************
|
|||
# liblua objects
|
|||
#*********************************************************************************************************
|
|||
LIB_OBJS = $(addprefix $(OBJPATH)/, $(addsuffix .o, $(basename $(SRCS_LIB)))) |
|||
LIB_DEPS = $(addprefix $(DEPPATH)/, $(addsuffix .d, $(basename $(SRCS_LIB)))) |
|||
|
|||
LUAC_OBJS = $(addprefix $(OBJPATH)/, $(addsuffix .o, $(basename $(SRCS_LUAC)))) |
|||
LUAC_DEPS = $(addprefix $(DEPPATH)/, $(addsuffix .d, $(basename $(SRCS_LUAC)))) |
|||
|
|||
LUA_OBJS = $(addprefix $(OBJPATH)/, $(addsuffix .o, $(basename $(SRCS_LUA)))) |
|||
LUA_DEPS = $(addprefix $(DEPPATH)/, $(addsuffix .d, $(basename $(SRCS_LUA)))) |
|||
|
|||
#*********************************************************************************************************
|
|||
# include path
|
|||
#*********************************************************************************************************
|
|||
INCDIR = -I"$(SYLIXOS_BASE_PATH)/libsylixos/SylixOS" |
|||
INCDIR += -I"$(SYLIXOS_BASE_PATH)/libsylixos/SylixOS/include" |
|||
INCDIR += -I"$(SYLIXOS_BASE_PATH)/libsylixos/SylixOS/include/inet" |
|||
INCDIR += -I"$(SYLIXOS_BASE_PATH)/libreadline" |
|||
INCDIR += -I"./lua/src" |
|||
|
|||
#*********************************************************************************************************
|
|||
# compiler preprocess
|
|||
#*********************************************************************************************************
|
|||
DSYMBOL = -DSYLIXOS |
|||
DSYMBOL += -DSYLIXOS_LIB |
|||
DSYMBOL += -DLUA_USE_LINUX |
|||
|
|||
#*********************************************************************************************************
|
|||
# depend dynamic library
|
|||
#*********************************************************************************************************
|
|||
DEPEND_DLL = -lreadline |
|||
|
|||
#*********************************************************************************************************
|
|||
# depend dynamic library search path
|
|||
#*********************************************************************************************************
|
|||
DEPEND_DLL_PATH = -L"$(SYLIXOS_BASE_PATH)/libreadline/$(OUTDIR)" |
|||
|
|||
#*********************************************************************************************************
|
|||
# compiler optimize
|
|||
#*********************************************************************************************************
|
|||
ifeq ($(DEBUG_LEVEL), debug) |
|||
OPTIMIZE = -O0 -g3 -gdwarf-2 |
|||
else |
|||
OPTIMIZE = -O2 -g1 -gdwarf-2 # Do NOT use -O3 and -Os |
|||
endif # -Os is not align for function
|
|||
# loop and jump. |
|||
#*********************************************************************************************************
|
|||
# depends and compiler parameter (cplusplus in kernel MUST NOT use exceptions and rtti)
|
|||
#*********************************************************************************************************
|
|||
DEPENDFLAG = -MM |
|||
CXX_EXCEPT = -fno-exceptions -fno-rtti |
|||
COMMONFLAGS = $(CPUFLAGS) $(OPTIMIZE) -Wall -fmessage-length=0 -fsigned-char -fno-short-enums |
|||
ASFLAGS = -x assembler-with-cpp $(DSYMBOL) $(INCDIR) $(COMMONFLAGS) -c |
|||
CFLAGS = $(DSYMBOL) $(INCDIR) $(COMMONFLAGS) -fPIC -c |
|||
CXXFLAGS = $(DSYMBOL) $(INCDIR) $(CXX_EXCEPT) $(COMMONFLAGS) -fPIC -c |
|||
ARFLAGS = -r |
|||
|
|||
#*********************************************************************************************************
|
|||
# define some useful variable
|
|||
#*********************************************************************************************************
|
|||
DEPEND = $(CC) $(DEPENDFLAG) $(CFLAGS) |
|||
DEPEND.d = $(subst -g ,,$(DEPEND)) |
|||
COMPILE.S = $(AS) $(ASFLAGS) |
|||
COMPILE_VFP.S = $(AS) $(ASFLAGS) |
|||
COMPILE.c = $(CC) $(CFLAGS) |
|||
COMPILE.cxx = $(CXX) $(CXXFLAGS) |
|||
|
|||
#*********************************************************************************************************
|
|||
# target
|
|||
#*********************************************************************************************************
|
|||
all: $(LIB) $(DLL) $(LUAC) $(LUA) $(STRIP_DLL) $(STRIP_LUAC) $(STRIP_LUA) |
|||
@echo create "$(LIB) $(DLL) $(LUAC) $(LUA) $(STRIP_DLL) $(STRIP_LUAC) $(STRIP_LUA)" success. |
|||
|
|||
#*********************************************************************************************************
|
|||
# include depends
|
|||
#*********************************************************************************************************
|
|||
ifneq ($(MAKECMDGOALS), clean) |
|||
ifneq ($(MAKECMDGOALS), clean_project) |
|||
sinclude $(LIB_DEPS) $(LUA_DEPS) $(LUAC_DEPS) |
|||
endif |
|||
endif |
|||
|
|||
#*********************************************************************************************************
|
|||
# create depends files
|
|||
#*********************************************************************************************************
|
|||
$(DEPPATH)/%.d: %.c |
|||
@echo creating $@ |
|||
@if [ ! -d "$(dir $@)" ]; then mkdir -p "$(dir $@)"; fi |
|||
@rm -f $@; \
|
|||
echo -n '$@ $(addprefix $(OBJPATH)/, $(dir $<))' > $@; \
|
|||
$(DEPEND.d) $< >> $@ || rm -f $@; exit; |
|||
|
|||
$(DEPPATH)/%.d: %.cpp |
|||
@echo creating $@ |
|||
@if [ ! -d "$(dir $@)" ]; then mkdir -p "$(dir $@)"; fi |
|||
@rm -f $@; \
|
|||
echo -n '$@ $(addprefix $(OBJPATH)/, $(dir $<))' > $@; \
|
|||
$(DEPEND.d) $< >> $@ || rm -f $@; exit; |
|||
|
|||
#*********************************************************************************************************
|
|||
# compile source files
|
|||
#*********************************************************************************************************
|
|||
$(OBJPATH)/%.o: %.S |
|||
@if [ ! -d "$(dir $@)" ]; then mkdir -p "$(dir $@)"; fi |
|||
$(COMPILE.S) $< -o $@ |
|||
|
|||
$(OBJPATH)/%.o: %.c |
|||
@if [ ! -d "$(dir $@)" ]; then mkdir -p "$(dir $@)"; fi |
|||
$(COMPILE.c) $< -o $@ |
|||
|
|||
$(OBJPATH)/%.o: %.cpp |
|||
@if [ ! -d "$(dir $@)" ]; then mkdir -p "$(dir $@)"; fi |
|||
$(COMPILE.cxx) $< -o $@ |
|||
|
|||
#*********************************************************************************************************
|
|||
# link liblua.a object files
|
|||
#*********************************************************************************************************
|
|||
$(LIB): $(LIB_OBJS) |
|||
$(AR) $(ARFLAGS) $(LIB) $(LIB_OBJS) |
|||
|
|||
#*********************************************************************************************************
|
|||
# link liblua.so object files
|
|||
#*********************************************************************************************************
|
|||
$(DLL): $(LIB_OBJS) |
|||
$(LD) $(CPUFLAGS) -fPIC -shared -o $(DLL) $(LIB_OBJS) \
|
|||
-lm -lgcc |
|||
|
|||
#*********************************************************************************************************
|
|||
# strip liblua.so
|
|||
#*********************************************************************************************************
|
|||
$(STRIP_DLL): $(DLL) |
|||
@if [ ! -d "$(dir $@)" ]; then mkdir -p "$(dir $@)"; fi |
|||
@rm -f $@ |
|||
$(STRIP) $(DLL) -o $(STRIP_DLL) |
|||
|
|||
#*********************************************************************************************************
|
|||
# link luac object files
|
|||
#*********************************************************************************************************
|
|||
$(LUAC): $(LUAC_OBJS) $(LIB_OBJS) |
|||
$(LD) $(CPUFLAGS) -fPIC -shared -o $(LUAC) $(LUAC_OBJS) $(LIB_OBJS) \
|
|||
-L"./Debug" -L"./Release" -L"$(SYLIXOS_BASE_PATH)/libsylixos/$(OUTDIR)" \
|
|||
-lvpmpdm -lm -lgcc |
|||
|
|||
#*********************************************************************************************************
|
|||
# strip luac
|
|||
#*********************************************************************************************************
|
|||
$(STRIP_LUAC): $(LUAC) |
|||
@if [ ! -d "$(dir $@)" ]; then mkdir -p "$(dir $@)"; fi |
|||
@rm -f $@ |
|||
$(STRIP) $(LUAC) -o $(STRIP_LUAC) |
|||
|
|||
#*********************************************************************************************************
|
|||
# link lua object files
|
|||
#*********************************************************************************************************
|
|||
$(LUA): $(LUA_OBJS) $(DLL) |
|||
$(LD) $(CPUFLAGS) -fPIC -shared -o $(LUA) $(LUA_OBJS) \
|
|||
-L"./Debug" -L"./Release" -L"$(SYLIXOS_BASE_PATH)/libsylixos/$(OUTDIR)" $(DEPEND_DLL_PATH) $(DEPEND_DLL) \
|
|||
-llua -lvpmpdm -lm -lgcc |
|||
|
|||
#*********************************************************************************************************
|
|||
# strip lua
|
|||
#*********************************************************************************************************
|
|||
$(STRIP_LUA): $(LUA) |
|||
@if [ ! -d "$(dir $@)" ]; then mkdir -p "$(dir $@)"; fi |
|||
@rm -f $@ |
|||
$(STRIP) $(LUA) -o $(STRIP_LUA) |
|||
|
|||
#*********************************************************************************************************
|
|||
# clean
|
|||
#*********************************************************************************************************
|
|||
.PHONY: clean |
|||
.PHONY: clean_project |
|||
|
|||
#*********************************************************************************************************
|
|||
# clean objects
|
|||
#*********************************************************************************************************
|
|||
clean: |
|||
-rm -rf $(LIB) |
|||
-rm -rf $(DLL) |
|||
-rm -rf $(LUAC) |
|||
-rm -rf $(LUA) |
|||
-rm -rf $(STRIP_DLL) |
|||
-rm -rf $(STRIP_LUAC) |
|||
-rm -rf $(STRIP_LUA) |
|||
-rm -rf $(LIB_OBJS) |
|||
-rm -rf $(LUAC_OBJS) |
|||
-rm -rf $(LUA_OBJS) |
|||
-rm -rf $(OBJPATH) |
|||
-rm -rf $(DEPPATH) |
|||
|
|||
#*********************************************************************************************************
|
|||
# clean project
|
|||
#*********************************************************************************************************
|
|||
clean_project: |
|||
-rm -rf $(OUTPATH) |
|||
|
|||
#*********************************************************************************************************
|
|||
# END
|
|||
#*********************************************************************************************************
|
@ -1,317 +0,0 @@ |
|||
#*********************************************************************************************************
|
|||
# liblua Makefile
|
|||
# target -> liblua
|
|||
#*********************************************************************************************************
|
|||
|
|||
#*********************************************************************************************************
|
|||
# include config.mk
|
|||
#*********************************************************************************************************
|
|||
CONFIG_MK_EXIST = $(shell if [ -f ../config.mk ]; then echo exist; else echo notexist; fi;) |
|||
ifeq ($(CONFIG_MK_EXIST), exist) |
|||
include ../config.mk |
|||
else |
|||
CONFIG_MK_EXIST = $(shell if [ -f config.mk ]; then echo exist; else echo notexist; fi;) |
|||
ifeq ($(CONFIG_MK_EXIST), exist) |
|||
include config.mk |
|||
else |
|||
CONFIG_MK_EXIST = |
|||
endif |
|||
endif |
|||
|
|||
#*********************************************************************************************************
|
|||
# check configure
|
|||
#*********************************************************************************************************
|
|||
check_defined = \
|
|||
$(foreach 1,$1,$(__check_defined)) |
|||
__check_defined = \
|
|||
$(if $(value $1),, \
|
|||
$(error Undefined $1$(if $(value 2), ($(strip $2))))) |
|||
|
|||
$(call check_defined, CONFIG_MK_EXIST, Please configure this project in RealEvo-IDE or \ |
|||
create a config.mk file!) |
|||
$(call check_defined, SYLIXOS_BASE_PATH, SylixOS base project path) |
|||
$(call check_defined, TOOLCHAIN_PREFIX, the prefix name of toolchain) |
|||
$(call check_defined, DEBUG_LEVEL, debug level(debug or release)) |
|||
|
|||
#*********************************************************************************************************
|
|||
# toolchain select
|
|||
#*********************************************************************************************************
|
|||
CC = $(TOOLCHAIN_PREFIX)gcc |
|||
CXX = $(TOOLCHAIN_PREFIX)g++ |
|||
AS = $(TOOLCHAIN_PREFIX)gcc |
|||
AR = $(TOOLCHAIN_PREFIX)ar |
|||
LD = $(TOOLCHAIN_PREFIX)g++ |
|||
STRIP = $(TOOLCHAIN_PREFIX)strip |
|||
|
|||
#*********************************************************************************************************
|
|||
# do not change the following code
|
|||
# buildin internal application source
|
|||
#*********************************************************************************************************
|
|||
#*********************************************************************************************************
|
|||
# src(s) file
|
|||
#*********************************************************************************************************
|
|||
SRCS_LUA = \
|
|||
lua/src/lua |
|||
|
|||
SRCS_LUAC = \
|
|||
lua/src/luac |
|||
|
|||
SRCS_LIB = \
|
|||
lua/src/lapi.c \ |
|||
lua/src/lauxlib.c \ |
|||
lua/src/lbaselib.c \ |
|||
lua/src/lbitlib.c \ |
|||
lua/src/lcode.c \ |
|||
lua/src/lcorolib.c \ |
|||
lua/src/lctype.c \ |
|||
lua/src/ldblib.c \ |
|||
lua/src/ldebug.c \ |
|||
lua/src/ldo.c \ |
|||
lua/src/ldump.c \ |
|||
lua/src/lfunc.c \ |
|||
lua/src/lgc.c \ |
|||
lua/src/linit.c \ |
|||
lua/src/liolib.c \ |
|||
lua/src/llex.c \ |
|||
lua/src/lmathlib.c \ |
|||
lua/src/lmem.c \ |
|||
lua/src/loadlib.c \ |
|||
lua/src/lobject.c \ |
|||
lua/src/lopcodes.c \ |
|||
lua/src/loslib.c \ |
|||
lua/src/lparser.c \ |
|||
lua/src/lstate.c \ |
|||
lua/src/lstring.c \ |
|||
lua/src/lstrlib.c \ |
|||
lua/src/ltable.c \ |
|||
lua/src/ltablib.c \ |
|||
lua/src/ltm.c \ |
|||
lua/src/lundump.c \ |
|||
lua/src/lutf8lib.c \ |
|||
lua/src/lvm.c \ |
|||
lua/src/lzio.c |
|||
|
|||
#*********************************************************************************************************
|
|||
# build path
|
|||
#*********************************************************************************************************
|
|||
ifeq ($(DEBUG_LEVEL), debug) |
|||
OUTDIR = Debug |
|||
else |
|||
OUTDIR = Release |
|||
endif |
|||
|
|||
OUTPATH = ./$(OUTDIR) |
|||
OBJPATH = $(OUTPATH)/obj |
|||
DEPPATH = $(OUTPATH)/dep |
|||
|
|||
#*********************************************************************************************************
|
|||
# target
|
|||
#*********************************************************************************************************
|
|||
LIB = $(OUTPATH)/liblua.a |
|||
DLL = $(OUTPATH)/liblua.so |
|||
LUAC = $(OUTPATH)/luac |
|||
LUA = $(OUTPATH)/lua |
|||
STRIP_DLL = $(OUTPATH)/strip/liblua.so |
|||
STRIP_LUAC = $(OUTPATH)/strip/luac |
|||
STRIP_LUA = $(OUTPATH)/strip/lua |
|||
|
|||
#*********************************************************************************************************
|
|||
# liblua objects
|
|||
#*********************************************************************************************************
|
|||
LIB_OBJS = $(addprefix $(OBJPATH)/, $(addsuffix .o, $(basename $(SRCS_LIB)))) |
|||
LIB_DEPS = $(addprefix $(DEPPATH)/, $(addsuffix .d, $(basename $(SRCS_LIB)))) |
|||
|
|||
LUAC_OBJS = $(addprefix $(OBJPATH)/, $(addsuffix .o, $(basename $(SRCS_LUAC)))) |
|||
LUAC_DEPS = $(addprefix $(DEPPATH)/, $(addsuffix .d, $(basename $(SRCS_LUAC)))) |
|||
|
|||
LUA_OBJS = $(addprefix $(OBJPATH)/, $(addsuffix .o, $(basename $(SRCS_LUA)))) |
|||
LUA_DEPS = $(addprefix $(DEPPATH)/, $(addsuffix .d, $(basename $(SRCS_LUA)))) |
|||
|
|||
#*********************************************************************************************************
|
|||
# include path
|
|||
#*********************************************************************************************************
|
|||
INCDIR = -I"$(SYLIXOS_BASE_PATH)/libsylixos/SylixOS" |
|||
INCDIR += -I"$(SYLIXOS_BASE_PATH)/libsylixos/SylixOS/include" |
|||
INCDIR += -I"$(SYLIXOS_BASE_PATH)/libsylixos/SylixOS/include/inet" |
|||
INCDIR += -I"$(SYLIXOS_BASE_PATH)/libreadline" |
|||
INCDIR += -I"./lua/src" |
|||
|
|||
#*********************************************************************************************************
|
|||
# compiler preprocess
|
|||
#*********************************************************************************************************
|
|||
DSYMBOL = -DSYLIXOS |
|||
DSYMBOL += -DSYLIXOS_LIB |
|||
DSYMBOL += -DLUA_USE_LINUX |
|||
|
|||
#*********************************************************************************************************
|
|||
# depend dynamic library
|
|||
#*********************************************************************************************************
|
|||
DEPEND_DLL = -lreadline |
|||
|
|||
#*********************************************************************************************************
|
|||
# depend dynamic library search path
|
|||
#*********************************************************************************************************
|
|||
DEPEND_DLL_PATH = -L"$(SYLIXOS_BASE_PATH)/libreadline/$(OUTDIR)" |
|||
|
|||
#*********************************************************************************************************
|
|||
# compiler optimize
|
|||
#*********************************************************************************************************
|
|||
ifeq ($(DEBUG_LEVEL), debug) |
|||
OPTIMIZE = -O0 -g3 -gdwarf-2 |
|||
else |
|||
OPTIMIZE = -O2 -g1 -gdwarf-2 # Do NOT use -O3 and -Os |
|||
endif # -Os is not align for function
|
|||
# loop and jump. |
|||
#*********************************************************************************************************
|
|||
# depends and compiler parameter (cplusplus in kernel MUST NOT use exceptions and rtti)
|
|||
#*********************************************************************************************************
|
|||
DEPENDFLAG = -MM |
|||
CXX_EXCEPT = -fno-exceptions -fno-rtti |
|||
COMMONFLAGS = $(CPUFLAGS) $(OPTIMIZE) -Wall -fmessage-length=0 -fsigned-char -fno-short-enums -mlong-double-64 |
|||
ASFLAGS = -x assembler-with-cpp $(DSYMBOL) $(INCDIR) $(COMMONFLAGS) -c |
|||
CFLAGS = $(DSYMBOL) $(INCDIR) $(COMMONFLAGS) -fPIC -c |
|||
CXXFLAGS = $(DSYMBOL) $(INCDIR) $(CXX_EXCEPT) $(COMMONFLAGS) -fPIC -c |
|||
ARFLAGS = -r |
|||
|
|||
#*********************************************************************************************************
|
|||
# define some useful variable
|
|||
#*********************************************************************************************************
|
|||
DEPEND = $(CC) $(DEPENDFLAG) $(CFLAGS) |
|||
DEPEND.d = $(subst -g ,,$(DEPEND)) |
|||
COMPILE.S = $(AS) $(ASFLAGS) |
|||
COMPILE_VFP.S = $(AS) $(ASFLAGS) |
|||
COMPILE.c = $(CC) $(CFLAGS) |
|||
COMPILE.cxx = $(CXX) $(CXXFLAGS) |
|||
|
|||
#*********************************************************************************************************
|
|||
# target
|
|||
#*********************************************************************************************************
|
|||
all: $(LIB) $(DLL) $(LUAC) $(LUA) $(STRIP_DLL) $(STRIP_LUAC) $(STRIP_LUA) |
|||
@echo create "$(LIB) $(DLL) $(LUAC) $(LUA) $(STRIP_DLL) $(STRIP_LUAC) $(STRIP_LUA)" success. |
|||
|
|||
#*********************************************************************************************************
|
|||
# include depends
|
|||
#*********************************************************************************************************
|
|||
ifneq ($(MAKECMDGOALS), clean) |
|||
ifneq ($(MAKECMDGOALS), clean_project) |
|||
sinclude $(LIB_DEPS) $(LUA_DEPS) $(LUAC_DEPS) |
|||
endif |
|||
endif |
|||
|
|||
#*********************************************************************************************************
|
|||
# create depends files
|
|||
#*********************************************************************************************************
|
|||
$(DEPPATH)/%.d: %.c |
|||
@echo creating $@ |
|||
@if [ ! -d "$(dir $@)" ]; then mkdir -p "$(dir $@)"; fi |
|||
@rm -f $@; \
|
|||
echo -n '$@ $(addprefix $(OBJPATH)/, $(dir $<))' > $@; \
|
|||
$(DEPEND.d) $< >> $@ || rm -f $@; exit; |
|||
|
|||
$(DEPPATH)/%.d: %.cpp |
|||
@echo creating $@ |
|||
@if [ ! -d "$(dir $@)" ]; then mkdir -p "$(dir $@)"; fi |
|||
@rm -f $@; \
|
|||
echo -n '$@ $(addprefix $(OBJPATH)/, $(dir $<))' > $@; \
|
|||
$(DEPEND.d) $< >> $@ || rm -f $@; exit; |
|||
|
|||
#*********************************************************************************************************
|
|||
# compile source files
|
|||
#*********************************************************************************************************
|
|||
$(OBJPATH)/%.o: %.S |
|||
@if [ ! -d "$(dir $@)" ]; then mkdir -p "$(dir $@)"; fi |
|||
$(COMPILE.S) $< -o $@ |
|||
|
|||
$(OBJPATH)/%.o: %.c |
|||
@if [ ! -d "$(dir $@)" ]; then mkdir -p "$(dir $@)"; fi |
|||
$(COMPILE.c) $< -o $@ |
|||
|
|||
$(OBJPATH)/%.o: %.cpp |
|||
@if [ ! -d "$(dir $@)" ]; then mkdir -p "$(dir $@)"; fi |
|||
$(COMPILE.cxx) $< -o $@ |
|||
|
|||
#*********************************************************************************************************
|
|||
# link liblua.a object files
|
|||
#*********************************************************************************************************
|
|||
$(LIB): $(LIB_OBJS) |
|||
$(AR) $(ARFLAGS) $(LIB) $(LIB_OBJS) |
|||
|
|||
#*********************************************************************************************************
|
|||
# link liblua.so object files
|
|||
#*********************************************************************************************************
|
|||
$(DLL): $(LIB_OBJS) |
|||
$(LD) $(CPUFLAGS) -Wl,-shared -fPIC -shared -o $(DLL) $(LIB_OBJS) \
|
|||
-lm -lgcc |
|||
|
|||
#*********************************************************************************************************
|
|||
# strip liblua.so
|
|||
#*********************************************************************************************************
|
|||
$(STRIP_DLL): $(DLL) |
|||
@if [ ! -d "$(dir $@)" ]; then mkdir -p "$(dir $@)"; fi |
|||
@rm -f $@ |
|||
$(STRIP) $(DLL) -o $(STRIP_DLL) |
|||
|
|||
#*********************************************************************************************************
|
|||
# link luac object files
|
|||
#*********************************************************************************************************
|
|||
$(LUAC): $(LUAC_OBJS) $(LIB_OBJS) |
|||
$(LD) $(CPUFLAGS) -Wl,-shared -fPIC -shared -o $(LUAC) $(LUAC_OBJS) $(LIB_OBJS) \
|
|||
-L"./Debug" -L"./Release" -L"$(SYLIXOS_BASE_PATH)/libsylixos/$(OUTDIR)" \
|
|||
-lvpmpdm -lm -lgcc |
|||
|
|||
#*********************************************************************************************************
|
|||
# strip luac
|
|||
#*********************************************************************************************************
|
|||
$(STRIP_LUAC): $(LUAC) |
|||
@if [ ! -d "$(dir $@)" ]; then mkdir -p "$(dir $@)"; fi |
|||
@rm -f $@ |
|||
$(STRIP) $(LUAC) -o $(STRIP_LUAC) |
|||
|
|||
#*********************************************************************************************************
|
|||
# link lua object files
|
|||
#*********************************************************************************************************
|
|||
$(LUA): $(LUA_OBJS) $(DLL) |
|||
$(LD) $(CPUFLAGS) -Wl,-shared -fPIC -shared -o $(LUA) $(LUA_OBJS) \
|
|||
-L"./Debug" -L"./Release" -L"$(SYLIXOS_BASE_PATH)/libsylixos/$(OUTDIR)" $(DEPEND_DLL_PATH) $(DEPEND_DLL) \
|
|||
-llua -lvpmpdm -lm -lgcc |
|||
|
|||
#*********************************************************************************************************
|
|||
# strip lua
|
|||
#*********************************************************************************************************
|
|||
$(STRIP_LUA): $(LUA) |
|||
@if [ ! -d "$(dir $@)" ]; then mkdir -p "$(dir $@)"; fi |
|||
@rm -f $@ |
|||
$(STRIP) $(LUA) -o $(STRIP_LUA) |
|||
|
|||
#*********************************************************************************************************
|
|||
# clean
|
|||
#*********************************************************************************************************
|
|||
.PHONY: clean |
|||
.PHONY: clean_project |
|||
|
|||
#*********************************************************************************************************
|
|||
# clean objects
|
|||
#*********************************************************************************************************
|
|||
clean: |
|||
-rm -rf $(LIB) |
|||
-rm -rf $(DLL) |
|||
-rm -rf $(LUAC) |
|||
-rm -rf $(LUA) |
|||
-rm -rf $(STRIP_DLL) |
|||
-rm -rf $(STRIP_LUAC) |
|||
-rm -rf $(STRIP_LUA) |
|||
-rm -rf $(LIB_OBJS) |
|||
-rm -rf $(LUAC_OBJS) |
|||
-rm -rf $(LUA_OBJS) |
|||
-rm -rf $(OBJPATH) |
|||
-rm -rf $(DEPPATH) |
|||
|
|||
#*********************************************************************************************************
|
|||
# clean project
|
|||
#*********************************************************************************************************
|
|||
clean_project: |
|||
-rm -rf $(OUTPATH) |
|||
|
|||
#*********************************************************************************************************
|
|||
# END
|
|||
#*********************************************************************************************************
|
@ -0,0 +1,103 @@ |
|||
#*********************************************************************************************************
|
|||
#
|
|||
# 中国软件开源组织
|
|||
#
|
|||
# 嵌入式实时操作系统
|
|||
#
|
|||
# SylixOS(TM) LW : long wing
|
|||
#
|
|||
# Copyright All Rights Reserved
|
|||
#
|
|||
#--------------文件信息--------------------------------------------------------------------------------
|
|||
#
|
|||
# 文 件 名: liblua.mk
|
|||
#
|
|||
# 创 建 人: RealEvo-IDE
|
|||
#
|
|||
# 文件创建日期: 2016 年 10 月 08 日
|
|||
#
|
|||
# 描 述: 本文件由 RealEvo-IDE 生成,用于配置 Makefile 功能,请勿手动修改
|
|||
#*********************************************************************************************************
|
|||
|
|||
#*********************************************************************************************************
|
|||
# Clear setting
|
|||
#*********************************************************************************************************
|
|||
include $(CLEAR_VARS_MK) |
|||
|
|||
#*********************************************************************************************************
|
|||
# Target
|
|||
#*********************************************************************************************************
|
|||
LOCAL_TARGET_NAME := liblua.so |
|||
|
|||
#*********************************************************************************************************
|
|||
# Source list
|
|||
#*********************************************************************************************************
|
|||
LOCAL_SRCS := \
|
|||
lua/src/lapi.c \ |
|||
lua/src/lauxlib.c \ |
|||
lua/src/lbaselib.c \ |
|||
lua/src/lbitlib.c \ |
|||
lua/src/lcode.c \ |
|||
lua/src/lcorolib.c \ |
|||
lua/src/lctype.c \ |
|||
lua/src/ldblib.c \ |
|||
lua/src/ldebug.c \ |
|||
lua/src/ldo.c \ |
|||
lua/src/ldump.c \ |
|||
lua/src/lfunc.c \ |
|||
lua/src/lgc.c \ |
|||
lua/src/linit.c \ |
|||
lua/src/liolib.c \ |
|||
lua/src/llex.c \ |
|||
lua/src/lmathlib.c \ |
|||
lua/src/lmem.c \ |
|||
lua/src/loadlib.c \ |
|||
lua/src/lobject.c \ |
|||
lua/src/lopcodes.c \ |
|||
lua/src/loslib.c \ |
|||
lua/src/lparser.c \ |
|||
lua/src/lstate.c \ |
|||
lua/src/lstring.c \ |
|||
lua/src/lstrlib.c \ |
|||
lua/src/ltable.c \ |
|||
lua/src/ltablib.c \ |
|||
lua/src/ltm.c \ |
|||
lua/src/lundump.c \ |
|||
lua/src/lutf8lib.c \ |
|||
lua/src/lvm.c \ |
|||
lua/src/lzio.c |
|||
|
|||
#*********************************************************************************************************
|
|||
# Header file search path (eg. LOCAL_INC_PATH := -I"Your hearder files search path")
|
|||
#*********************************************************************************************************
|
|||
LOCAL_INC_PATH := |
|||
LOCAL_INC_PATH += -I"$(SYLIXOS_BASE_PATH)/libreadline" |
|||
LOCAL_INC_PATH += -I"./lua/src" |
|||
|
|||
#*********************************************************************************************************
|
|||
# Pre-defined macro (eg. -DYOUR_MARCO=1)
|
|||
#*********************************************************************************************************
|
|||
LOCAL_DSYMBOL := -DLUA_USE_LINUX |
|||
|
|||
#*********************************************************************************************************
|
|||
# Depend library (eg. LOCAL_DEPEND_LIB := -la LOCAL_DEPEND_LIB_PATH := -L"Your library search path")
|
|||
#*********************************************************************************************************
|
|||
LOCAL_DEPEND_LIB := -lreadline |
|||
LOCAL_DEPEND_LIB_PATH := -L"$(SYLIXOS_BASE_PATH)/libreadline/$(OUTDIR)" |
|||
|
|||
#*********************************************************************************************************
|
|||
# C++ config
|
|||
#*********************************************************************************************************
|
|||
LOCAL_USE_CXX := no |
|||
LOCAL_USE_CXX_EXCEPT := no |
|||
|
|||
#*********************************************************************************************************
|
|||
# Code coverage config
|
|||
#*********************************************************************************************************
|
|||
LOCAL_USE_GCOV := no |
|||
|
|||
include $(LIBRARY_MK) |
|||
|
|||
#*********************************************************************************************************
|
|||
# End
|
|||
#*********************************************************************************************************
|
@ -0,0 +1,76 @@ |
|||
#*********************************************************************************************************
|
|||
#
|
|||
# 中国软件开源组织
|
|||
#
|
|||
# 嵌入式实时操作系统
|
|||
#
|
|||
# SylixOS(TM) LW : long wing
|
|||
#
|
|||
# Copyright All Rights Reserved
|
|||
#
|
|||
#--------------文件信息--------------------------------------------------------------------------------
|
|||
#
|
|||
# 文 件 名: lua.mk
|
|||
#
|
|||
# 创 建 人: RealEvo-IDE
|
|||
#
|
|||
# 文件创建日期: 2016 年 10 月 08 日
|
|||
#
|
|||
# 描 述: 本文件由 RealEvo-IDE 生成,用于配置 Makefile 功能,请勿手动修改
|
|||
#*********************************************************************************************************
|
|||
|
|||
#*********************************************************************************************************
|
|||
# Clear setting
|
|||
#*********************************************************************************************************
|
|||
include $(CLEAR_VARS_MK) |
|||
|
|||
#*********************************************************************************************************
|
|||
# Target
|
|||
#*********************************************************************************************************
|
|||
LOCAL_TARGET_NAME := lua |
|||
|
|||
#*********************************************************************************************************
|
|||
# Source list
|
|||
#*********************************************************************************************************
|
|||
LOCAL_SRCS := \
|
|||
lua/src/lua.c |
|||
|
|||
#*********************************************************************************************************
|
|||
# Header file search path (eg. LOCAL_INC_PATH := -I"Your hearder files search path")
|
|||
#*********************************************************************************************************
|
|||
LOCAL_INC_PATH := |
|||
LOCAL_INC_PATH += -I"$(SYLIXOS_BASE_PATH)/libreadline" |
|||
LOCAL_INC_PATH += -I"./lua/src" |
|||
|
|||
#*********************************************************************************************************
|
|||
# Pre-defined macro (eg. -DYOUR_MARCO=1)
|
|||
#*********************************************************************************************************
|
|||
LOCAL_DSYMBOL := -DLUA_USE_LINUX |
|||
|
|||
#*********************************************************************************************************
|
|||
# Depend library (eg. LOCAL_DEPEND_LIB := -la LOCAL_DEPEND_LIB_PATH := -L"Your library search path")
|
|||
#*********************************************************************************************************
|
|||
LOCAL_DEPEND_LIB := -llua -lreadline |
|||
LOCAL_DEPEND_LIB_PATH := -L"./$(OUTDIR)" -L"$(SYLIXOS_BASE_PATH)/libreadline/$(OUTDIR)" |
|||
|
|||
#*********************************************************************************************************
|
|||
# C++ config
|
|||
#*********************************************************************************************************
|
|||
LOCAL_USE_CXX := no |
|||
LOCAL_USE_CXX_EXCEPT := no |
|||
|
|||
#*********************************************************************************************************
|
|||
# Code coverage config
|
|||
#*********************************************************************************************************
|
|||
LOCAL_USE_GCOV := no |
|||
|
|||
#*********************************************************************************************************
|
|||
# Depend target
|
|||
#*********************************************************************************************************
|
|||
LOCAL_DEPEND_TARGET = ./$(OUTDIR)/liblua.so |
|||
|
|||
include $(APPLICATION_MK) |
|||
|
|||
#*********************************************************************************************************
|
|||
# End
|
|||
#*********************************************************************************************************
|
@ -0,0 +1,104 @@ |
|||
#*********************************************************************************************************
|
|||
#
|
|||
# 中国软件开源组织
|
|||
#
|
|||
# 嵌入式实时操作系统
|
|||
#
|
|||
# SylixOS(TM) LW : long wing
|
|||
#
|
|||
# Copyright All Rights Reserved
|
|||
#
|
|||
#--------------文件信息--------------------------------------------------------------------------------
|
|||
#
|
|||
# 文 件 名: luac.mk
|
|||
#
|
|||
# 创 建 人: RealEvo-IDE
|
|||
#
|
|||
# 文件创建日期: 2016 年 10 月 08 日
|
|||
#
|
|||
# 描 述: 本文件由 RealEvo-IDE 生成,用于配置 Makefile 功能,请勿手动修改
|
|||
#*********************************************************************************************************
|
|||
|
|||
#*********************************************************************************************************
|
|||
# Clear setting
|
|||
#*********************************************************************************************************
|
|||
include $(CLEAR_VARS_MK) |
|||
|
|||
#*********************************************************************************************************
|
|||
# Target
|
|||
#*********************************************************************************************************
|
|||
LOCAL_TARGET_NAME := luac |
|||
|
|||
#*********************************************************************************************************
|
|||
# Source list
|
|||
#*********************************************************************************************************
|
|||
LOCAL_SRCS := \
|
|||
lua/src/lapi.c \ |
|||
lua/src/lauxlib.c \ |
|||
lua/src/lbaselib.c \ |
|||
lua/src/lbitlib.c \ |
|||
lua/src/lcode.c \ |
|||
lua/src/lcorolib.c \ |
|||
lua/src/lctype.c \ |
|||
lua/src/ldblib.c \ |
|||
lua/src/ldebug.c \ |
|||
lua/src/ldo.c \ |
|||
lua/src/ldump.c \ |
|||
lua/src/lfunc.c \ |
|||
lua/src/lgc.c \ |
|||
lua/src/linit.c \ |
|||
lua/src/liolib.c \ |
|||
lua/src/llex.c \ |
|||
lua/src/lmathlib.c \ |
|||
lua/src/lmem.c \ |
|||
lua/src/loadlib.c \ |
|||
lua/src/lobject.c \ |
|||
lua/src/lopcodes.c \ |
|||
lua/src/loslib.c \ |
|||
lua/src/lparser.c \ |
|||
lua/src/lstate.c \ |
|||
lua/src/lstring.c \ |
|||
lua/src/lstrlib.c \ |
|||
lua/src/ltable.c \ |
|||
lua/src/ltablib.c \ |
|||
lua/src/ltm.c \ |
|||
lua/src/lundump.c \ |
|||
lua/src/lutf8lib.c \ |
|||
lua/src/lvm.c \ |
|||
lua/src/lzio.c \ |
|||
lua/src/luac.c |
|||
|
|||
#*********************************************************************************************************
|
|||
# Header file search path (eg. LOCAL_INC_PATH := -I"Your hearder files search path")
|
|||
#*********************************************************************************************************
|
|||
LOCAL_INC_PATH := |
|||
LOCAL_INC_PATH += -I"$(SYLIXOS_BASE_PATH)/libreadline" |
|||
LOCAL_INC_PATH += -I"./lua/src" |
|||
|
|||
#*********************************************************************************************************
|
|||
# Pre-defined macro (eg. -DYOUR_MARCO=1)
|
|||
#*********************************************************************************************************
|
|||
LOCAL_DSYMBOL := -DLUA_USE_LINUX |
|||
|
|||
#*********************************************************************************************************
|
|||
# Depend library (eg. LOCAL_DEPEND_LIB := -la LOCAL_DEPEND_LIB_PATH := -L"Your library search path")
|
|||
#*********************************************************************************************************
|
|||
LOCAL_DEPEND_LIB := -lreadline |
|||
LOCAL_DEPEND_LIB_PATH := -L"$(SYLIXOS_BASE_PATH)/libreadline/$(OUTDIR)" |
|||
|
|||
#*********************************************************************************************************
|
|||
# C++ config
|
|||
#*********************************************************************************************************
|
|||
LOCAL_USE_CXX := no |
|||
LOCAL_USE_CXX_EXCEPT := no |
|||
|
|||
#*********************************************************************************************************
|
|||
# Code coverage config
|
|||
#*********************************************************************************************************
|
|||
LOCAL_USE_GCOV := no |
|||
|
|||
include $(APPLICATION_MK) |
|||
|
|||
#*********************************************************************************************************
|
|||
# End
|
|||
#*********************************************************************************************************
|
Loading…
Reference in new issue