From 53525a06b417dd921452cbe40216dcec0b3ffeab Mon Sep 17 00:00:00 2001 From: Jiaojinxing Date: Fri, 9 Dec 2016 12:45:57 +0800 Subject: [PATCH] Converted to RealEvo-IDE 3.0.0 project. --- .cproject | 66 ++--------- .gitignore | 4 +- .project | 77 +++++++++--- .reproject | 14 +++ .template/Makefile.arch | 4 - .template/config.mk | 41 ------- Makefile | 86 +++++++++++++- Makefile.arm | 257 ---------------------------------------- Makefile.mips | 257 ---------------------------------------- Makefile.ppc | 257 ---------------------------------------- Makefile.x86 | 0 config.mk | 17 +-- libreadline.mk | 107 +++++++++++++++++ 13 files changed, 287 insertions(+), 900 deletions(-) create mode 100644 .reproject delete mode 100644 .template/Makefile.arch delete mode 100644 .template/config.mk delete mode 100644 Makefile.arm delete mode 100644 Makefile.mips delete mode 100644 Makefile.ppc delete mode 100644 Makefile.x86 create mode 100644 libreadline.mk diff --git a/.cproject b/.cproject index 8364004..911f112 100644 --- a/.cproject +++ b/.cproject @@ -1,66 +1,26 @@ - - - - - - - - - - + + - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + diff --git a/.gitignore b/.gitignore index 1b8c7c6..00d9390 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -/Debug -/Release +Release +Debug /.settings /.rcsetting diff --git a/.project b/.project index 5e1f9a4..98fc031 100644 --- a/.project +++ b/.project @@ -6,27 +6,74 @@ - org.eclipse.cdt.managedbuilder.core.genmakebuilder + com.sylixos.realevo.projectmgr.SylixOSBuilder clean,full,incremental, - - - - org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder - full,incremental, - - - - - com.sylixos.realcoder.SylixOSBuilder - + + org.eclipse.cdt.core.errorOutputParser + org.eclipse.cdt.core.GASErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GmakeErrorParser;org.eclipse.cdt.core.VCErrorParser;org.eclipse.cdt.core.CWDLocator;org.eclipse.cdt.core.MakeErrorParser; + + + org.eclipse.cdt.make.core.append_environment + true + + + org.eclipse.cdt.make.core.build.arguments + + + + org.eclipse.cdt.make.core.build.command + make + + + org.eclipse.cdt.make.core.build.location + + + + org.eclipse.cdt.make.core.build.target.auto + all + + + org.eclipse.cdt.make.core.build.target.clean + clean + + + org.eclipse.cdt.make.core.build.target.inc + all + + + org.eclipse.cdt.make.core.enableAutoBuild + false + + + org.eclipse.cdt.make.core.enableCleanBuild + true + + + org.eclipse.cdt.make.core.enableFullBuild + true + + + org.eclipse.cdt.make.core.enabledIncrementalBuild + true + + + org.eclipse.cdt.make.core.environment + + + + org.eclipse.cdt.make.core.stopOnError + true + + + org.eclipse.cdt.make.core.useDefaultBuildCmd + true + org.eclipse.cdt.core.cnature - org.eclipse.cdt.managedbuilder.core.managedBuildNature - org.eclipse.cdt.managedbuilder.core.ScannerConfigNature - com.sylixos.realcoder.SylixOSProject + com.sylixos.realevo.projectmgr.SylixOSNature diff --git a/.reproject b/.reproject new file mode 100644 index 0000000..a70d690 --- /dev/null +++ b/.reproject @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/.template/Makefile.arch b/.template/Makefile.arch deleted file mode 100644 index 3e593bd..0000000 --- a/.template/Makefile.arch +++ /dev/null @@ -1,4 +0,0 @@ -#********************************************************************************************************* -# include architecture related Makefile -#********************************************************************************************************* -include Makefile.$(SylixOS_Arch) diff --git a/.template/config.mk b/.template/config.mk deleted file mode 100644 index ebc46ca..0000000 --- a/.template/config.mk +++ /dev/null @@ -1,41 +0,0 @@ -#********************************************************************************************************* -# -# 中国软件开源组织 -# -# 嵌入式实时操作系统 -# -# SylixOS(TM) LW : long wing -# -# Copyright All Rights Reserved -# -#--------------文件信息-------------------------------------------------------------------------------- -# -# 文 件 名: config.mk -# -# 创 建 人: RealEvo-IDE -# -# 文件创建日期: $(Create_Date) -# -# 描 述: 本文件由 RealEvo-IDE 生成,用于配置 Makefile 功能,请勿手动修改 -#********************************************************************************************************* -#********************************************************************************************************* -# SylixOS Base Project path -#********************************************************************************************************* -SYLIXOS_BASE_PATH = $(SylixOS_Base_Path) - -#********************************************************************************************************* -# Toolchain prefix -#********************************************************************************************************* -TOOLCHAIN_PREFIX = $(SylixOS_Toolchain)- - -#********************************************************************************************************* -# Debug options (debug or release) -#********************************************************************************************************* -DEBUG_LEVEL = $(SylixOS_Debug_Level) - -#********************************************************************************************************* -# NOTICE: libsylixos, BSP and other kernel modules projects CAN NOT use vfp! -#********************************************************************************************************* -FPUFLAGS = $(SylixOS_Fpu_Type) -CPUFLAGS = $(SylixOS_Cpu_Type) $(FPUFLAGS) - diff --git a/Makefile b/Makefile index 4fdfaf0..4513840 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,86 @@ #********************************************************************************************************* -# include architecture related Makefile +# +# 中国软件开源组织 +# +# 嵌入式实时操作系统 +# +# SylixOS(TM) LW : long wing +# +# Copyright All Rights Reserved +# +#--------------文件信息-------------------------------------------------------------------------------- +# +# 文 件 名: Makefile +# +# 创 建 人: RealEvo-IDE +# +# 文件创建日期: 2016 年 12 月 09 日 +# +# 描 述: 本文件由 RealEvo-IDE 生成,用于配置 Makefile 功能,请勿手动修改 +#********************************************************************************************************* + +#********************************************************************************************************* +# 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 + +#********************************************************************************************************* +# Include sylixos base config.mk +#********************************************************************************************************* +EMPTY = +SPACE = $(EMPTY) $(EMPTY) + +SYLIXOS_BASE_PATH_BAK := $(SYLIXOS_BASE_PATH) +TOOLCHAIN_PREFIX_BAK := $(TOOLCHAIN_PREFIX) +DEBUG_LEVEL_BAK := $(DEBUG_LEVEL) +CPU_TYPE_BAK := $(CPU_TYPE) +FPU_TYPE_BAK := $(FPU_TYPE) + +SYLIXOS_BASE_CONFIGMK = $(subst $(SPACE),\ ,$(SYLIXOS_BASE_PATH))/config.mk +include $(SYLIXOS_BASE_CONFIGMK) + +SYLIXOS_BASE_PATH := $(SYLIXOS_BASE_PATH_BAK) +DEBUG_LEVEL := $(DEBUG_LEVEL_BAK) + +ifneq ($(TOOLCHAIN_PREFIX_BAK),) +TOOLCHAIN_PREFIX := $(TOOLCHAIN_PREFIX_BAK) +endif + +ifneq ($(CPU_TYPE_BAK),) +CPU_TYPE := $(CPU_TYPE_BAK) +endif + +ifneq ($(FPU_TYPE_BAK),) +FPU_TYPE := $(FPU_TYPE_BAK) +endif + +#********************************************************************************************************* +# Include header.mk +#********************************************************************************************************* +MKTEMP = $(subst $(SPACE),\ ,$(SYLIXOS_BASE_PATH))/libsylixos/SylixOS/mktemp + +include $(MKTEMP)/header.mk + +#********************************************************************************************************* +# Include targets makefiles +#********************************************************************************************************* +include libreadline.mk + +#********************************************************************************************************* +# Include end.mk +#********************************************************************************************************* +include $(END_MK) + +#********************************************************************************************************* +# End #********************************************************************************************************* -include Makefile.arm diff --git a/Makefile.arm b/Makefile.arm deleted file mode 100644 index dfd48a9..0000000 --- a/Makefile.arm +++ /dev/null @@ -1,257 +0,0 @@ -#********************************************************************************************************* -# readline Makefile -# target -> libreadline.a -# libreadline.so -#********************************************************************************************************* - -#********************************************************************************************************* -# 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++ - -#********************************************************************************************************* -# do not change the following code -# buildin internal application source -#********************************************************************************************************* -#********************************************************************************************************* -# src(s) file -#********************************************************************************************************* -SRCS = \ -readline/bind.c \ -readline/callback.c \ -readline/colors.c \ -readline/compat.c \ -readline/complete.c \ -readline/display.c \ -readline/funmap.c \ -readline/histexpand.c \ -readline/histfile.c \ -readline/history.c \ -readline/histsearch.c \ -readline/input.c \ -readline/isearch.c \ -readline/keymaps.c \ -readline/kill.c \ -readline/macro.c \ -readline/mbutil.c \ -readline/misc.c \ -readline/nls.c \ -readline/parens.c \ -readline/parse-colors.c \ -readline/readline.c \ -readline/rltty.c \ -readline/savestring.c \ -readline/search.c \ -readline/shell.c \ -readline/signals.c \ -readline/terminal.c \ -readline/text.c \ -readline/tilde.c \ -readline/undo.c \ -readline/util.c \ -readline/vi_mode.c \ -readline/xfree.c \ -readline/xmalloc.c - -#********************************************************************************************************* -# build path -#********************************************************************************************************* -ifeq ($(DEBUG_LEVEL), debug) -OUTDIR = Debug -else -OUTDIR = Release -endif - -OUTPATH = ./$(OUTDIR) -OBJPATH = $(OUTPATH)/obj -DEPPATH = $(OUTPATH)/dep - -#********************************************************************************************************* -# target -#********************************************************************************************************* -LIB = $(OUTPATH)/libreadline.a -DLL = $(OUTPATH)/libreadline.so - -#********************************************************************************************************* -# objects -#********************************************************************************************************* -OBJS = $(addprefix $(OBJPATH)/, $(addsuffix .o, $(basename $(SRCS)))) -DEPS = $(addprefix $(DEPPATH)/, $(addsuffix .d, $(basename $(SRCS)))) - -#********************************************************************************************************* -# 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"." -INCDIR += -I"./readline" - -#********************************************************************************************************* -# compiler preprocess -#********************************************************************************************************* -DSYMBOL = -DSYLIXOS -DSYMBOL += -DSYLIXOS_LIB -DSYMBOL += -DHAVE_CONFIG_H -DSYMBOL += -D_POSIX_VERSION=2008 - -#********************************************************************************************************* -# depend dynamic library -#********************************************************************************************************* -DEPEND_DLL = -lcextern - -#********************************************************************************************************* -# depend dynamic library search path -#********************************************************************************************************* -DEPEND_DLL_PATH = -L"$(SYLIXOS_BASE_PATH)/libcextern/$(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) - @echo create "$(LIB) $(DLL)" success. - -#********************************************************************************************************* -# include depends -#********************************************************************************************************* -ifneq ($(MAKECMDGOALS), clean) -ifneq ($(MAKECMDGOALS), clean_project) -sinclude $(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 libreadline.a object files -#********************************************************************************************************* -$(LIB): $(OBJS) - $(AR) $(ARFLAGS) $(LIB) $(OBJS) - -#********************************************************************************************************* -# link libreadline.so object files -#********************************************************************************************************* -$(DLL): $(OBJS) - $(LD) $(CPUFLAGS) -nostdlib -fPIC -shared -o $(DLL) $(OBJS) \ - $(DEPEND_DLL_PATH) $(DEPEND_DLL) -lm -lgcc - -#********************************************************************************************************* -# clean -#********************************************************************************************************* -.PHONY: clean -.PHONY: clean_project - -#********************************************************************************************************* -# clean objects -#********************************************************************************************************* -clean: - -rm -rf $(LIB) - -rm -rf $(DLL) - -rm -rf $(OBJS) - -rm -rf $(OBJPATH) - -rm -rf $(DEPPATH) - -#********************************************************************************************************* -# clean project -#********************************************************************************************************* -clean_project: - -rm -rf $(OUTPATH) - -#********************************************************************************************************* -# END -#********************************************************************************************************* diff --git a/Makefile.mips b/Makefile.mips deleted file mode 100644 index fc0eda4..0000000 --- a/Makefile.mips +++ /dev/null @@ -1,257 +0,0 @@ -#********************************************************************************************************* -# readline Makefile -# target -> libreadline.a -# libreadline.so -#********************************************************************************************************* - -#********************************************************************************************************* -# 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++ - -#********************************************************************************************************* -# do not change the following code -# buildin internal application source -#********************************************************************************************************* -#********************************************************************************************************* -# src(s) file -#********************************************************************************************************* -SRCS = \ -readline/bind.c \ -readline/callback.c \ -readline/colors.c \ -readline/compat.c \ -readline/complete.c \ -readline/display.c \ -readline/funmap.c \ -readline/histexpand.c \ -readline/histfile.c \ -readline/history.c \ -readline/histsearch.c \ -readline/input.c \ -readline/isearch.c \ -readline/keymaps.c \ -readline/kill.c \ -readline/macro.c \ -readline/mbutil.c \ -readline/misc.c \ -readline/nls.c \ -readline/parens.c \ -readline/parse-colors.c \ -readline/readline.c \ -readline/rltty.c \ -readline/savestring.c \ -readline/search.c \ -readline/shell.c \ -readline/signals.c \ -readline/terminal.c \ -readline/text.c \ -readline/tilde.c \ -readline/undo.c \ -readline/util.c \ -readline/vi_mode.c \ -readline/xfree.c \ -readline/xmalloc.c - -#********************************************************************************************************* -# build path -#********************************************************************************************************* -ifeq ($(DEBUG_LEVEL), debug) -OUTDIR = Debug -else -OUTDIR = Release -endif - -OUTPATH = ./$(OUTDIR) -OBJPATH = $(OUTPATH)/obj -DEPPATH = $(OUTPATH)/dep - -#********************************************************************************************************* -# target -#********************************************************************************************************* -LIB = $(OUTPATH)/libreadline.a -DLL = $(OUTPATH)/libreadline.so - -#********************************************************************************************************* -# objects -#********************************************************************************************************* -OBJS = $(addprefix $(OBJPATH)/, $(addsuffix .o, $(basename $(SRCS)))) -DEPS = $(addprefix $(DEPPATH)/, $(addsuffix .d, $(basename $(SRCS)))) - -#********************************************************************************************************* -# 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"." -INCDIR += -I"./readline" - -#********************************************************************************************************* -# compiler preprocess -#********************************************************************************************************* -DSYMBOL = -DSYLIXOS -DSYMBOL += -DSYLIXOS_LIB -DSYMBOL += -DHAVE_CONFIG_H -DSYMBOL += -D_POSIX_VERSION=2008 - -#********************************************************************************************************* -# depend dynamic library -#********************************************************************************************************* -DEPEND_DLL = -lcextern - -#********************************************************************************************************* -# depend dynamic library search path -#********************************************************************************************************* -DEPEND_DLL_PATH = -L"$(SYLIXOS_BASE_PATH)/libcextern/$(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) - @echo create "$(LIB) $(DLL)" success. - -#********************************************************************************************************* -# include depends -#********************************************************************************************************* -ifneq ($(MAKECMDGOALS), clean) -ifneq ($(MAKECMDGOALS), clean_project) -sinclude $(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 libreadline.a object files -#********************************************************************************************************* -$(LIB): $(OBJS) - $(AR) $(ARFLAGS) $(LIB) $(OBJS) - -#********************************************************************************************************* -# link libreadline.so object files -#********************************************************************************************************* -$(DLL): $(OBJS) - $(LD) $(CPUFLAGS) -fPIC -mabicalls -shared -o $(DLL) $(OBJS) \ - $(DEPEND_DLL_PATH) $(DEPEND_DLL) -lm -lgcc - -#********************************************************************************************************* -# clean -#********************************************************************************************************* -.PHONY: clean -.PHONY: clean_project - -#********************************************************************************************************* -# clean objects -#********************************************************************************************************* -clean: - -rm -rf $(LIB) - -rm -rf $(DLL) - -rm -rf $(OBJS) - -rm -rf $(OBJPATH) - -rm -rf $(DEPPATH) - -#********************************************************************************************************* -# clean project -#********************************************************************************************************* -clean_project: - -rm -rf $(OUTPATH) - -#********************************************************************************************************* -# END -#********************************************************************************************************* diff --git a/Makefile.ppc b/Makefile.ppc deleted file mode 100644 index 8d4d5ef..0000000 --- a/Makefile.ppc +++ /dev/null @@ -1,257 +0,0 @@ -#********************************************************************************************************* -# readline Makefile -# target -> libreadline.a -# libreadline.so -#********************************************************************************************************* - -#********************************************************************************************************* -# 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++ - -#********************************************************************************************************* -# do not change the following code -# buildin internal application source -#********************************************************************************************************* -#********************************************************************************************************* -# src(s) file -#********************************************************************************************************* -SRCS = \ -readline/bind.c \ -readline/callback.c \ -readline/colors.c \ -readline/compat.c \ -readline/complete.c \ -readline/display.c \ -readline/funmap.c \ -readline/histexpand.c \ -readline/histfile.c \ -readline/history.c \ -readline/histsearch.c \ -readline/input.c \ -readline/isearch.c \ -readline/keymaps.c \ -readline/kill.c \ -readline/macro.c \ -readline/mbutil.c \ -readline/misc.c \ -readline/nls.c \ -readline/parens.c \ -readline/parse-colors.c \ -readline/readline.c \ -readline/rltty.c \ -readline/savestring.c \ -readline/search.c \ -readline/shell.c \ -readline/signals.c \ -readline/terminal.c \ -readline/text.c \ -readline/tilde.c \ -readline/undo.c \ -readline/util.c \ -readline/vi_mode.c \ -readline/xfree.c \ -readline/xmalloc.c - -#********************************************************************************************************* -# build path -#********************************************************************************************************* -ifeq ($(DEBUG_LEVEL), debug) -OUTDIR = Debug -else -OUTDIR = Release -endif - -OUTPATH = ./$(OUTDIR) -OBJPATH = $(OUTPATH)/obj -DEPPATH = $(OUTPATH)/dep - -#********************************************************************************************************* -# target -#********************************************************************************************************* -LIB = $(OUTPATH)/libreadline.a -DLL = $(OUTPATH)/libreadline.so - -#********************************************************************************************************* -# objects -#********************************************************************************************************* -OBJS = $(addprefix $(OBJPATH)/, $(addsuffix .o, $(basename $(SRCS)))) -DEPS = $(addprefix $(DEPPATH)/, $(addsuffix .d, $(basename $(SRCS)))) - -#********************************************************************************************************* -# 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"." -INCDIR += -I"./readline" - -#********************************************************************************************************* -# compiler preprocess -#********************************************************************************************************* -DSYMBOL = -DSYLIXOS -DSYMBOL += -DSYLIXOS_LIB -DSYMBOL += -DHAVE_CONFIG_H -DSYMBOL += -D_POSIX_VERSION=2008 - -#********************************************************************************************************* -# depend dynamic library -#********************************************************************************************************* -DEPEND_DLL = -lcextern - -#********************************************************************************************************* -# depend dynamic library search path -#********************************************************************************************************* -DEPEND_DLL_PATH = -L"$(SYLIXOS_BASE_PATH)/libcextern/$(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) - @echo create "$(LIB) $(DLL)" success. - -#********************************************************************************************************* -# include depends -#********************************************************************************************************* -ifneq ($(MAKECMDGOALS), clean) -ifneq ($(MAKECMDGOALS), clean_project) -sinclude $(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 libreadline.a object files -#********************************************************************************************************* -$(LIB): $(OBJS) - $(AR) $(ARFLAGS) $(LIB) $(OBJS) - -#********************************************************************************************************* -# link libreadline.so object files -#********************************************************************************************************* -$(DLL): $(OBJS) - $(LD) $(CPUFLAGS) -fPIC -shared -o $(DLL) $(OBJS) \ - $(DEPEND_DLL_PATH) $(DEPEND_DLL) -lm -lgcc - -#********************************************************************************************************* -# clean -#********************************************************************************************************* -.PHONY: clean -.PHONY: clean_project - -#********************************************************************************************************* -# clean objects -#********************************************************************************************************* -clean: - -rm -rf $(LIB) - -rm -rf $(DLL) - -rm -rf $(OBJS) - -rm -rf $(OBJPATH) - -rm -rf $(DEPPATH) - -#********************************************************************************************************* -# clean project -#********************************************************************************************************* -clean_project: - -rm -rf $(OUTPATH) - -#********************************************************************************************************* -# END -#********************************************************************************************************* diff --git a/Makefile.x86 b/Makefile.x86 deleted file mode 100644 index e69de29..0000000 diff --git a/config.mk b/config.mk index fa4e82d..5c23f37 100644 --- a/config.mk +++ b/config.mk @@ -14,28 +14,21 @@ # # 创 建 人: RealEvo-IDE # -# 文件创建日期: 2016 年02 月27 日 +# 文件创建日期: 2016 年 12 月 09 日 # # 描 述: 本文件由 RealEvo-IDE 生成,用于配置 Makefile 功能,请勿手动修改 #********************************************************************************************************* -#********************************************************************************************************* -# SylixOS Base Project path -#********************************************************************************************************* -SYLIXOS_BASE_PATH = D:/workspace/sylixos-base #********************************************************************************************************* -# Toolchain prefix +# SylixOS Base Project path #********************************************************************************************************* -TOOLCHAIN_PREFIX = arm-sylixos-eabi- +SYLIXOS_BASE_PATH := D:\SylixOSDev\workspace\sylixos-base-arm9 #********************************************************************************************************* # Debug options (debug or release) #********************************************************************************************************* -DEBUG_LEVEL = debug +DEBUG_LEVEL := debug #********************************************************************************************************* -# NOTICE: libsylixos, BSP and other kernel modules projects CAN NOT use vfp! +# End #********************************************************************************************************* -FPUFLAGS = -CPUFLAGS = -mcpu=arm920t $(FPUFLAGS) - diff --git a/libreadline.mk b/libreadline.mk new file mode 100644 index 0000000..45846d3 --- /dev/null +++ b/libreadline.mk @@ -0,0 +1,107 @@ +#********************************************************************************************************* +# +# 中国软件开源组织 +# +# 嵌入式实时操作系统 +# +# SylixOS(TM) LW : long wing +# +# Copyright All Rights Reserved +# +#--------------文件信息-------------------------------------------------------------------------------- +# +# 文 件 名: libreadline.mk +# +# 创 建 人: RealEvo-IDE +# +# 文件创建日期: 2016 年 10 月 08 日 +# +# 描 述: 本文件由 RealEvo-IDE 生成,用于配置 Makefile 功能,请勿手动修改 +#********************************************************************************************************* + +#********************************************************************************************************* +# Clear setting +#********************************************************************************************************* +include $(CLEAR_VARS_MK) + +#********************************************************************************************************* +# Target +#********************************************************************************************************* +LOCAL_TARGET_NAME := libreadline.so + +#********************************************************************************************************* +# Source list +#********************************************************************************************************* +LOCAL_SRCS := \ +readline/bind.c \ +readline/callback.c \ +readline/colors.c \ +readline/compat.c \ +readline/complete.c \ +readline/display.c \ +readline/funmap.c \ +readline/histexpand.c \ +readline/histfile.c \ +readline/history.c \ +readline/histsearch.c \ +readline/input.c \ +readline/isearch.c \ +readline/keymaps.c \ +readline/kill.c \ +readline/macro.c \ +readline/mbutil.c \ +readline/misc.c \ +readline/nls.c \ +readline/parens.c \ +readline/parse-colors.c \ +readline/readline.c \ +readline/rltty.c \ +readline/savestring.c \ +readline/search.c \ +readline/shell.c \ +readline/signals.c \ +readline/terminal.c \ +readline/text.c \ +readline/tilde.c \ +readline/undo.c \ +readline/util.c \ +readline/vi_mode.c \ +readline/xfree.c \ +readline/xmalloc.c + +#********************************************************************************************************* +# Header file search path (eg. LOCAL_INC_PATH := -I"Your hearder files search path") +#********************************************************************************************************* +LOCAL_INC_PATH := +LOCAL_INC_PATH += -I"." +LOCAL_INC_PATH += -I"./readline" + +#********************************************************************************************************* +# Pre-defined macro (eg. -DYOUR_MARCO=1) +#********************************************************************************************************* +LOCAL_DSYMBOL := +LOCAL_DSYMBOL += -DHAVE_CONFIG_H +LOCAL_DSYMBOL += -D_POSIX_VERSION=2008 + +#********************************************************************************************************* +# Depend library (eg. LOCAL_DEPEND_LIB := -la LOCAL_DEPEND_LIB_PATH := -L"Your library search path") +#********************************************************************************************************* +LOCAL_DEPEND_LIB := -lcextern +LOCAL_DEPEND_LIB_PATH := -L"$(SYLIXOS_BASE_PATH)/libcextern/$(OUTDIR)" + +#********************************************************************************************************* +# C++ config +#********************************************************************************************************* +LOCAL_USE_CXX := no +LOCAL_USE_CXX_EXCEPT := no + +#********************************************************************************************************* +# Code coverage config +#********************************************************************************************************* +LOCAL_USE_GCOV := no + +include $(LIBRARY_MK) + +#********************************************************************************************************* +# End +#*********************************************************************************************************