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>
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)
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 \
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 \
.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
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
# 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:
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.