diff --git a/.cproject b/.cproject index edec740..8de6c2f 100644 --- a/.cproject +++ b/.cproject @@ -1,13 +1,15 @@ - - + + + + - - + + @@ -22,25 +24,25 @@ - - - - - - - - + - diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1b8c7c6 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +/Debug +/Release +/.settings +/.rcsetting diff --git a/.template/Makefile.arch b/.template/Makefile.arch new file mode 100644 index 0000000..3e593bd --- /dev/null +++ b/.template/Makefile.arch @@ -0,0 +1,4 @@ +#********************************************************************************************************* +# include architecture related Makefile +#********************************************************************************************************* +include Makefile.$(SylixOS_Arch) diff --git a/.template/config.mk b/.template/config.mk new file mode 100644 index 0000000..ebc46ca --- /dev/null +++ b/.template/config.mk @@ -0,0 +1,41 @@ +#********************************************************************************************************* +# +# 中国软件开源组织 +# +# 嵌入式实时操作系统 +# +# 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 080cb31..4fdfaf0 100644 --- a/Makefile +++ b/Makefile @@ -1,354 +1,4 @@ #********************************************************************************************************* -# curl Makefile -# target -> libcurl.a -# libcurl.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 RealCoder 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)) - -#********************************************************************************************************* -# configure area you can set the following config to you own system -# FPUFLAGS (-mfloat-abi=softfp -mfpu=vfpv3 ...) -# CPUFLAGS (-mcpu=arm920t ...) -# NOTICE: libsylixos, BSP and other kernel modules projects CAN NOT use vfp! -#********************************************************************************************************* -FPUFLAGS = -CPUFLAGS = -mcpu=arm920t $(FPUFLAGS) - -#********************************************************************************************************* -# 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_BASE = curl-7.40.0 - -SRCS = \ -$(SRCS_BASE)/lib/select.c \ -$(SRCS_BASE)/lib/curl_memrchr.c \ -$(SRCS_BASE)/lib/parsedate.c \ -$(SRCS_BASE)/lib/rawstr.c \ -$(SRCS_BASE)/lib/escape.c \ -$(SRCS_BASE)/lib/curl_sasl.c \ -$(SRCS_BASE)/lib/base64.c \ -$(SRCS_BASE)/lib/ftp.c \ -$(SRCS_BASE)/lib/timeval.c \ -$(SRCS_BASE)/lib/http.c \ -$(SRCS_BASE)/lib/hostip4.c \ -$(SRCS_BASE)/lib/strdup.c \ -$(SRCS_BASE)/lib/conncache.c \ -$(SRCS_BASE)/lib/http2.c \ -$(SRCS_BASE)/lib/dotdot.c \ -$(SRCS_BASE)/lib/easy.c \ -$(SRCS_BASE)/lib/inet_ntop.c \ -$(SRCS_BASE)/lib/curl_sspi.c \ -$(SRCS_BASE)/lib/vtls/gtls.c \ -$(SRCS_BASE)/lib/vtls/openssl.c \ -$(SRCS_BASE)/lib/vtls/polarssl.c \ -$(SRCS_BASE)/lib/vtls/vtls.c \ -$(SRCS_BASE)/lib/vtls/polarssl_threadlock.c \ -$(SRCS_BASE)/lib/vtls/curl_schannel.c \ -$(SRCS_BASE)/lib/vtls/cyassl.c \ -$(SRCS_BASE)/lib/vtls/nss.c \ -$(SRCS_BASE)/lib/vtls/axtls.c \ -$(SRCS_BASE)/lib/vtls/gskit.c \ -$(SRCS_BASE)/lib/vtls/curl_darwinssl.c \ -$(SRCS_BASE)/lib/http_proxy.c \ -$(SRCS_BASE)/lib/progress.c \ -$(SRCS_BASE)/lib/hostcheck.c \ -$(SRCS_BASE)/lib/gopher.c \ -$(SRCS_BASE)/lib/mprintf.c \ -$(SRCS_BASE)/lib/http_negotiate.c \ -$(SRCS_BASE)/lib/x509asn1.c \ -$(SRCS_BASE)/lib/telnet.c \ -$(SRCS_BASE)/lib/curl_ntlm.c \ -$(SRCS_BASE)/lib/ssh.c \ -$(SRCS_BASE)/lib/multi.c \ -$(SRCS_BASE)/lib/getinfo.c \ -$(SRCS_BASE)/lib/hostasyn.c \ -$(SRCS_BASE)/lib/if2ip.c \ -$(SRCS_BASE)/lib/rtsp.c \ -$(SRCS_BASE)/lib/openldap.c \ -$(SRCS_BASE)/lib/hostsyn.c \ -$(SRCS_BASE)/lib/idn_win32.c \ -$(SRCS_BASE)/lib/strtoofft.c \ -$(SRCS_BASE)/lib/strtok.c \ -$(SRCS_BASE)/lib/version.c \ -$(SRCS_BASE)/lib/curl_sasl_sspi.c \ -$(SRCS_BASE)/lib/curl_sasl_gssapi.c \ -$(SRCS_BASE)/lib/dict.c \ -$(SRCS_BASE)/lib/imap.c \ -$(SRCS_BASE)/lib/curl_threads.c \ -$(SRCS_BASE)/lib/url.c \ -$(SRCS_BASE)/lib/bundles.c \ -$(SRCS_BASE)/lib/hostip6.c \ -$(SRCS_BASE)/lib/memdebug.c \ -$(SRCS_BASE)/lib/pipeline.c \ -$(SRCS_BASE)/lib/md5.c \ -$(SRCS_BASE)/lib/sendf.c \ -$(SRCS_BASE)/lib/getenv.c \ -$(SRCS_BASE)/lib/pop3.c \ -$(SRCS_BASE)/lib/curl_ntlm_wb.c \ -$(SRCS_BASE)/lib/connect.c \ -$(SRCS_BASE)/lib/hash.c \ -$(SRCS_BASE)/lib/nwlib.c \ -$(SRCS_BASE)/lib/krb5.c \ -$(SRCS_BASE)/lib/splay.c \ -$(SRCS_BASE)/lib/smb.c \ -$(SRCS_BASE)/lib/curl_ntlm_msgs.c \ -$(SRCS_BASE)/lib/socks_gssapi.c \ -$(SRCS_BASE)/lib/socks.c \ -$(SRCS_BASE)/lib/share.c \ -$(SRCS_BASE)/lib/curl_endian.c \ -$(SRCS_BASE)/lib/netrc.c \ -$(SRCS_BASE)/lib/smtp.c \ -$(SRCS_BASE)/lib/curl_fnmatch.c \ -$(SRCS_BASE)/lib/curl_gssapi.c \ -$(SRCS_BASE)/lib/slist.c \ -$(SRCS_BASE)/lib/nonblock.c \ -$(SRCS_BASE)/lib/md4.c \ -$(SRCS_BASE)/lib/hmac.c \ -$(SRCS_BASE)/lib/asyn-ares.c \ -$(SRCS_BASE)/lib/amigaos.c \ -$(SRCS_BASE)/lib/curl_addrinfo.c \ -$(SRCS_BASE)/lib/warnless.c \ -$(SRCS_BASE)/lib/wildcard.c \ -$(SRCS_BASE)/lib/asyn-thread.c \ -$(SRCS_BASE)/lib/curl_gethostname.c \ -$(SRCS_BASE)/lib/tftp.c \ -$(SRCS_BASE)/lib/strerror.c \ -$(SRCS_BASE)/lib/ldap.c \ -$(SRCS_BASE)/lib/security.c \ -$(SRCS_BASE)/lib/transfer.c \ -$(SRCS_BASE)/lib/curl_ntlm_core.c \ -$(SRCS_BASE)/lib/pingpong.c \ -$(SRCS_BASE)/lib/socks_sspi.c \ -$(SRCS_BASE)/lib/fileinfo.c \ -$(SRCS_BASE)/lib/curl_rtmp.c \ -$(SRCS_BASE)/lib/curl_multibyte.c \ -$(SRCS_BASE)/lib/strequal.c \ -$(SRCS_BASE)/lib/llist.c \ -$(SRCS_BASE)/lib/inet_pton.c \ -$(SRCS_BASE)/lib/cookie.c \ -$(SRCS_BASE)/lib/http_negotiate_sspi.c \ -$(SRCS_BASE)/lib/content_encoding.c \ -$(SRCS_BASE)/lib/ftplistparser.c \ -$(SRCS_BASE)/lib/file.c \ -$(SRCS_BASE)/lib/hostip.c \ -$(SRCS_BASE)/lib/speedcheck.c \ -$(SRCS_BASE)/lib/formdata.c \ -$(SRCS_BASE)/lib/non-ascii.c \ -$(SRCS_BASE)/lib/http_digest.c \ -$(SRCS_BASE)/lib/http_chunks.c \ -$(SRCS_BASE)/lib/nwos.c \ - -#********************************************************************************************************* -# build path -#********************************************************************************************************* -ifeq ($(DEBUG_LEVEL), debug) -OUTDIR = Debug -else -OUTDIR = Release -endif - -OUTPATH = ./$(OUTDIR) -OBJPATH = $(OUTPATH)/obj -DEPPATH = $(OUTPATH)/dep - -#********************************************************************************************************* -# target -#********************************************************************************************************* -LIB = $(OUTPATH)/libcurl.a -DLL = $(OUTPATH)/libcurl.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"$(SYLIXOS_BASE_PATH)/libcextern/libcextern/include/" - -INCDIR += -I"$(SRCS_BASE)/include/" -INCDIR += -I"$(SRCS_BASE)/lib/vtls" -INCDIR += -I"$(SRCS_BASE)/lib" - -INCDIR += -I"../openssl/include" - -#********************************************************************************************************* -# compiler preprocess -#********************************************************************************************************* -DSYMBOL = -DSYLIXOS -DSYMBOL += -DSYLIXOS_LIB -DSYMBOL += -DHAVE_CONFIG_H -DBUILDING_LIBCURL -DCURL_HIDDEN_SYMBOLS - -#********************************************************************************************************* -# depend dynamic library -#********************************************************************************************************* -DEPEND_DLL = -lcrypto -lssl -lcextern - -#********************************************************************************************************* -# depend dynamic library search path -#********************************************************************************************************* -DEPEND_DLL_PATH = -L"$(SYLIXOS_BASE_PATH)/libcextern/$(OUTDIR)" -DEPEND_DLL_PATH += -L"../openssl/lib" - -#********************************************************************************************************* -# 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 libcurl.a object files -#********************************************************************************************************* -$(LIB): $(OBJS) - $(AR) $(ARFLAGS) $(LIB) $(OBJS) - -#********************************************************************************************************* -# link libcurl.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 +# include architecture related Makefile #********************************************************************************************************* +include Makefile.arm diff --git a/Makefile.arm b/Makefile.arm new file mode 100644 index 0000000..49f44d0 --- /dev/null +++ b/Makefile.arm @@ -0,0 +1,345 @@ +#********************************************************************************************************* +# curl Makefile +# target -> libcurl.a +# libcurl.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_BASE = curl-7.40.0 + +SRCS = \ +$(SRCS_BASE)/lib/select.c \ +$(SRCS_BASE)/lib/curl_memrchr.c \ +$(SRCS_BASE)/lib/parsedate.c \ +$(SRCS_BASE)/lib/rawstr.c \ +$(SRCS_BASE)/lib/escape.c \ +$(SRCS_BASE)/lib/curl_sasl.c \ +$(SRCS_BASE)/lib/base64.c \ +$(SRCS_BASE)/lib/ftp.c \ +$(SRCS_BASE)/lib/timeval.c \ +$(SRCS_BASE)/lib/http.c \ +$(SRCS_BASE)/lib/hostip4.c \ +$(SRCS_BASE)/lib/strdup.c \ +$(SRCS_BASE)/lib/conncache.c \ +$(SRCS_BASE)/lib/http2.c \ +$(SRCS_BASE)/lib/dotdot.c \ +$(SRCS_BASE)/lib/easy.c \ +$(SRCS_BASE)/lib/inet_ntop.c \ +$(SRCS_BASE)/lib/curl_sspi.c \ +$(SRCS_BASE)/lib/vtls/gtls.c \ +$(SRCS_BASE)/lib/vtls/openssl.c \ +$(SRCS_BASE)/lib/vtls/polarssl.c \ +$(SRCS_BASE)/lib/vtls/vtls.c \ +$(SRCS_BASE)/lib/vtls/polarssl_threadlock.c \ +$(SRCS_BASE)/lib/vtls/curl_schannel.c \ +$(SRCS_BASE)/lib/vtls/cyassl.c \ +$(SRCS_BASE)/lib/vtls/nss.c \ +$(SRCS_BASE)/lib/vtls/axtls.c \ +$(SRCS_BASE)/lib/vtls/gskit.c \ +$(SRCS_BASE)/lib/vtls/curl_darwinssl.c \ +$(SRCS_BASE)/lib/http_proxy.c \ +$(SRCS_BASE)/lib/progress.c \ +$(SRCS_BASE)/lib/hostcheck.c \ +$(SRCS_BASE)/lib/gopher.c \ +$(SRCS_BASE)/lib/mprintf.c \ +$(SRCS_BASE)/lib/http_negotiate.c \ +$(SRCS_BASE)/lib/x509asn1.c \ +$(SRCS_BASE)/lib/telnet.c \ +$(SRCS_BASE)/lib/curl_ntlm.c \ +$(SRCS_BASE)/lib/ssh.c \ +$(SRCS_BASE)/lib/multi.c \ +$(SRCS_BASE)/lib/getinfo.c \ +$(SRCS_BASE)/lib/hostasyn.c \ +$(SRCS_BASE)/lib/if2ip.c \ +$(SRCS_BASE)/lib/rtsp.c \ +$(SRCS_BASE)/lib/openldap.c \ +$(SRCS_BASE)/lib/hostsyn.c \ +$(SRCS_BASE)/lib/idn_win32.c \ +$(SRCS_BASE)/lib/strtoofft.c \ +$(SRCS_BASE)/lib/strtok.c \ +$(SRCS_BASE)/lib/version.c \ +$(SRCS_BASE)/lib/curl_sasl_sspi.c \ +$(SRCS_BASE)/lib/curl_sasl_gssapi.c \ +$(SRCS_BASE)/lib/dict.c \ +$(SRCS_BASE)/lib/imap.c \ +$(SRCS_BASE)/lib/curl_threads.c \ +$(SRCS_BASE)/lib/url.c \ +$(SRCS_BASE)/lib/bundles.c \ +$(SRCS_BASE)/lib/hostip6.c \ +$(SRCS_BASE)/lib/memdebug.c \ +$(SRCS_BASE)/lib/pipeline.c \ +$(SRCS_BASE)/lib/md5.c \ +$(SRCS_BASE)/lib/sendf.c \ +$(SRCS_BASE)/lib/getenv.c \ +$(SRCS_BASE)/lib/pop3.c \ +$(SRCS_BASE)/lib/curl_ntlm_wb.c \ +$(SRCS_BASE)/lib/connect.c \ +$(SRCS_BASE)/lib/hash.c \ +$(SRCS_BASE)/lib/nwlib.c \ +$(SRCS_BASE)/lib/krb5.c \ +$(SRCS_BASE)/lib/splay.c \ +$(SRCS_BASE)/lib/smb.c \ +$(SRCS_BASE)/lib/curl_ntlm_msgs.c \ +$(SRCS_BASE)/lib/socks_gssapi.c \ +$(SRCS_BASE)/lib/socks.c \ +$(SRCS_BASE)/lib/share.c \ +$(SRCS_BASE)/lib/curl_endian.c \ +$(SRCS_BASE)/lib/netrc.c \ +$(SRCS_BASE)/lib/smtp.c \ +$(SRCS_BASE)/lib/curl_fnmatch.c \ +$(SRCS_BASE)/lib/curl_gssapi.c \ +$(SRCS_BASE)/lib/slist.c \ +$(SRCS_BASE)/lib/nonblock.c \ +$(SRCS_BASE)/lib/md4.c \ +$(SRCS_BASE)/lib/hmac.c \ +$(SRCS_BASE)/lib/asyn-ares.c \ +$(SRCS_BASE)/lib/amigaos.c \ +$(SRCS_BASE)/lib/curl_addrinfo.c \ +$(SRCS_BASE)/lib/warnless.c \ +$(SRCS_BASE)/lib/wildcard.c \ +$(SRCS_BASE)/lib/asyn-thread.c \ +$(SRCS_BASE)/lib/curl_gethostname.c \ +$(SRCS_BASE)/lib/tftp.c \ +$(SRCS_BASE)/lib/strerror.c \ +$(SRCS_BASE)/lib/ldap.c \ +$(SRCS_BASE)/lib/security.c \ +$(SRCS_BASE)/lib/transfer.c \ +$(SRCS_BASE)/lib/curl_ntlm_core.c \ +$(SRCS_BASE)/lib/pingpong.c \ +$(SRCS_BASE)/lib/socks_sspi.c \ +$(SRCS_BASE)/lib/fileinfo.c \ +$(SRCS_BASE)/lib/curl_rtmp.c \ +$(SRCS_BASE)/lib/curl_multibyte.c \ +$(SRCS_BASE)/lib/strequal.c \ +$(SRCS_BASE)/lib/llist.c \ +$(SRCS_BASE)/lib/inet_pton.c \ +$(SRCS_BASE)/lib/cookie.c \ +$(SRCS_BASE)/lib/http_negotiate_sspi.c \ +$(SRCS_BASE)/lib/content_encoding.c \ +$(SRCS_BASE)/lib/ftplistparser.c \ +$(SRCS_BASE)/lib/file.c \ +$(SRCS_BASE)/lib/hostip.c \ +$(SRCS_BASE)/lib/speedcheck.c \ +$(SRCS_BASE)/lib/formdata.c \ +$(SRCS_BASE)/lib/non-ascii.c \ +$(SRCS_BASE)/lib/http_digest.c \ +$(SRCS_BASE)/lib/http_chunks.c \ +$(SRCS_BASE)/lib/nwos.c \ + +#********************************************************************************************************* +# build path +#********************************************************************************************************* +ifeq ($(DEBUG_LEVEL), debug) +OUTDIR = Debug +else +OUTDIR = Release +endif + +OUTPATH = ./$(OUTDIR) +OBJPATH = $(OUTPATH)/obj +DEPPATH = $(OUTPATH)/dep + +#********************************************************************************************************* +# target +#********************************************************************************************************* +LIB = $(OUTPATH)/libcurl.a +DLL = $(OUTPATH)/libcurl.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"$(SYLIXOS_BASE_PATH)/libcextern/libcextern/include/" + +INCDIR += -I"$(SRCS_BASE)/include/" +INCDIR += -I"$(SRCS_BASE)/lib/vtls" +INCDIR += -I"$(SRCS_BASE)/lib" + +INCDIR += -I"../openssl/include" + +#********************************************************************************************************* +# compiler preprocess +#********************************************************************************************************* +DSYMBOL = -DSYLIXOS +DSYMBOL += -DSYLIXOS_LIB +DSYMBOL += -DHAVE_CONFIG_H -DBUILDING_LIBCURL -DCURL_HIDDEN_SYMBOLS + +#********************************************************************************************************* +# depend dynamic library +#********************************************************************************************************* +DEPEND_DLL = -lcrypto -lssl -lcextern + +#********************************************************************************************************* +# depend dynamic library search path +#********************************************************************************************************* +DEPEND_DLL_PATH = -L"$(SYLIXOS_BASE_PATH)/libcextern/$(OUTDIR)" +DEPEND_DLL_PATH += -L"../openssl/lib" + +#********************************************************************************************************* +# 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 libcurl.a object files +#********************************************************************************************************* +$(LIB): $(OBJS) + $(AR) $(ARFLAGS) $(LIB) $(OBJS) + +#********************************************************************************************************* +# link libcurl.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 new file mode 100644 index 0000000..8037c52 --- /dev/null +++ b/Makefile.mips @@ -0,0 +1,345 @@ +#********************************************************************************************************* +# curl Makefile +# target -> libcurl.a +# libcurl.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_BASE = curl-7.40.0 + +SRCS = \ +$(SRCS_BASE)/lib/select.c \ +$(SRCS_BASE)/lib/curl_memrchr.c \ +$(SRCS_BASE)/lib/parsedate.c \ +$(SRCS_BASE)/lib/rawstr.c \ +$(SRCS_BASE)/lib/escape.c \ +$(SRCS_BASE)/lib/curl_sasl.c \ +$(SRCS_BASE)/lib/base64.c \ +$(SRCS_BASE)/lib/ftp.c \ +$(SRCS_BASE)/lib/timeval.c \ +$(SRCS_BASE)/lib/http.c \ +$(SRCS_BASE)/lib/hostip4.c \ +$(SRCS_BASE)/lib/strdup.c \ +$(SRCS_BASE)/lib/conncache.c \ +$(SRCS_BASE)/lib/http2.c \ +$(SRCS_BASE)/lib/dotdot.c \ +$(SRCS_BASE)/lib/easy.c \ +$(SRCS_BASE)/lib/inet_ntop.c \ +$(SRCS_BASE)/lib/curl_sspi.c \ +$(SRCS_BASE)/lib/vtls/gtls.c \ +$(SRCS_BASE)/lib/vtls/openssl.c \ +$(SRCS_BASE)/lib/vtls/polarssl.c \ +$(SRCS_BASE)/lib/vtls/vtls.c \ +$(SRCS_BASE)/lib/vtls/polarssl_threadlock.c \ +$(SRCS_BASE)/lib/vtls/curl_schannel.c \ +$(SRCS_BASE)/lib/vtls/cyassl.c \ +$(SRCS_BASE)/lib/vtls/nss.c \ +$(SRCS_BASE)/lib/vtls/axtls.c \ +$(SRCS_BASE)/lib/vtls/gskit.c \ +$(SRCS_BASE)/lib/vtls/curl_darwinssl.c \ +$(SRCS_BASE)/lib/http_proxy.c \ +$(SRCS_BASE)/lib/progress.c \ +$(SRCS_BASE)/lib/hostcheck.c \ +$(SRCS_BASE)/lib/gopher.c \ +$(SRCS_BASE)/lib/mprintf.c \ +$(SRCS_BASE)/lib/http_negotiate.c \ +$(SRCS_BASE)/lib/x509asn1.c \ +$(SRCS_BASE)/lib/telnet.c \ +$(SRCS_BASE)/lib/curl_ntlm.c \ +$(SRCS_BASE)/lib/ssh.c \ +$(SRCS_BASE)/lib/multi.c \ +$(SRCS_BASE)/lib/getinfo.c \ +$(SRCS_BASE)/lib/hostasyn.c \ +$(SRCS_BASE)/lib/if2ip.c \ +$(SRCS_BASE)/lib/rtsp.c \ +$(SRCS_BASE)/lib/openldap.c \ +$(SRCS_BASE)/lib/hostsyn.c \ +$(SRCS_BASE)/lib/idn_win32.c \ +$(SRCS_BASE)/lib/strtoofft.c \ +$(SRCS_BASE)/lib/strtok.c \ +$(SRCS_BASE)/lib/version.c \ +$(SRCS_BASE)/lib/curl_sasl_sspi.c \ +$(SRCS_BASE)/lib/curl_sasl_gssapi.c \ +$(SRCS_BASE)/lib/dict.c \ +$(SRCS_BASE)/lib/imap.c \ +$(SRCS_BASE)/lib/curl_threads.c \ +$(SRCS_BASE)/lib/url.c \ +$(SRCS_BASE)/lib/bundles.c \ +$(SRCS_BASE)/lib/hostip6.c \ +$(SRCS_BASE)/lib/memdebug.c \ +$(SRCS_BASE)/lib/pipeline.c \ +$(SRCS_BASE)/lib/md5.c \ +$(SRCS_BASE)/lib/sendf.c \ +$(SRCS_BASE)/lib/getenv.c \ +$(SRCS_BASE)/lib/pop3.c \ +$(SRCS_BASE)/lib/curl_ntlm_wb.c \ +$(SRCS_BASE)/lib/connect.c \ +$(SRCS_BASE)/lib/hash.c \ +$(SRCS_BASE)/lib/nwlib.c \ +$(SRCS_BASE)/lib/krb5.c \ +$(SRCS_BASE)/lib/splay.c \ +$(SRCS_BASE)/lib/smb.c \ +$(SRCS_BASE)/lib/curl_ntlm_msgs.c \ +$(SRCS_BASE)/lib/socks_gssapi.c \ +$(SRCS_BASE)/lib/socks.c \ +$(SRCS_BASE)/lib/share.c \ +$(SRCS_BASE)/lib/curl_endian.c \ +$(SRCS_BASE)/lib/netrc.c \ +$(SRCS_BASE)/lib/smtp.c \ +$(SRCS_BASE)/lib/curl_fnmatch.c \ +$(SRCS_BASE)/lib/curl_gssapi.c \ +$(SRCS_BASE)/lib/slist.c \ +$(SRCS_BASE)/lib/nonblock.c \ +$(SRCS_BASE)/lib/md4.c \ +$(SRCS_BASE)/lib/hmac.c \ +$(SRCS_BASE)/lib/asyn-ares.c \ +$(SRCS_BASE)/lib/amigaos.c \ +$(SRCS_BASE)/lib/curl_addrinfo.c \ +$(SRCS_BASE)/lib/warnless.c \ +$(SRCS_BASE)/lib/wildcard.c \ +$(SRCS_BASE)/lib/asyn-thread.c \ +$(SRCS_BASE)/lib/curl_gethostname.c \ +$(SRCS_BASE)/lib/tftp.c \ +$(SRCS_BASE)/lib/strerror.c \ +$(SRCS_BASE)/lib/ldap.c \ +$(SRCS_BASE)/lib/security.c \ +$(SRCS_BASE)/lib/transfer.c \ +$(SRCS_BASE)/lib/curl_ntlm_core.c \ +$(SRCS_BASE)/lib/pingpong.c \ +$(SRCS_BASE)/lib/socks_sspi.c \ +$(SRCS_BASE)/lib/fileinfo.c \ +$(SRCS_BASE)/lib/curl_rtmp.c \ +$(SRCS_BASE)/lib/curl_multibyte.c \ +$(SRCS_BASE)/lib/strequal.c \ +$(SRCS_BASE)/lib/llist.c \ +$(SRCS_BASE)/lib/inet_pton.c \ +$(SRCS_BASE)/lib/cookie.c \ +$(SRCS_BASE)/lib/http_negotiate_sspi.c \ +$(SRCS_BASE)/lib/content_encoding.c \ +$(SRCS_BASE)/lib/ftplistparser.c \ +$(SRCS_BASE)/lib/file.c \ +$(SRCS_BASE)/lib/hostip.c \ +$(SRCS_BASE)/lib/speedcheck.c \ +$(SRCS_BASE)/lib/formdata.c \ +$(SRCS_BASE)/lib/non-ascii.c \ +$(SRCS_BASE)/lib/http_digest.c \ +$(SRCS_BASE)/lib/http_chunks.c \ +$(SRCS_BASE)/lib/nwos.c \ + +#********************************************************************************************************* +# build path +#********************************************************************************************************* +ifeq ($(DEBUG_LEVEL), debug) +OUTDIR = Debug +else +OUTDIR = Release +endif + +OUTPATH = ./$(OUTDIR) +OBJPATH = $(OUTPATH)/obj +DEPPATH = $(OUTPATH)/dep + +#********************************************************************************************************* +# target +#********************************************************************************************************* +LIB = $(OUTPATH)/libcurl.a +DLL = $(OUTPATH)/libcurl.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"$(SYLIXOS_BASE_PATH)/libcextern/libcextern/include/" + +INCDIR += -I"$(SRCS_BASE)/include/" +INCDIR += -I"$(SRCS_BASE)/lib/vtls" +INCDIR += -I"$(SRCS_BASE)/lib" + +INCDIR += -I"../openssl/include" + +#********************************************************************************************************* +# compiler preprocess +#********************************************************************************************************* +DSYMBOL = -DSYLIXOS +DSYMBOL += -DSYLIXOS_LIB +DSYMBOL += -DHAVE_CONFIG_H -DBUILDING_LIBCURL -DCURL_HIDDEN_SYMBOLS + +#********************************************************************************************************* +# depend dynamic library +#********************************************************************************************************* +DEPEND_DLL = -lcrypto -lssl -lcextern + +#********************************************************************************************************* +# depend dynamic library search path +#********************************************************************************************************* +DEPEND_DLL_PATH = -L"$(SYLIXOS_BASE_PATH)/libcextern/$(OUTDIR)" +DEPEND_DLL_PATH += -L"../openssl/lib" + +#********************************************************************************************************* +# 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 libcurl.a object files +#********************************************************************************************************* +$(LIB): $(OBJS) + $(AR) $(ARFLAGS) $(LIB) $(OBJS) + +#********************************************************************************************************* +# link libcurl.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 new file mode 100644 index 0000000..e69de29 diff --git a/Makefile.x86 b/Makefile.x86 new file mode 100644 index 0000000..e69de29 diff --git a/config.mk b/config.mk index 4fd2261..fa4e82d 100644 --- a/config.mk +++ b/config.mk @@ -12,16 +12,16 @@ # # 文 件 名: config.mk # -# 创 建 人: RealCoder +# 创 建 人: RealEvo-IDE # -# 文件创建日期: 2015 年06 月06 日 +# 文件创建日期: 2016 年02 月27 日 # -# 描 述: 本文件由RealCoder生成,用于配置Makefile功能,请勿手动修改 +# 描 述: 本文件由 RealEvo-IDE 生成,用于配置 Makefile 功能,请勿手动修改 #********************************************************************************************************* #********************************************************************************************************* # SylixOS Base Project path #********************************************************************************************************* -SYLIXOS_BASE_PATH = E:/workspace/sylixos_base +SYLIXOS_BASE_PATH = D:/workspace/sylixos-base #********************************************************************************************************* # Toolchain prefix @@ -31,4 +31,11 @@ TOOLCHAIN_PREFIX = arm-sylixos-eabi- #********************************************************************************************************* # Debug options (debug or release) #********************************************************************************************************* -DEBUG_LEVEL = debug \ No newline at end of file +DEBUG_LEVEL = debug + +#********************************************************************************************************* +# NOTICE: libsylixos, BSP and other kernel modules projects CAN NOT use vfp! +#********************************************************************************************************* +FPUFLAGS = +CPUFLAGS = -mcpu=arm920t $(FPUFLAGS) +