aboutsummaryrefslogtreecommitdiffhomepage
path: root/ext
diff options
context:
space:
mode:
authorJ08nY2024-07-17 16:44:58 +0200
committerJ08nY2024-07-17 16:44:58 +0200
commitfd61cf7b86f2b7c61de7794b616c80c23f0ca364 (patch)
tree5fac4e3f630a43728d7f0248d0f81f116bf31f04 /ext
parentbccdd6404dfb2a1f87656f1a47bf242ac87c8825 (diff)
downloadpyecsca-codegen-fd61cf7b86f2b7c61de7794b616c80c23f0ca364.tar.gz
pyecsca-codegen-fd61cf7b86f2b7c61de7794b616c80c23f0ca364.tar.zst
pyecsca-codegen-fd61cf7b86f2b7c61de7794b616c80c23f0ca364.zip
Bump to 0.3.2.
Diffstat (limited to 'ext')
-rw-r--r--ext/Makefile14
1 files changed, 8 insertions, 6 deletions
diff --git a/ext/Makefile b/ext/Makefile
index ffd53d5..9af9657 100644
--- a/ext/Makefile
+++ b/ext/Makefile
@@ -8,11 +8,13 @@ help:
clean:
$(MAKE) -C libtommath clean
+TOMMATH_DIR?=../pyecsca/codegen/tommath
+
tommath_dir:
- mkdir -p ../pyecsca/codegen/tommath
+ mkdir -p $(TOMMATH_DIR)
tommath_headers: tommath_dir
- cp libtommath/*.h ../pyecsca/codegen/tommath/
+ cp -u libtommath/*.h $(TOMMATH_DIR)
host: LIBNAME=libtommath-HOST.a
host: CFLAGS=-DMP_NO_DEV_URANDOM -DMP_LOW_MEM -DMP_DEFAULT_DIGIT_COUNT=10 -DMP_MIN_DIGIT_COUNT=10
@@ -21,7 +23,7 @@ host: COMPILE_LTO=1
host: tommath_dir tommath_headers
$(MAKE) -C libtommath clean
$(MAKE) -C libtommath
- cp libtommath/$(LIBNAME) ../pyecsca/codegen/tommath/$(LIBNAME)
+ cp -u libtommath/$(LIBNAME) $(TOMMATH_DIR)/$(LIBNAME)
nano: CROSS_COMPILE=arm-none-eabi-
nano: CFLAGS=-mcpu=cortex-m0 -mthumb -mfloat-abi=soft -ffunction-sections -DMP_NO_DEV_URANDOM -DMP_32BIT -DMP_LOW_MEM -DMP_DEFAULT_DIGIT_COUNT=10 -DMP_MIN_DIGIT_COUNT=10
@@ -32,7 +34,7 @@ nano: LIBNAME=libtommath-CWNANO.a
nano: tommath_dir tommath_headers
$(MAKE) -C libtommath clean
$(MAKE) -C libtommath
- cp libtommath/$(LIBNAME) ../pyecsca/codegen/tommath/$(LIBNAME)
+ cp -u libtommath/$(LIBNAME) $(TOMMATH_DIR)/$(LIBNAME)
stm32f0: CROSS_COMPILE=arm-none-eabi-
stm32f0: CFLAGS=-mcpu=cortex-m0 -mthumb -mfloat-abi=soft -ffunction-sections -DMP_NO_DEV_URANDOM -DMP_32BIT -DMP_LOW_MEM -DMP_DEFAULT_DIGIT_COUNT=10 -DMP_MIN_DIGIT_COUNT=10
@@ -43,7 +45,7 @@ stm32f0: LIBNAME=libtommath-CW308_STM32F0.a
stm32f0: tommath_dir tommath_headers
$(MAKE) -C libtommath clean
$(MAKE) -C libtommath
- cp libtommath/$(LIBNAME) ../pyecsca/codegen/tommath/$(LIBNAME)
+ cp -u libtommath/$(LIBNAME) $(TOMMATH_DIR)/$(LIBNAME)
stm32f3: CROSS_COMPILE=arm-none-eabi-
stm32f3: CFLAGS=-mcpu=cortex-m4 -mthumb -mfloat-abi=soft -mfpu=fpv4-sp-d16 -fmessage-length=0 -ffunction-sections -DMP_NO_DEV_URANDOM -DMP_32BIT -DMP_LOW_MEM -DMP_DEFAULT_DIGIT_COUNT=10 -DMP_MIN_DIGIT_COUNT=10
@@ -54,6 +56,6 @@ stm32f3: LIBNAME=libtommath-CW308_STM32F3.a
stm32f3: tommath_dir tommath_headers
$(MAKE) -C libtommath clean
$(MAKE) -C libtommath
- cp libtommath/$(LIBNAME) ../pyecsca/codegen/tommath/$(LIBNAME)
+ cp -u libtommath/$(LIBNAME) $(TOMMATH_DIR)/$(LIBNAME)
.PHONY: all host nano stm32f0 stm32f3 tommath_dir tommath_headers help clean