Commit 4403177a authored by Niels Möller's avatar Niels Möller

Don't include nettle-internal.h in the library.

parent 9020e137
2012-03-30 Niels Möller <nisse@lysator.liu.se>
* Makefile.in (soname link): Fixed logic.
(nettle_SOURCES): Removed nettle-internal.c, so that it's not
parrt of the library...
(internal_SOURCES): ...and put it here.
* testsuite/Makefile.in (TEST_OBJS): Added ../nettle-internal.o.
* examples/Makefile.in (BENCH_OBJS): New variable, to simplify the
nettle-benchmark rule. Also link with ../nettle-internal.o.
2012-03-29 Niels Möller <nisse@lysator.liu.se>
......
......@@ -24,12 +24,14 @@ LIBTARGETS = libnettle.a @IF_HOGWEED@ libhogweed.a
SHLIBTARGETS = $(LIBNETTLE_FORLINK) @IF_HOGWEED@ $(LIBHOGWEED_FORLINK)
getopt_SOURCES = getopt.c getopt1.c
getopt_TARGETS = $(getopt_SOURCES:.c=.$(OBJEXT))
internal_SOURCES = nettle-internal.c
internal_TARGETS = $(internal_SOURCES:.c=.$(OBJEXT))
TARGETS = aesdata$(EXEEXT) desdata$(EXEEXT) twofishdata$(EXEEXT) \
shadata$(EXEEXT) gcmdata$(EXEEXT) \
$(getopt_TARGETS) \
$(getopt_TARGETS) $(internal_TARGETS) \
$(LIBTARGETS) @IF_SHARED@ $(SHLIBTARGETS)
IMPLICIT_TARGETS = @IF_DLL@ $(LIBNETTLE_FILE) $(LIBHOGWEED_FILE)
......@@ -90,7 +92,7 @@ nettle_SOURCES = aes-decrypt-internal.c aes-decrypt.c \
buffer.c buffer-init.c realloc.c \
nettle-meta-hashes.c nettle-meta-ciphers.c \
nettle-meta-armors.c \
nettle-internal.c write-be32.c write-le32.c
write-be32.c write-le32.c
hogweed_SOURCES = sexp.c sexp-format.c \
sexp-transport.c sexp-transport-format.c \
......@@ -132,7 +134,8 @@ HEADERS = aes.h arcfour.h arctwo.h asn1.h bignum.h blowfish.h \
INSTALL_HEADERS = $(HEADERS) nettle-stdint.h
SOURCES = $(nettle_SOURCES) $(hogweed_SOURCES) $(getopt_SOURCES) \
SOURCES = $(nettle_SOURCES) $(hogweed_SOURCES) \
$(getopt_SOURCES) $(internal_SOURCES) \
aesdata.c desdata.c twofishdata.c shadata.c gcmdata.c
DISTFILES = $(SOURCES) $(HEADERS) getopt.h .bootstrap run-tests \
......
......@@ -33,7 +33,7 @@ all: $(TARGETS)
.c.$(OBJEXT):
$(COMPILE) -c $< && $(DEP_PROCESS)
$(getopt_OBJS):
$(getopt_OBJS) ../nettle-internal.$(OBJEXT):
( cd .. && $(MAKE) $@ )
# For Solaris and BSD make, we have to use an explicit rule for each executable
......@@ -69,9 +69,10 @@ rsa-decrypt$(EXEEXT): rsa-decrypt.$(OBJEXT) read_rsa_key.$(OBJEXT)
eratosthenes$(EXEEXT): eratosthenes.$(OBJEXT) $(GETOPT_OBJS)
$(LINK) eratosthenes.$(OBJEXT) $(GETOPT_OBJS) -o eratosthenes$(EXEEXT)
nettle-benchmark$(EXEEXT): nettle-benchmark.$(OBJEXT) nettle-openssl.$(OBJEXT) $(GETOPT_OBJS)
$(LINK) nettle-benchmark.$(OBJEXT) nettle-openssl.$(OBJEXT) io.$(OBJEXT) $(GETOPT_OBJS) \
-lnettle $(BENCH_LIBS) $(OPENSSL_LIBFLAGS) -o nettle-benchmark$(EXEEXT)
BENCH_OBJS = nettle-benchmark.$(OBJEXT) nettle-openssl.$(OBJEXT) \
$(GETOPT_OBJS) ../nettle-internal.$(OBJEXT)
nettle-benchmark$(EXEEXT): $(BENCH_OBJS)
$(LINK) $(BENCH_OBJS) -lnettle $(BENCH_LIBS) $(OPENSSL_LIBFLAGS) -o nettle-benchmark$(EXEEXT)
$(TARGETS) : io.$(OBJEXT) ../libnettle.a
......
......@@ -67,7 +67,11 @@ all: $(TARGETS) $(EXTRA_TARGETS)
# explicit rule for each and every executable.
LIB_HOGWEED = @IF_HOGWEED@ -lhogweed
TEST_OBJS = testutils.$(OBJEXT) $(LIB_HOGWEED) -lnettle $(LIBS)
TEST_OBJS = testutils.$(OBJEXT) ../nettle-internal.$(OBJEXT) \
$(LIB_HOGWEED) -lnettle $(LIBS)
../nettle-internal.$(OBJEXT):
( cd .. && $(MAKE) $@ )
.PHONY: test-rules
test-rules:
......@@ -84,7 +88,7 @@ test-rules:
include $(srcdir)/.test-rules.make
$(TARGETS) $(EXTRA_TARGETS): testutils.$(OBJEXT) \
$(TARGETS) $(EXTRA_TARGETS): testutils.$(OBJEXT) ../nettle-internal.$(OBJEXT) \
../libnettle.a @IF_HOGWEED@ ../libhogweed.a
# The PATH update is for locating dlls on w*ndows.
......
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