]> git.ipfire.org Git - thirdparty/nettle.git/commitdiff
Don't include nettle-internal.h in the library.
authorNiels Möller <nisse@lysator.liu.se>
Fri, 30 Mar 2012 19:32:47 +0000 (21:32 +0200)
committerNiels Möller <nisse@lysator.liu.se>
Fri, 30 Mar 2012 19:32:47 +0000 (21:32 +0200)
ChangeLog
Makefile.in
examples/Makefile.in
testsuite/Makefile.in

index c11b2e502dcfdf85c1205cdf1c7150dc655f6381..9e56980b317b3fc451d5f71bdc466895e7cc8912 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,12 @@
 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>
 
index b7e0f9d183c4ce906c24106c866c1c03291dc3bd..4d3c89a6db2e77cd12a09717ff26a6704111bea0 100644 (file)
@@ -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 \
index c5d09586a88f0c12d3c31c415ddeb3a50d7695eb..4746a2007ad93aa944b3f5dfeefd4ce67a77ed70 100644 (file)
@@ -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
 
index 10ffae900dd48ba607c4264544807e275bdb77e6..206a76e568eee25b07e6a7d1ec56857d5970e99c 100644 (file)
@@ -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.