Commit 40d3a89a authored by Niels Möller's avatar Niels Möller

Fixed handling of optional source files with make dist.

parent b1773940
2015-03-19 Niels Möller <nisse@diamant.hack.org>
* Makefile.in (OPT_HOGWEED_SOURCES): Deleted make variable.
(nettle_SOURCES, hogweed_SOURCES): Don't include optional sources
here.
(OPT_SOURCES): New variable.
(SOURCES): Include OPT_SOURCES.
(DISTFILES): Drop mini-gmp.c here, included via OPT_SOURCES.
(nettle_OBJS, hogweed_OBJS): Add the object files corresponding to
the optional source files included in the build.
* ecc-curve.h (nettle_curve25519): Removed public declaration.
* ecc-internal.h (_nettle_curve25519): New location, new name.
Updated all users.
......
......@@ -16,7 +16,6 @@ OPT_NETTLE_OBJS = @OPT_NETTLE_OBJS@
OPT_HOGWEED_OBJS = @OPT_HOGWEED_OBJS@
OPT_NETTLE_SOURCES = @OPT_NETTLE_SOURCES@
OPT_HOGWEED_SOURCES = @IF_MINI_GMP@ mini-gmp.c
SUBDIRS = tools testsuite examples
......@@ -136,8 +135,7 @@ nettle_SOURCES = aes-decrypt-internal.c aes-decrypt.c \
umac-poly64.c umac-poly128.c umac-set-key.c \
umac32.c umac64.c umac96.c umac128.c \
write-be32.c write-le32.c write-le64.c \
yarrow256.c yarrow_key_event.c \
$(OPT_NETTLE_SOURCES)
yarrow256.c yarrow_key_event.c
hogweed_SOURCES = sexp.c sexp-format.c \
sexp-transport.c sexp-transport-format.c \
......@@ -181,8 +179,9 @@ hogweed_SOURCES = sexp.c sexp-format.c \
eddsa-compress.c eddsa-decompress.c eddsa-expand.c \
eddsa-hash.c eddsa-pubkey.c eddsa-sign.c eddsa-verify.c \
ed25519-sha512-pubkey.c \
ed25519-sha512-sign.c ed25519-sha512-verify.c \
$(OPT_HOGWEED_SOURCES)
ed25519-sha512-sign.c ed25519-sha512-verify.c
OPT_SOURCES = fat-x86_64.c fat-arm.c mini-gmp.c
HEADERS = aes.h arcfour.h arctwo.h asn1.h blowfish.h \
base16.h base64.h buffer.h camellia.h cast128.h \
......@@ -206,12 +205,11 @@ INSTALL_HEADERS = $(HEADERS) nettle-stdint.h bignum.h @IF_MINI_GMP@ mini-gmp.h
SOURCES = $(nettle_SOURCES) $(hogweed_SOURCES) \
$(getopt_SOURCES) $(internal_SOURCES) \
$(OPT_SOURCES) \
aesdata.c desdata.c twofishdata.c shadata.c gcmdata.c eccdata.c
# FIXME: $(SOURCES) includes $(OPT_NETTLE_SOURCES) and
# $(OPT_HOGWEED_SOURCES), which means that inclusion in this list
# depends on which sources where included in the build. It needs to
# always include all files, and we no duplicates.
# NOTE: This list must include all source files, with no duplicates,
# independently of which source files are included in the build.
DISTFILES = $(SOURCES) $(HEADERS) getopt.h getopt_int.h \
.bootstrap run-tests \
aclocal.m4 configure.ac \
......@@ -227,13 +225,15 @@ DISTFILES = $(SOURCES) $(HEADERS) getopt.h getopt_int.h \
cast128_sboxes.h desinfo.h desCode.h \
memxor-internal.h nettle-internal.h nettle-write.h \
gmp-glue.h ecc-internal.h fat-setup.h \
mini-gmp.h mini-gmp.c asm.m4 \
mini-gmp.h asm.m4 \
nettle.texinfo nettle.info nettle.html nettle.pdf sha-example.c
# Rules building static libraries
nettle_OBJS = $(nettle_SOURCES:.c=.$(OBJEXT)) $(OPT_NETTLE_OBJS)
nettle_OBJS = $(nettle_SOURCES:.c=.$(OBJEXT)) \
$(OPT_NETTLE_SOURCES:.c=.$(OBJEXT)) $(OPT_NETTLE_OBJS)
hogweed_OBJS = $(hogweed_SOURCES:.c=.$(OBJEXT)) $(OPT_HOGWEED_OBJS)
hogweed_OBJS = $(hogweed_SOURCES:.c=.$(OBJEXT)) \
$(OPT_HOGWEED_OBJS) @IF_MINI_GMP@ mini-gmp.$(OBJEXT)
libnettle.a: $(nettle_OBJS)
-rm -f $@
......
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