diff --git a/components/tommath/Kconfig b/components/tommath/Kconfig new file mode 100644 index 0000000..49353b7 --- /dev/null +++ b/components/tommath/Kconfig @@ -0,0 +1,10 @@ + +menuconfig TOMMATH_ENABLED + bool "Enable libtommath" + default n + + config TOMMATH_DYNAMIC + bool "compile component as dynamic(shared) lib" + default n + depends on TOMMATH_ENABLED + diff --git a/components/tommath/SConstruct b/components/tommath/SConstruct new file mode 100644 index 0000000..41a860d --- /dev/null +++ b/components/tommath/SConstruct @@ -0,0 +1,35 @@ +# component2/SConscript +Import('env') +import os +with open(env['PROJECT_TOOL_S']) as f: + exec(f.read()) + +if 'CONFIG_TOMMATH_ENABLED' in os.environ: + check_component('libtommath') + SRCS=[] + INCLUDE=[] + PRIVATE_INCLUDE=[] + REQUIREMENTS=[] + STATIC_LIB=[] + DYNAMIC_LIB=[] + DEFINITIONS=[] + DEFINITIONS_PRIVATE=['-Wall -Wsign-compare -Wextra -Wshadow -Wdeclaration-after-statement -Wbad-function-cast -Wcast-align -Wstrict-prototypes -Wpointer-arith -Wsystem-headers -O3 -funroll-loops -fomit-frame-pointer'] + LDFLAGS=[] + LINK_SEARCH_PATH=[] + + INCLUDE.append(ADir('../../github_source/libtommath')) + SRCS += AGlob('../../github_source/libtommath/*.c*') + + env['COMPONENTS'].append({'target':os.path.basename(env['component_dir']), + 'SRCS':SRCS, + 'INCLUDE':INCLUDE, + 'PRIVATE_INCLUDE':PRIVATE_INCLUDE, + 'REQUIREMENTS':REQUIREMENTS, + 'STATIC_LIB':STATIC_LIB, + 'DYNAMIC_LIB':DYNAMIC_LIB, + 'DEFINITIONS':DEFINITIONS, + 'DEFINITIONS_PRIVATE':DEFINITIONS_PRIVATE, + 'LDFLAGS':LDFLAGS, + 'LINK_SEARCH_PATH':LINK_SEARCH_PATH, + 'REGISTER':'shared' if 'CONFIG_TOMMATH_DYNAMIC' in os.environ else 'static' + }) diff --git a/github_source/source-list.sh b/github_source/source-list.sh index 9a661e2..68a01eb 100755 --- a/github_source/source-list.sh +++ b/github_source/source-list.sh @@ -37,6 +37,9 @@ git_clone_and_checkout_commit https://github.com/brgl/libgpiod.git 27fe10150f6 git_clone_and_checkout_commit https://github.com/stephane/libmodbus.git 5c14f13944ec7394a61a7680dcb462056c4321e3 git_clone_and_checkout_commit https://github.com/lovyan03/LovyanGFX.git 4fd713ebd3019d17c6c89c6e2f7171d2cafeff23 git_clone_and_checkout_commit https://github.com/Tencent/ncnn.git 5e9bf90455b02a25e7991dab4ab8b3035a4bebb3 +git_clone_and_checkout_commit https://github.com/libtom/libtommath.git 97e500351e653472b2ea00b37137ad0414165efe + + # opencv-mobile-2.4.13.7-armlinux https://github.com/nihui/opencv-mobile/releases/download/v26/opencv-mobile-2.4.13.7-armlinux.zip # git clone -b dd5118cab0813078dbbfd116f1489c6a03a42cae --single-branch --branch master https://github.com/dianjixz/mongoose.git