From e3db117ae05a248773abe4b7ec2ef95ed7203b8e Mon Sep 17 00:00:00 2001 From: Paul Selkirk Date: Sat, 25 Jun 2016 15:13:43 -0400 Subject: Split LIB*_DIR into _SRC and _BLD. Also rename all instances of GNUmakefile to Makefile. --- libraries/libcli/Makefile | 16 ----------- libraries/libhal/GNUmakefile | 14 ---------- libraries/libhal/Makefile | 10 +++++++ libraries/libhal/tests/GNUmakefile | 10 ------- libraries/libhal/tests/Makefile | 10 +++++++ libraries/libhal/utils/GNUmakefile | 10 ------- libraries/libhal/utils/Makefile | 10 +++++++ libraries/libtfm/GNUmakefile | 46 ------------------------------- libraries/libtfm/Makefile | 46 +++++++++++++++++++++++++++++++ libraries/libtfm/tomsfastmath/GNUmakefile | 8 ------ libraries/libtfm/tomsfastmath/Makefile | 8 ++++++ 11 files changed, 84 insertions(+), 104 deletions(-) delete mode 100644 libraries/libhal/GNUmakefile create mode 100644 libraries/libhal/Makefile delete mode 100644 libraries/libhal/tests/GNUmakefile create mode 100644 libraries/libhal/tests/Makefile delete mode 100644 libraries/libhal/utils/GNUmakefile create mode 100644 libraries/libhal/utils/Makefile delete mode 100644 libraries/libtfm/GNUmakefile create mode 100644 libraries/libtfm/Makefile delete mode 100644 libraries/libtfm/tomsfastmath/GNUmakefile create mode 100644 libraries/libtfm/tomsfastmath/Makefile (limited to 'libraries') diff --git a/libraries/libcli/Makefile b/libraries/libcli/Makefile index 509f493..bbd686d 100644 --- a/libraries/libcli/Makefile +++ b/libraries/libcli/Makefile @@ -8,19 +8,3 @@ vpath %.c ${REPO} vpath %.h ${REPO} include ${REPO}/Makefile - -# Kludge alert: -# -# We really should teach Makefiles that need libcli.h to look in the -# right place, but we don't want to wire the current location of -# libcli into too many Makefiles, since we intend to move it soon. -# -# So, for the moment, we just copy libcli.h. Clean this up after the -# the repository moves (and maybe do something about the general -# assumption that header files and libraries always live in the same -# directory, that's wrong in a VPATH-based world). - -all: $(abspath .)/libcli.h - -$(abspath .)/libcli.h: ${REPO}/libcli.h - cp -p $< $@ diff --git a/libraries/libhal/GNUmakefile b/libraries/libhal/GNUmakefile deleted file mode 100644 index 03b1636..0000000 --- a/libraries/libhal/GNUmakefile +++ /dev/null @@ -1,14 +0,0 @@ -ifndef CRYPTECH_ROOT - CRYPTECH_ROOT := $(abspath ../../../..) -endif - -REPO := ${CRYPTECH_ROOT}/sw/libhal - -TFMDIR := $(abspath ../libtfm) - -CFLAGS += -I${REPO} - -vpath %.c ${REPO} -vpath %.h ${REPO}:${LIBTFM_DIR} - -include ${CRYPTECH_ROOT}/sw/libhal/GNUmakefile 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/GNUmakefile b/libraries/libhal/tests/GNUmakefile deleted file mode 100644 index 1d7449a..0000000 --- a/libraries/libhal/tests/GNUmakefile +++ /dev/null @@ -1,10 +0,0 @@ -ifndef CRYPTECH_ROOT - CRYPTECH_ROOT := $(abspath ../../../../..) -endif - -TFMDIR := $(abspath ../../libtfm) - -vpath %.c ${CRYPTECH_ROOT}/sw/libhal/tests -vpath %.h ${CRYPTECH_ROOT}/sw/libhal/tests:${LIBTFM_DIR} - -include ${CRYPTECH_ROOT}/sw/libhal/tests/GNUmakefile 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/GNUmakefile b/libraries/libhal/utils/GNUmakefile deleted file mode 100644 index 9d38efd..0000000 --- a/libraries/libhal/utils/GNUmakefile +++ /dev/null @@ -1,10 +0,0 @@ -ifndef CRYPTECH_ROOT - CRYPTECH_ROOT := $(abspath ../../../../..) -endif - -TFMDIR := $(abspath ../../libtfm) - -vpath %.c ${CRYPTECH_ROOT}/sw/libhal/utils -vpath %.h ${CRYPTECH_ROOT}/sw/libhal/utils:${LIBTFM_DIR} - -include ${CRYPTECH_ROOT}/sw/libhal/utils/GNUmakefile 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/GNUmakefile b/libraries/libtfm/GNUmakefile deleted file mode 100644 index ca86f80..0000000 --- a/libraries/libtfm/GNUmakefile +++ /dev/null @@ -1,46 +0,0 @@ - -# This duplicates more of sw/thirdparty/libtfm/GNUmakefile 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/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/GNUmakefile b/libraries/libtfm/tomsfastmath/GNUmakefile deleted file mode 100644 index 7141763..0000000 --- a/libraries/libtfm/tomsfastmath/GNUmakefile +++ /dev/null @@ -1,8 +0,0 @@ -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/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 -- cgit v1.2.3