aboutsummaryrefslogtreecommitdiff
path: root/libraries/libtfm
diff options
context:
space:
mode:
authorPaul Selkirk <paul@psgd.org>2016-07-06 14:46:26 -0400
committerPaul Selkirk <paul@psgd.org>2016-07-06 14:46:26 -0400
commit2864813c35d2ce295468775b6091bda9ef2245a1 (patch)
tree58799f4899317ab994d77535546e8a7d56c2dee0 /libraries/libtfm
parent833802c921a53d1ee6a71049943edaebd1466d1b (diff)
Simplify library Makefiles by using symbols defined in top-level Makefile, rather than re-deriving them.
Diffstat (limited to 'libraries/libtfm')
-rw-r--r--libraries/libtfm/Makefile16
-rw-r--r--libraries/libtfm/tomsfastmath/Makefile10
2 files changed, 8 insertions, 18 deletions
diff --git a/libraries/libtfm/Makefile b/libraries/libtfm/Makefile
index 4dfcb45..6da552d 100644
--- a/libraries/libtfm/Makefile
+++ b/libraries/libtfm/Makefile
@@ -2,24 +2,18 @@
# 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}
+# vpath %.c ${LIBTFM_SRC}
+# vpath %.h ${LIBTFM_SRC}
BITS := 8192
-HDR := ${REPO}/tomsfastmath/src/headers/tfm.h
+HDR := ${LIBTFM_SRC}/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))"
+CFLAGS += -fPIC -Wall -W -Wshadow -I${LIBTFM_SRC}/tomsfastmath/src/headers -g3 -DFP_MAX_SIZE="(${BITS}*2+(8*DIGIT_BIT))"
TARGETS := $(notdir ${HDR} ${LIB})
@@ -42,5 +36,5 @@ $(notdir ${LIB}): ${LIB}
ln -f $^ $@
${LIB}: ${HDR}
- (cd ${REPO} && find tomsfastmath/src -type d) | xargs mkdir -p
+ (cd ${LIBTFM_SRC} && 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
index 7141763..695aa92 100644
--- a/libraries/libtfm/tomsfastmath/Makefile
+++ b/libraries/libtfm/tomsfastmath/Makefile
@@ -1,8 +1,4 @@
-ifndef CRYPTECH_ROOT
- CRYPTECH_ROOT := $(abspath ../../../../..)
-endif
+vpath %.c ${LIBTFM_SRC}/tomsfastmath
+vpath %.h ${LIBTFM_SRC}/tomsfastmath
-vpath %.c ${CRYPTECH_ROOT}/sw/thirdparty/libtfm/tomsfastmath
-vpath %.h ${CRYPTECH_ROOT}/sw/thirdparty/libtfm/tomsfastmath
-
-include ${CRYPTECH_ROOT}/sw/thirdparty/libtfm/tomsfastmath/makefile
+include ${LIBTFM_SRC}/tomsfastmath/makefile