Commit 4cf5a322 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 504dff42
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)
This diff is collapsed.
......@@ -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
../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_CFLAGS = -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..
bin_PROGRAMS = sexp-conv nettle-lfib-stream
# 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 = -lnettle ../libnettle.a
# Explicit use of DEPENDENCIES is more correct, but scales badly to a
# large number of programs.
# sexp_conv_DEPENDENCIES = ../libnettle.a
# nettle_lfib_stream_DEPENDENCIES = ../libnettle.a
EXTRA_DIST = misc.h input.h output.h parse.h getopt.h
sexp_conv_SOURCES = sexp-conv.c input.c output.c parse.c \
getopt.c getopt1.c misc.c
@SET_MAKE@
srcdir = @srcdir@
VPATH = @srcdir@
top_srcdir = @top_srcdir@
include ../config.make
TARGETS = sexp-conv nettle-lfib-stream
all: $(TARGETS)
sexp_conv_SOURCES = sexp-conv.c input.c output.c parse.c \
getopt.c getopt1.c misc.c
SOURCES = $(sexp_conv_SOURCES) nettle-lfib-stream.c
DISTFILES = $(SOURCES) Makefile.in
sexp-conv: $(sexp_conv_SOURCES:.c=.$(OBJEXT)) ../libnettle.a
$(LINK) $^ $(LIBS) -L.. -lnettle -o $@
nettle-lfib-stream: nettle-lfib-stream.$(OBJEXT) ../libnettle.a
$(LINK) $^ $(LIBS) -L.. -lnettle -o $@
.c.$(OBJEXT):
$(COMPILE) -I.. -c $< && $(DEP_PROCESS)
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in ../config.status
cd .. && $(SHELL) ./config.status tools/$@
../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 $@
check:
true
install: $(TARGETS)
$(INSTALL) -d $(bindir)
$(INSTALL_PROGRAM) $(TARGETS) $(bindir)
distdir: $(DISTFILES)
cp $(DISTFILES) $(distdir)
clean:
rm -f $(TARGETS) *.o *.d
-include $(SOURCES:.c=.$(OBJEXT).d)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment