Commit a1d0488f authored by Niels Möller's avatar Niels Möller

Stop using automake. Replaced each Makefile.am with a hand-written

Makefile.in.
* configure.ac: New output variable CCPIC_MAYBE. New output file
config.make. Replaced automake constructions.

Rev: src/nettle/Makefile.am:1.81(DEAD)
Rev: src/nettle/Makefile.in:1.1
Rev: src/nettle/configure.ac:1.45
Rev: src/nettle/examples/Makefile.am:1.22(DEAD)
Rev: src/nettle/examples/Makefile.in:1.1
Rev: src/nettle/testsuite/Makefile.am:1.42(DEAD)
Rev: src/nettle/testsuite/Makefile.in:1.1
Rev: src/nettle/tools/Makefile.am:1.8(DEAD)
Rev: src/nettle/tools/Makefile.in:1.1
parent 50e8dd94
SUBDIRS = . tools testsuite examples
noinst_PROGRAMS = aesdata desdata shadata
libnettleincludedir = $(includedir)/nettle
lib_LIBRARIES = libnettle.a
libnettleinclude_HEADERS = aes.h arcfour.h arctwo.h bignum.h blowfish.h \
base16.h base64.h buffer.h cast128.h \
cbc.h \
des.h des-compat.h dsa.h \
hmac.h \
knuth-lfib.h \
macros.h \
md2.h md4.h \
md5.h md5-compat.h \
memxor.h \
nettle-meta.h \
pgp.h pkcs1.h realloc.h rsa.h rsa-compat.h \
sexp.h \
serpent.h sha.h twofish.h \
yarrow.h
nodist_libnettleinclude_HEADERS = nettle-types.h
noinst_HEADERS = aes-internal.h cast128_sboxes.h desinfo.h desCode.h \
serpent_sboxes.h nettle-internal.h
libnettle_a_SOURCES = aes.c \
aes-decrypt-table.c aes-decrypt.c \
aes-encrypt-table.c aes-encrypt.c \
aes-set-encrypt-key.c aes-set-decrypt-key.c aes-meta.c \
arcfour.c arcfour-crypt.c arcfour-meta.c \
arctwo.c arctwo-meta.c \
base16-encode.c base16-decode.c base16-meta.c \
base64-encode.c base64-decode.c base64-meta.c \
cast128.c cast128-meta.c \
blowfish.c \
cbc.c \
des.c \
des3.c des-compat.c \
hmac.c hmac-md5.c hmac-sha1.c hmac-sha256.c \
knuth-lfib.c \
md2.c md2-meta.c md4.c md4-meta.c \
md5.c md5-compat.c md5-meta.c \
sha1.c sha1-compress.c sha1-meta.c sha256.c sha256-meta.c \
serpent.c serpent-meta.c \
twofish.c twofish-meta.c \
yarrow256.c yarrow_key_event.c \
sexp.c sexp-format.c \
sexp-transport.c sexp-transport-format.c \
bignum.c bignum-random.c sexp2bignum.c \
pkcs1.c pkcs1-rsa-md5.c pkcs1-rsa-sha1.c \
rsa.c rsa-sign.c rsa-verify.c \
rsa-md5-sign.c rsa-md5-verify.c \
rsa-sha1-sign.c rsa-sha1-verify.c \
rsa-encrypt.c rsa-decrypt.c \
rsa-keygen.c rsa-compat.c \
rsa2sexp.c sexp2rsa.c \
dsa.c dsa-sign.c dsa-verify.c dsa-keygen.c \
sexp2dsa.c \
pgp-encode.c rsa2openpgp.c \
buffer.c buffer-init.c realloc.c \
nettle-internal.c
libnettle_a_CFLAGS = $(CCPIC)
LIBOBJS = @LIBOBJS@
libnettle_a_LIBADD = $(LIBOBJS)
shadata_LDADD = -lm
info_TEXINFOS = nettle.texinfo
all-local: nettle.html
EXTRA_DIST = $(des_headers) descore.README nettle.html \
sha-example.c .bootstrap $(des_headers) \
sparc/aes.asm sparc/machine.m4 \
x86/aes.asm x86/aes-encrypt.asm x86/aes-decrypt.asm \
x86/aes_tables.asm x86/arcfour-crypt.asm x86/sha1-compress.asm
DISTCLEANFILES = aes.asm aes.s \
aes-decrypt.asm aes-decrypt.s aes-encrypt.asm aes-encrypt.s \
arcfour-crypt.asm arcfour-crypt.s sha1-compress.asm sha1-compress.s \
machine.m4 nettle-types.h
CLEANFILES = $(SHLIBFORLINK)
clean-local:
rm -rf .lib
# Using assembler files. Should get precedence before the .c.o rule.
SUFFIXES = .asm .html
# can be overridden during development, eg. "make RM_TMP=: aes.o"
RM_TMP = rm -f
# FIXME: How to write this without using GNU make features?
# For now, use automake to disable these rules when they are not needed.
if ENABLE_ASSEMBLER
# NOTE: We have to use an explicit rule .asm -> .o, to override the .c
# -> .o rule. Using rules involving .s doesn't seem to work.
# %.s: %.asm asm.m4 machine.m4 config.m4
# $(M4) $(srcdir)/asm.m4 machine.m4 config.m4 \
# `test -f $< || echo '$(srcdir)/'`$< >$@
# FIXME: For some reason, this rule breaks builds on Tru64 5.1B (on
# alpha), with the system make. It fails with "Don't know how to make
# aes.asm", which is very strange, since the make program on this
# system is not supposed to know about %-style pattern rules, and
# "aes.asm" doesn't not occur explicitly in any target or dependency.
# NOTE: We create an empty .deps-file, to make the make/automake
# dependency tracking happier.
%.$(OBJEXT): %.asm asm.m4 machine.m4 config.m4
$(M4) $(srcdir)/asm.m4 machine.m4 config.m4 \
`test -f $< || echo '$(srcdir)/'`$< >$*.s
$(COMPILE) -c $*.s -o $@
echo >.deps/$*.Po
# Assembler files must contain only PIC-clean code.
%_p.$(OBJEXT): %.asm asm.m4 machine.m4 config.m4
$(M4) $(srcdir)/asm.m4 machine.m4 config.m4 \
`test -f $< || echo '$(srcdir)/'`$< >$*.s
$(COMPILE) -c $*.s -o $@
echo >.deps/$*.Po
endif
if ENABLE_SHARED
# FIXME: This rule doesn't get dependencies right.
%_p.$(OBJEXT): %.c
$(COMPILE) $(SHLIBCFLAGS) -c $< -o $@
SHLIBOBJECTS = $(patsubst %.c,%_p.$(OBJEXT),$(libnettle_a_SOURCES)) \
$(patsubst %.$(OBJEXT),%_p.$(OBJEXT),$(LIBOBJS))
# The point of the sym links is to use -Lnettle-dir at linktime,
# and LD_LIBRARY_PATH=nettle-dir/.lib at run time.
$(SHLIBFORLINK): $(SHLIBOBJECTS)
$(SHLIBLINK) $^ -o $@ $(SHLIBLIBS)
-mkdir .lib 2>/dev/null
[ -z "$(SHLIBSONAME)" ] || (cd .lib \
&& ln -sf ../$(SHLIBFORLINK) $(SHLIBSONAME))
endif
# Shared library rules
all-local: $(SHLIBTARGET)
install-data-local: $(SHLIBINSTALL)
install-shared: $(SHLIBFORLINK)
$(INSTALL_DATA) $(SHLIBFORLINK) $(DESTDIR)$(libdir)/$(SHLIBFILE)
[ -z "$(SHLIBSONAME)" ] \
|| (cd $(DESTDIR)$(libdir) \
&& ln -sf $(SHLIBFILE) $(SHLIBSONAME) \
&& ln -sf $(SHLIBFILE) $(SHLIBFORLINK) )
.texinfo.html:
(cd $(srcdir) \
&& $(MAKEINFO) --html --no-split --output $@T $(<F) \
; test -s $@T && mv -f $@T $@)
# desCore rules
# It seems using $(srcdir)/ doesn't work with GNU make 3.79.1
# des_headers = $(srcdir)/parity.h $(srcdir)/rotors.h $(srcdir)/keymap.h
des_headers = parity.h rotors.h keymap.h
# Generate DES headers.
$(des_headers): desdata.c
$(MAKE) desdata$(EXEEXT)
./desdata$(EXEEXT) $(@F) > $@T
test -s $@T && mv -f $@T $@
des.o: des.c des.h $(des_headers)
# Nettle Makefile
@SET_MAKE@
srcdir = @srcdir@
VPATH = @srcdir@
LIBOBJS = @LIBOBJS@
SUBDIRS = tools testsuite examples
include config.make
TARGETS = aesdata$(EXEEXT) desdata$(EXEEXT) shadata$(EXEEXT) libnettle.a $(SHLIBTARGET)
all check install uninstall clean distclean mostlyclean maintainer-clean distdir:
$(MAKE) $@-here
set -e; for d in $(SUBDIRS); do $(MAKE) -C $$d $@; done
check-here:
true
.SUFFIXES:
.SUFFIXES: .asm .html .c .dvi .info .$(OBJEXT) .p$(OBJEXT) .exe .pdf .ps .texinfo
all-here: $(TARGETS)
nettle_SOURCES = aes.c \
aes-decrypt-table.c aes-decrypt.c \
aes-encrypt-table.c aes-encrypt.c \
aes-set-encrypt-key.c aes-set-decrypt-key.c aes-meta.c \
arcfour.c arcfour-crypt.c arcfour-meta.c \
arctwo.c arctwo-meta.c \
base16-encode.c base16-decode.c base16-meta.c \
base64-encode.c base64-decode.c base64-meta.c \
cast128.c cast128-meta.c \
blowfish.c \
cbc.c \
des.c \
des3.c des-compat.c \
hmac.c hmac-md5.c hmac-sha1.c hmac-sha256.c \
knuth-lfib.c \
md2.c md2-meta.c md4.c md4-meta.c \
md5.c md5-compat.c md5-meta.c \
sha1.c sha1-compress.c sha1-meta.c sha256.c sha256-meta.c \
serpent.c serpent-meta.c \
twofish.c twofish-meta.c \
yarrow256.c yarrow_key_event.c \
sexp.c sexp-format.c \
sexp-transport.c sexp-transport-format.c \
bignum.c bignum-random.c sexp2bignum.c \
pkcs1.c pkcs1-rsa-md5.c pkcs1-rsa-sha1.c \
rsa.c rsa-sign.c rsa-verify.c \
rsa-md5-sign.c rsa-md5-verify.c \
rsa-sha1-sign.c rsa-sha1-verify.c \
rsa-encrypt.c rsa-decrypt.c \
rsa-keygen.c rsa-compat.c \
rsa2sexp.c sexp2rsa.c \
dsa.c dsa-sign.c dsa-verify.c dsa-keygen.c \
sexp2dsa.c \
pgp-encode.c rsa2openpgp.c \
buffer.c buffer-init.c realloc.c \
nettle-internal.c
HEADERS = aes.h arcfour.h arctwo.h bignum.h blowfish.h \
base16.h base64.h buffer.h cast128.h \
cbc.h \
des.h des-compat.h dsa.h \
hmac.h \
knuth-lfib.h \
macros.h \
md2.h md4.h \
md5.h md5-compat.h \
memxor.h \
nettle-meta.h \
pgp.h pkcs1.h realloc.h rsa.h rsa-compat.h \
sexp.h \
serpent.h sha.h twofish.h \
yarrow.h
INSTALL_HEADERS = $(HEADERS) nettle-types.h
SOURCES = $(nettle_SOURCES) aesdata.c desdata.c shadata.c
DISTFILES = $(SOURCES) $(HEADERS) .bootstrap aclocal.m4 configure.ac configure \
config.guess config.sub texinfo.tex \
config.h.in config.m4.in config.make.in Makefile.in \
README AUTHORS COPYING INSTALL NEWS TODO \
nettle.texinfo nettle.info sha-example.c
# Rules building libnettle.a
# FIXME: Do we really need to delete the archive first?
libnettle.a: $(nettle_SOURCES:.c=.o) $(LIBOBJS)
-rm -f $@
$(AR) $(ARFLAGS) $@ $^
$(RANLIB) $@
.c.$(OBJEXT):
$(COMPILE) $(CCPIC_MAYBE) -c $< \
&& $(DEP_PROCESS)
# Rules building libnettle.so
$(SHLIBFORLINK): $(nettle_SOURCES:.c=.p$(OBJEXT)) $(LIBOBJS:.$(OBJEXT)=.p$(OBJEXT))
$(SHLIBLINK) $^ -o $@ $(SHLIBLIBS)
-mkdir .lib 2>/dev/null
[ -z "$(SHLIBSONAME)" ] || (cd .lib \
&& ln -sf ../$(SHLIBFORLINK) $(SHLIBSONAME))
.c.p$(OBJEXT):
$(COMPILE) $(SHLIBCFLAGS) -c $< -o $@ \
&& $(DEP_PROCESS)
.o$(EXEEXT):
$(LINK) $^ $(LIBS) -o $@
# aesdata.$(OBJEXT) : aesdata.c
# $(COMPILE) -c $< && $(DEP_PROCESS)
aesdata$(EXEEXT): aesdata.$(OBJEXT)
$(LINK) $^ $(LIBS) -o $@
# desdata.$(OBJEXT) : desdata.c
# $(COMPILE) -c $< && $(DEP_PROCESS)
desdata$(EXEEXT): desdata.$(OBJEXT)
$(LINK) $^ $(LIBS) -o $@
# shadata.$(OBJEXT) : shadata.c
# $(COMPILE) -c $< && $(DEP_PROCESS)
shadata$(EXEEXT): shadata.$(OBJEXT)
$(LINK) $^ $(LIBS) -lm -o $@
# FIXME: For some reason, this rule breaks builds on Tru64 5.1B (on
# alpha), with the system make. It fails with "Don't know how to make
# aes.asm", which is very strange, since the make program on this
# system is not supposed to know about %-style pattern rules, and
# "aes.asm" doesn't occur explicitly in any target or dependency.
@IF_ENABLE_ASM@%.$(OBJEXT): %.asm asm.m4 machine.m4 config.m4
@IF_ENABLE_ASM@ $(M4) $(srcdir)/asm.m4 machine.m4 config.m4 \
@IF_ENABLE_ASM@ `test -f $< || echo '$(srcdir)/'`$< >$*.s
@IF_ENABLE_ASM@ $(CC) $(CFLAGS) $(CCPIC_MAYBE) -c $*.s -o $@
@IF_ENABLE_ASM@ echo >$*.d
# All assembler files should use pic-code only.
@IF_ENABLE_ASM@%.p$(OBJEXT): %.asm asm.m4 machine.m4 config.m4
@IF_ENABLE_ASM@ $(M4) $(srcdir)/asm.m4 machine.m4 config.m4 \
@IF_ENABLE_ASM@ `test -f $< || echo '$(srcdir)/'`$< >$*.s
@IF_ENABLE_ASM@ $(CC) $(CFLAGS) $(CCPIC) -c $*.s -o $@
@IF_ENABLE_ASM@ echo >$*.d
# Configure-related rules
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in config.status
$(SHELL) ./config.status $@
settings: $(srcdir)/settings.in config.status
$(SHELL) ./config.status $@
config.status: $(srcdir)/configure
$(SHELL) ./config.status --recheck
configure: $(srcdir)/configure.ac $(srcdir)/aclocal.m4
cd $(srcdir) && $(AUTOCONF)
config.h: stamp-h1
@if test ! -f $@; then \
rm -f stamp-h1; \
$(MAKE) stamp-h1; \
else :; fi
stamp-h1: $(srcdir)/config.h.in config.status
@rm -f stamp-h1
$(SHELL) ./config.status config.h
$(srcdir)/config.h.in: $(srcdir)/configure.ac
cd $(srcdir) && $(AUTOHEADER)
rm -f stamp-h1
touch $@
# Installation
install-here: install-info libnettle.a $(SHLIBTARGET) $(INSTALL_HEADERS) $(SHLIBINSTALL)
$(INSTALL) -d $(includedir)/nettle
$(INSTALL) -d $(libdir)
$(INSTALL_DATA) $(INSTALL_HEADERS) $(includedir)/nettle
$(INSTALL_DATA) libnettle.a $(libdir)
install-shared: $(SHLIBFORLINK)
$(INSTALL) -d $(libdir)
$(INSTALL_DATA) $(SHLIBFORLINK) $(libdir)/$(SHLIBFILE)
[ -z "$(SHLIBSONAME)" ] \
|| (cd $(libdir) \
&& ln -sf $(SHLIBFILE) $(SHLIBSONAME) \
&& ln -sf $(SHLIBFILE) $(SHLIBFORLINK) )
install-info: nettle.info
$(INSTALL) -d $(infodir)
$(INSTALL_DATA) nettle.info $(infodir) ; \
if (install-info --version && \
install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
install-info --info-dir="$(infodir)" nettle.info ; \
else : ; fi
# Distribution
distdir = $(PACKAGE_NAME)-$(PACKAGE_VERSION)
top_distdir = $(distdir)
# $(distdir) must always be a relative path!
distdir-here: $(DISTFILES)
rm -rf $(distdir)
mkdir $(distdir)
cp $(DISTFILES) $(distdir)
set -e; for d in $(SUBDIRS); do \
sd=$(distdir)/$$d ; \
mkdir $$sd && $(MAKE) -C $$d distdir=../$$sd $@ ; \
done
dist: distdir
tar cf - $(distdir) | gzip -c >$(distdir).tar.gz
rm -rf $(distdir)
rm_distcheck = test ! -d distcheck-tmp \
|| { find distcheck-tmp -type d ! -perm -200 -exec chmod u+w {} ';' \
&& rm -fr distcheck-tmp; }; }
distcheck: dist
$(rm_distcheck)
mkdir distcheck-tmp
cd distcheck-tmp && gzip -d < $(distdir).tar.gz | tar xf - && chmod -R a-w $(distdir)
mkdir distcheck-tmp/build
mkdir distcheck-tmp/install
cd distcheck-tmp/build && ../$(distdir)/configure --prefix=`cd ../install && pwd`
cd distcheck-tmp/build && $(MAKE)
cd distcheck-tmp/build && $(MAKE) check
cd distcheck-tmp/build && $(MAKE) install
cd distcheck-tmp/build && $(MAKE) dist
cd distcheck-tmp/build && rm *.gz
cd distcheck-tmp/build && $(MAKE) distcleancheck
cd distcheck-tmp && find build -type f -print > leftover-files
@test `cat distcheck-tmp/leftover-files | wc -l` -eq 0 \
|| { echo "ERROR: files left in build directory after distclean:" ; \
cat distcheck-tmp/leftover-files ; \
exit 1; }
$(rm_distcheck)
distcleancheck: distclean
@if test '$(srcdir)' = . ; then \
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
exit 1 ; \
fi
@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|| { echo "ERROR: files left in build directory after distclean:" ; \
$(distcleancheck_listfiles) ; \
exit 1; } >&2
clean-here:
rm -f $(TARGETS) *.$(OBJEXT) *.p$(OBJEXT) *.d
distclean-hdr:
-rm -f config.h stamp-h1
config.m4: config.status $(srcdir)/config.m4.in
$(SHELL) ./config.status $@
-include $(SOURCES:.c=.$(OBJEXT).d) $(SOURCES:.c=.p$(OBJEXT).d)
......@@ -2,14 +2,13 @@ dnl -*- mode: shell-script; sh-indentation: 2; -*-
dnl Process this file with autoconf to produce a configure script.
AC_INIT([nettle], [1.10])
AC_INIT([nettle], [1.11], [nettle-bugs@lists.lysator.liu.se])
AC_PREREQ(2.50)
AC_CONFIG_SRCDIR([arcfour.c])
# Needed to stop autoconf from looking for files in parent directories.
AC_CONFIG_AUX_DIR([.])
AM_INIT_AUTOMAKE
AM_CONFIG_HEADER([config.h])
AC_CONFIG_HEADER([config.h])
SHLIBMAJOR=2
SHLIBMINOR=2
......@@ -74,12 +73,15 @@ fi
AC_PROG_MAKE_SET
AC_PROG_RANLIB
AM_PROG_CC_STDC
if test "x$am_cv_prog_cc_stdc" = xno ; then
if test "x$ac_cv_prog_cc_stdc" = xno ; then
AC_ERROR([the C compiler doesn't handle ANSI-C])
fi
AC_PROG_INSTALL
LSH_DEPENDENCY_TRACKING
# Select assembler code
asm_path=
case "$host" in
......@@ -146,12 +148,14 @@ else
SHLIBINSTALL=''
fi
if test "x$enable_pic" = xyes; then : ; else
CCPIC=''
if test "x$enable_pic" = xyes; then
CCPIC_MAYBE="$CCPIC"
else
CCPIC_MAYBE=''
fi
AC_SUBST([CCPIC_MAYBE])
AM_CONDITIONAL([ENABLE_ASSEMBLER], [test x$enable_assembler = xyes])
AM_CONDITIONAL([ENABLE_SHARED], [test x$enable_shared = xyes])
LSH_MAKE_CONDITIONAL([ENABLE_ASM], [test x$enable_assembler = xyes])
AC_SUBST(SHLIBCFLAGS)
AC_SUBST(SHLIBMAJOR)
......@@ -236,5 +240,5 @@ if test x$GCC = xyes ; then
# inttypes.h.
fi
AC_OUTPUT(Makefile tools/Makefile testsuite/Makefile examples/Makefile config.m4)
AC_OUTPUT(Makefile config.make config.m4 tools/Makefile testsuite/Makefile examples/Makefile)
OPENSSL_LIBFLAGS = @OPENSSL_LIBFLAGS@
AM_CPPFLAGS = -I$(top_srcdir)
# We need .. to be searched before standard places, in order to pick
# up the newly built libnettle.a/libnettle.so, rather than any
# installed version.
AM_LDFLAGS = -L..
# There's no program "io", it's just a trick to get automake to keep track
# of dependencies for io.o.
EXTRA_PROGRAMS = rsa-keygen rsa-sign rsa-verify rsa-encrypt rsa-decrypt io
noinst_PROGRAMS = nettle-benchmark @RSA_EXAMPLES@
nettle_benchmark_SOURCES = nettle-benchmark.c nettle-openssl.c
rsa_encrypt_SOURCES = rsa-encrypt.c getopt.h getopt.c getopt1.c
rsa_decrypt_SOURCES = rsa-decrypt.c getopt.h getopt.c getopt1.c
rsa_keygen_SOURCES = rsa-keygen.c getopt.h getopt.c getopt1.c
# libnettle.a for the dependency
LDADD = io.o -lnettle ../libnettle.a
nettle_benchmark_LDADD = -lnettle ../libnettle.a $(OPENSSL_LIBFLAGS)
TS_PROGS = rsa-sign-test rsa-verify-test rsa-encrypt-test
EXTRA_DIST = io.h rsa-session.h run-tests setup-env teardown-env $(TS_PROGS)
.PHONY: run-tests
run-tests: $(TS_PROGS)
LD_LIBRARY_PATH=../.lib srcdir="$(srcdir)" \
"$(srcdir)"/run-tests $(TS_PROGS)
check: run-tests
@SET_MAKE@
srcdir = @srcdir@
VPATH = @srcdir@
top_srcdir = @top_srcdir@
include ../config.make
OPENSSL_LIBFLAGS = @OPENSSL_LIBFLAGS@
TARGETS = nettle-benchmark @RSA_EXAMPLES@
SOURCES = nettle-benchmark.c nettle-openssl.c \
io.c getopt.c getopt1.c \
rsa-encrypt.c rsa-decrypt.c rsa-keygen.c
TS_ALL = rsa-sign-test rsa-verify-test rsa-encrypt-test
DISTFILES= $(SOURCES) Makefile.in $(TS_ALL) run-tests setup-env teardown-env \
io.h rsa-session.h
all: $(TARGETS)
.c.$(OBJEXT):
$(COMPILE) -I.. -c $<
.o$(EXEEXT):
$(LINK) $^ $(LIBS) -L.. -lnettle -o $@
nettle-benchmark: nettle-benchmark.o nettle-openssl.o ../libnettle.a
$(LINK) $^ $(LIBS) -L.. -lnettle $(OPENSSL_LIBFLAGS) -o $@
$(TARGETS) : io.o ../libnettle.a
check: $(TS_ALL)
LD_LIBRARY_PATH=../.lib srcdir="$(srcdir)" \
"$(srcdir)"/run-tests $(TS_ALL)
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in ../config.status
cd .. && $(SHELL) ./config.status examples/$@
../config.make: $(top_srcdir)/config.make.in ../config.status
cd .. && $(SHELL) ./config.status config.make
../config.status: $(top_srcdir)/configure
cd .. && $(SHELL) ./config.status --recheck
../configure: $(top_srcdir)/configure.ac $(top_srcdir)/aclocal.m4
cd $(top_srcdir) && $(AUTOCONF)
# # FIXME: To we really need all this in all subdirs?
# ../config.h: ../stamp-h1
# @cd .. $(MAKE) stamp-h1;
#
# ../stamp-h1: $(top_srcdir)/config.h.in ../config.status
# cd .. && $(MAKE) stamp-h1
#
# $(top_srcdir)/config.h.in: $(top_srcdir)/configure.ac
# cd $(top_srcdir) && $(AUTOHEADER)
# rm -f ../stamp-h1
# touch $@
install:
true
distdir: $(DISTFILES)
cp $(DISTFILES) $(distdir)
clean:
rm -f $(TARGETS) *.o *.d
-include $(SOURCES:.c=.$(OBJEXT).d)
AM_CPPFLAGS = -I$(top_srcdir)
# We need .. to be searched before standard places, in order to pick
# up the newly built libnettle.a/libnettle.so, rather than any
# installed version.
AM_LDFLAGS = -L..
noinst_PROGRAMS = aes-test arcfour-test arctwo-test \
blowfish-test cast128-test \
base16-test base64-test \
des-test des3-test des-compat-test \
md2-test md4-test md5-test md5-compat-test \
sha1-test sha256-test \
serpent-test twofish-test \
buffer-test sexp-test sexp-format-test \
rsa2sexp-test sexp2rsa-test \
knuth-lfib-test \
cbc-test hmac-test bignum-test \
pkcs1-test \
rsa-test rsa-encrypt-test rsa-keygen-test \
dsa-test dsa-keygen-test \
yarrow-test
TS_PROGS = $(noinst_PROGRAMS)
TS_SH = sexp-conv-test symbols-test
TS_ALL = $(TS_PROGS) $(TS_SH)
# Workaround to get automake to keep dependencies for testutils.o
EXTRA_PROGRAMS = testutils
# libnettle.a is added at the end to make sure all programs depend on it.
# It seems there's no DEPENDENCIES variable that affects all programs.
LDADD = testutils.o -lnettle ../libnettle.a
EXTRA_DIST = $(TS_SH) testutils.h \
run-tests rfc1750.txt
CLEANFILES = test.in test1.out test2.out
.PHONY: check
check: $(TS_ALL) $(srcdir)/run-tests
LD_LIBRARY_PATH=../.lib srcdir="$(srcdir)" \
$(srcdir)/run-tests $(TS_ALL)
@SET_MAKE@
srcdir = @srcdir@
VPATH = @srcdir@
top_srcdir = @top_srcdir@
include ../config.make
TS_SOURCES = aes-test.c arcfour-test.c arctwo-test.c \
blowfish-test.c cast128-test.c \
base16-test.c base64-test.c \
des-test.c des3-test.c des-compat-test.c \
md2-test.c md4-test.c md5-test.c md5-compat-test.c \
sha1-test.c sha256-test.c \
serpent-test.c twofish-test.c \
buffer-test.c sexp-test.c sexp-format-test.c \
rsa2sexp-test.c sexp2rsa-test.c \
knuth-lfib-test.c \
cbc-test.c hmac-test.c bignum-test.c \
pkcs1-test.c \
rsa-test.c rsa-encrypt-test.c rsa-keygen-test.c \
dsa-test.c dsa-keygen-test.c \
yarrow-test.c
TARGETS = $(TS_SOURCES:.c=$(EXEEXT))
TS_SH = sexp-conv-test symbols-test
TS_ALL = $(TARGETS) $(TS_SH)
SOURCES = $(TS_SOURCES) testutils.c
DISTFILES = $(SOURCES) Makefile.in $(TS_SH) run-tests rfc1750.txt testutils.h
all: $(TARGETS)
.c.$(OBJEXT):
$(COMPILE) -I.. -c $< && $(DEP_PROCESS)
.o$(EXEEXT):
$(LINK) $< testutils.o $(LIBS) -L.. -lnettle -o $@
# .c$(EXEEXT):
# $(COMPILE) -I..
# $(CC) $(CFLAGS) $(LDFLAGS) $*.o testutils.o -L.. -lnettle $(LIBS) -o $@
$(TARGETS) : testutils.$(OBJEXT) ../libnettle.a
check: $(TS_ALL) $(srcdir)/run-tests
LD_LIBRARY_PATH=../.lib srcdir="$(srcdir)" \
$(srcdir)/run-tests $(TS_ALL)
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in ../config.status
cd .. && $(SHELL) ./config.status testsuite/$@
../config.make: $(top_srcdir)/config.make.in ../config.status
cd .. && $(SHELL) ./config.status config.make