aboutsummaryrefslogtreecommitdiff
path: root/libraries
diff options
context:
space:
mode:
Diffstat (limited to 'libraries')
m---------libraries/libcli0
-rw-r--r--libraries/libcli/Makefile10
m---------libraries/libhal0
-rw-r--r--libraries/libhal/Makefile10
-rw-r--r--libraries/libhal/tests/Makefile10
-rw-r--r--libraries/libhal/utils/Makefile10
-rw-r--r--libraries/libtfm/Makefile46
-rw-r--r--libraries/libtfm/tomsfastmath/Makefile8
m---------libraries/thirdparty/libtfm0
9 files changed, 94 insertions, 0 deletions
diff --git a/libraries/libcli b/libraries/libcli
deleted file mode 160000
-Subproject 1a5727c568e36b927ef2088b2b02bae4c84933f
diff --git a/libraries/libcli/Makefile b/libraries/libcli/Makefile
new file mode 100644
index 0000000..bbd686d
--- /dev/null
+++ b/libraries/libcli/Makefile
@@ -0,0 +1,10 @@
+ifndef CRYPTECH_ROOT
+ CRYPTECH_ROOT := $(abspath ../../../..)
+endif
+
+REPO := ${CRYPTECH_ROOT}/user/ft/libcli
+
+vpath %.c ${REPO}
+vpath %.h ${REPO}
+
+include ${REPO}/Makefile
diff --git a/libraries/libhal b/libraries/libhal
deleted file mode 160000
-Subproject 60cce0124f2fc3eddca03ed3950da9238247a61
diff --git a/libraries/libhal/Makefile b/libraries/libhal/Makefile
new file mode 100644
index 0000000..fbc3473
--- /dev/null
+++ b/libraries/libhal/Makefile
@@ -0,0 +1,10 @@
+ifndef CRYPTECH_ROOT
+ CRYPTECH_ROOT := $(abspath ../../../..)
+endif
+
+REPO := ${CRYPTECH_ROOT}/sw/libhal
+
+vpath %.c ${REPO}
+vpath %.h ${REPO}
+
+include ${REPO}/Makefile
diff --git a/libraries/libhal/tests/Makefile b/libraries/libhal/tests/Makefile
new file mode 100644
index 0000000..7553427
--- /dev/null
+++ b/libraries/libhal/tests/Makefile
@@ -0,0 +1,10 @@
+ifndef CRYPTECH_ROOT
+ CRYPTECH_ROOT := $(abspath ../../../../..)
+endif
+
+REPO := ${CRYPTECH_ROOT}/sw/libhal
+
+vpath %.c ${REPO}/tests
+vpath %.h ${REPO}/tests
+
+include ${REPO}/tests/Makefile
diff --git a/libraries/libhal/utils/Makefile b/libraries/libhal/utils/Makefile
new file mode 100644
index 0000000..43fbe0d
--- /dev/null
+++ b/libraries/libhal/utils/Makefile
@@ -0,0 +1,10 @@
+ifndef CRYPTECH_ROOT
+ CRYPTECH_ROOT := $(abspath ../../../../..)
+endif
+
+REPO := ${CRYPTECH_ROOT}/sw/libhal
+
+vpath %.c ${REPO}/utils
+vpath %.h ${REPO}/utils
+
+include ${REPO}/utils/Makefile
diff --git a/libraries/libtfm/Makefile b/libraries/libtfm/Makefile
new file mode 100644
index 0000000..4dfcb45
--- /dev/null
+++ b/libraries/libtfm/Makefile
@@ -0,0 +1,46 @@
+
+# This duplicates more of sw/thirdparty/libtfm/Makefile than I
+# would like, but it does the job. Prettier makefiles can wait for another day.
+
+ifndef CRYPTECH_ROOT
+ CRYPTECH_ROOT := $(abspath ../../../..)
+endif
+
+REPO := ${CRYPTECH_ROOT}/sw/thirdparty/libtfm
+
+# vpath %.c ${REPO}
+# vpath %.h ${REPO}
+
+BITS := 8192
+
+HDR := ${REPO}/tomsfastmath/src/headers/tfm.h
+LIB := tomsfastmath/libtfm.a
+
+#CFLAGS += -DTFM_X86
+#CFLAGS += -DTFM_NO_ASM
+
+CFLAGS += -fPIC -Wall -W -Wshadow -I${REPO}/tomsfastmath/src/headers -g3 -DFP_MAX_SIZE="(${BITS}*2+(8*DIGIT_BIT))"
+
+TARGETS := $(notdir ${HDR} ${LIB})
+
+all: ${TARGETS}
+
+clean:
+ rm -rf ${TARGETS} $(notdir ${HDR}.tmp) ${LIB} tomsfastmath/src
+
+distclean: clean
+ rm -f TAGS
+
+$(notdir ${HDR}): ${HDR}
+ echo >$@.tmp '/* Configure size of largest bignum we want to handle -- see notes in tfm.pdf */'
+ echo >>$@.tmp '#define FP_MAX_SIZE (${BITS}*2+(8*DIGIT_BIT))'
+ echo >>$@.tmp ''
+ cat >>$@.tmp $^
+ mv -f $@.tmp $@
+
+$(notdir ${LIB}): ${LIB}
+ ln -f $^ $@
+
+${LIB}: ${HDR}
+ (cd ${REPO} && find tomsfastmath/src -type d) | xargs mkdir -p
+ cd tomsfastmath; ${MAKE} CFLAGS='${CFLAGS}'
diff --git a/libraries/libtfm/tomsfastmath/Makefile b/libraries/libtfm/tomsfastmath/Makefile
new file mode 100644
index 0000000..7141763
--- /dev/null
+++ b/libraries/libtfm/tomsfastmath/Makefile
@@ -0,0 +1,8 @@
+ifndef CRYPTECH_ROOT
+ CRYPTECH_ROOT := $(abspath ../../../../..)
+endif
+
+vpath %.c ${CRYPTECH_ROOT}/sw/thirdparty/libtfm/tomsfastmath
+vpath %.h ${CRYPTECH_ROOT}/sw/thirdparty/libtfm/tomsfastmath
+
+include ${CRYPTECH_ROOT}/sw/thirdparty/libtfm/tomsfastmath/makefile
diff --git a/libraries/thirdparty/libtfm b/libraries/thirdparty/libtfm
deleted file mode 160000
-Subproject e2eab1093a134e5a655d1ccad23a31b2b8252c6