aboutsummaryrefslogtreecommitdiff
path: root/GNUmakefile
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2015-07-07 12:44:12 -0400
committerRob Austein <sra@hactrn.net>2015-07-07 12:44:12 -0400
commiteb05d765f4142aee3e17957daa35d9bd1cc2a1c0 (patch)
treeed59be85a45582015d7d993e34d178cb95504d18 /GNUmakefile
parent108e78987bc39f11d0abbba7dbfe80704cbf0282 (diff)
Use a git submodule to hold upstream source instead of home-grown hack.
Diffstat (limited to 'GNUmakefile')
-rw-r--r--GNUmakefile17
1 files changed, 5 insertions, 12 deletions
diff --git a/GNUmakefile b/GNUmakefile
index be66adb..c2f02dd 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -1,18 +1,11 @@
-# Download and build libtfm from source with the options we want.
-
-# Commit against which we've been testing. Perhaps we should be using
-# a git subrepository instead of this hack?
-
-URL := https://github.com/libtom/tomsfastmath.git
-COMMIT := e0fe602802e376a971a84ba300ad0aab17165600
+# Use a git submodule to download and build libtfm with the options we want.
# Maximum size of a bignum. See tfm.pdf section 1.3.6 ("Precision
# configuration") for details on how FP_MAX_SIZE works.
BITS := 8192
-
-REPO := $(notdir $(basename ${URL}))
+REPO := tomsfastmath
HDR := ${REPO}/src/headers/tfm.h
LIB := ${REPO}/libtfm.a
@@ -29,11 +22,11 @@ clean:
cd ${REPO}; git clean -dxf
distclean: clean
- rm -rf ${REPO} TAGS
+ git submodule deinit
+ rm -f TAGS
${HDR}:
- git clone --quiet --no-checkout ${URL}
- cd ${REPO}; git checkout --quiet ${COMMIT}
+ git submodule update --init
${LIB}: ${HDR}
ifeq "" "${SHA256SUM}"