Commit f4dcc3c0 authored by Niels Möller's avatar Niels Möller

Adjust Makefiles after the repository conversion.

parent 96ab28d3
2012-02-18 Niels Möller <nisse@lysator.liu.se>
* run-tests, getopt.c, getopt1.c, getopt.h: These files were moved
to the top-level in the conversion to an independent git
repository. They used to be symlinks to lsh files, from the
subdirectories which use them.
* Makefile.in: Build and distribute getopt files. Distribute
run-tests script.
* examples/Makefile.in: Adapt to getopt files and the run-tests
script now located in the parent directory.
* testsuite/Makefile.in: Likewise.
* tools/Makefile.in: Likewise.
* index.html: Converted to xhtml (from lsh repository, change
dated 2012-02-03). Updated git instructions.
......
......@@ -23,7 +23,12 @@ PRE_CPPFLAGS = -I.
LIBTARGETS = libnettle.a @IF_HOGWEED@ libhogweed.a
SHLIBTARGETS = $(LIBNETTLE_FORLINK) @IF_HOGWEED@ $(LIBHOGWEED_FORLINK)
TARGETS = aesdata$(EXEEXT) desdata$(EXEEXT) shadata$(EXEEXT) gcmdata$(EXEEXT)\
getopt_SOURCES = getopt.c getopt1.c
getopt_TARGETS = $(getopt_SOURCES:.c=.$(OBJEXT))
TARGETS = aesdata$(EXEEXT) desdata$(EXEEXT) shadata$(EXEEXT) gcmdata$(EXEEXT) \
$(getopt_TARGETS) \
$(LIBTARGETS) @IF_SHARED@ $(SHLIBTARGETS)
IMPLICIT_TARGETS = @IF_DLL@ $(LIBNETTLE_FILE) $(LIBHOGWEED_FILE)
......@@ -125,9 +130,11 @@ HEADERS = aes.h arcfour.h arctwo.h asn1.h bignum.h blowfish.h \
INSTALL_HEADERS = $(HEADERS) nettle-stdint.h
SOURCES = $(nettle_SOURCES) $(hogweed_SOURCES) aesdata.c desdata.c shadata.c gcmdata.c
SOURCES = $(nettle_SOURCES) $(hogweed_SOURCES) $(getopt_SOURCES) \
aesdata.c desdata.c shadata.c gcmdata.c
DISTFILES = $(SOURCES) $(HEADERS) .bootstrap aclocal.m4 configure.ac \
DISTFILES = $(SOURCES) $(HEADERS) getopt.h .bootstrap run-tests \
aclocal.m4 configure.ac \
configure stamp-h.in \
config.guess config.sub install-sh texinfo.tex \
config.h.in config.m4.in config.make.in Makefile.in \
......
......@@ -18,21 +18,24 @@ RSA_TARGETS = rsa-keygen$(EXEEXT) rsa-sign$(EXEEXT) \
TARGETS = nettle-benchmark$(EXEEXT) eratosthenes$(EXEEXT) @IF_HOGWEED@ $(RSA_TARGETS) next-prime$(EXEEXT) random-prime$(EXEEXT)
SOURCES = nettle-benchmark.c eratosthenes.c next-prime.c random-prime.c \
nettle-openssl.c \
io.c read_rsa_key.c getopt.c getopt1.c \
io.c read_rsa_key.c \
rsa-encrypt.c rsa-decrypt.c rsa-keygen.c rsa-sign.c rsa-verify.c
GETOPT_OBJS = getopt.$(OBJEXT) getopt1.$(OBJEXT)
GETOPT_OBJS = ../getopt.$(OBJEXT) ../getopt1.$(OBJEXT)
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 getopt.h
DISTFILES= $(SOURCES) Makefile.in $(TS_ALL) setup-env teardown-env \
io.h rsa-session.h
all: $(TARGETS)
.c.$(OBJEXT):
$(COMPILE) -c $< && $(DEP_PROCESS)
$(getopt_OBJS):
( cd .. && $(MAKE) $@ )
# For Solaris and BSD make, we have to use an explicit rule for each executable
next-prime$(EXEEXT): next-prime.$(OBJEXT) $(GETOPT_OBJS) ../libhogweed.a
$(LINK) next-prime.$(OBJEXT) $(GETOPT_OBJS) \
......@@ -76,7 +79,7 @@ $(TARGETS) : io.$(OBJEXT) ../libnettle.a
check: $(TS_ALL)
LD_LIBRARY_PATH=../.lib PATH="../.lib:$$PATH" srcdir="$(srcdir)" \
EMULATOR="$(EMULATOR)" EXEEXT="$(EXEEXT)" \
"$(srcdir)"/run-tests $(TS_ALL)
"$(top_srcdir)"/run-tests $(TS_ALL)
Makefile: $(srcdir)/Makefile.in ../config.status
cd .. && $(SHELL) ./config.status examples/$@
......
......@@ -48,7 +48,7 @@ EXTRA_TARGETS = $(EXTRA_SOURCES:.c=$(EXEEXT))
SOURCES = $(TS_SOURCES) testutils.c
DISTFILES = $(SOURCES) $(EXTRA_SOURCES) cxx-test.cxx Makefile.in .test-rules.make \
$(TS_SH) run-tests setup-env teardown-env \
$(TS_SH) setup-env teardown-env \
gold-bug.txt testutils.h
all: $(TARGETS) $(EXTRA_TARGETS)
......@@ -87,10 +87,10 @@ $(TARGETS) $(EXTRA_TARGETS): testutils.$(OBJEXT) \
../libnettle.a @IF_HOGWEED@ ../libhogweed.a
# The PATH update is for locating dlls on w*ndows.
check: $(TS_ALL) $(srcdir)/run-tests
check: $(TS_ALL)
LD_LIBRARY_PATH=../.lib PATH="../.lib:$$PATH" srcdir="$(srcdir)" \
EMULATOR="$(EMULATOR)" NM="$(NM)" EXEEXT="$(EXEEXT)" \
$(srcdir)/run-tests $(TS_ALL)
$(top_srcdir)/run-tests $(TS_ALL)
Makefile: $(srcdir)/Makefile.in ../config.status
......
......@@ -23,28 +23,29 @@ TARGETS = sexp-conv$(EXEEXT) nettle-hash$(EXEEXT) nettle-lfib-stream$(EXEEXT) \
all: $(TARGETS)
sexp_conv_SOURCES = sexp-conv.c input.c output.c parse.c \
getopt.c getopt1.c misc.c
pkcs1_conv_SOURCES = pkcs1-conv.c getopt.c getopt1.c misc.c
nettle_hash_SOURCES = nettle-hash.c getopt.c getopt1.c misc.c
getopt_OBJS = ../getopt.$(OBJEXT) ../getopt1.$(OBJEXT)
sexp_conv_SOURCES = sexp-conv.c input.c output.c parse.c misc.c
pkcs1_conv_SOURCES = pkcs1-conv.c misc.c
nettle_hash_SOURCES = nettle-hash.c misc.c
SOURCES = $(sexp_conv_SOURCES) nettle-hash.c nettle-lfib-stream.c pkcs1-conv.c
DISTFILES = $(SOURCES) Makefile.in getopt.h input.h misc.h output.h parse.h
DISTFILES = $(SOURCES) Makefile.in input.h misc.h output.h parse.h
sexp_conv_OBJS = $(sexp_conv_SOURCES:.c=.$(OBJEXT))
sexp_conv_OBJS = $(sexp_conv_SOURCES:.c=.$(OBJEXT)) $(getopt_OBJS)
sexp-conv$(EXEEXT): $(sexp_conv_OBJS) ../libnettle.a
$(LINK) $(sexp_conv_OBJS) -lnettle $(LIBS) -o $@
nettle-lfib-stream$(EXEEXT): nettle-lfib-stream.$(OBJEXT) ../libnettle.a
$(LINK) nettle-lfib-stream.$(OBJEXT) -lnettle $(LIBS) -o $@
pkcs1_conv_OBJS = $(pkcs1_conv_SOURCES:.c=.$(OBJEXT))
pkcs1_conv_OBJS = $(pkcs1_conv_SOURCES:.c=.$(OBJEXT)) $(getopt_OBJS)
pkcs1-conv$(EXEEXT): $(pkcs1_conv_OBJS) ../libnettle.a ../libhogweed.a
$(LINK) $(pkcs1_conv_OBJS) -lhogweed -lnettle $(LIBS) -o $@
# FIXME: Avoid linking with gmp
nettle_hash_OBJS = $(nettle_hash_SOURCES:.c=.$(OBJEXT))
nettle_hash_OBJS = $(nettle_hash_SOURCES:.c=.$(OBJEXT)) $(getopt_OBJS)
nettle-hash$(EXEEXT): $(nettle_hash_OBJS) ../libnettle.a
$(LINK) $(nettle_hash_OBJS) -lnettle $(LIBS) -o $@
......@@ -52,6 +53,8 @@ nettle-hash$(EXEEXT): $(nettle_hash_OBJS) ../libnettle.a
.c.$(OBJEXT):
$(COMPILE) -c $< && $(DEP_PROCESS)
$(getopt_OBJS):
( cd .. && $(MAKE) $@ )
Makefile: $(srcdir)/Makefile.in ../config.status
cd .. && $(SHELL) ./config.status tools/$@
......
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