Commit 1ecd65fa authored by Niels Möller's avatar Niels Möller
Browse files

* examples/ (TARGETS): Added eratosthenes and next-prime.

(next-prime, eratosthenes): New rules.
(nettle-benchmark): Don't rely on $@.

Rev: nettle/examples/
parent 40d6c668
......@@ -13,8 +13,8 @@ PRE_LDFLAGS = -L..
RSA_TARGETS = rsa-keygen$(EXEEXT) rsa-sign$(EXEEXT) \
rsa-verify$(EXEEXT) rsa-encrypt$(EXEEXT) rsa-decrypt$(EXEEXT)
SOURCES = nettle-benchmark.c nettle-openssl.c \
TARGETS = nettle-benchmark$(EXEEXT) eratosthenes$(EXEEXT) @IF_HOGWEED@ $(RSA_TARGETS) next-prime$(EXEEXT)
SOURCES = nettle-benchmark.c eratosthenes.c nettle-openssl.c \
io.c read_rsa_key.c getopt.c getopt1.c \
rsa-encrypt.c rsa-decrypt.c rsa-keygen.c rsa-sign.c rsa-verify.c
......@@ -31,6 +31,10 @@ all: $(TARGETS)
$(COMPILE) -c $< && $(DEP_PROCESS)
# 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) \
-lhogweed $(LIBS) -o next-prime$(EXEEXT)
rsa-keygen$(EXEEXT): rsa-keygen.$(OBJEXT) $(GETOPT_OBJS)
$(LINK) rsa-keygen.$(OBJEXT) io.$(OBJEXT) $(GETOPT_OBJS) \
-lhogweed -lnettle $(LIBS) -o rsa-keygen$(EXEEXT)
......@@ -52,9 +56,12 @@ rsa-decrypt$(EXEEXT): rsa-decrypt.$(OBJEXT) read_rsa_key.$(OBJEXT)
$(LINK) rsa-decrypt.$(OBJEXT) io.$(OBJEXT) read_rsa_key.$(OBJEXT) \
-lhogweed -lnettle $(LIBS) -o rsa-decrypt$(EXEEXT)
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 $(LIBS) $(OPENSSL_LIBFLAGS) -o $@
-lnettle $(LIBS) $(OPENSSL_LIBFLAGS) -o nettle-benchmark$(EXEEXT)
$(TARGETS) : io.$(OBJEXT) ../libnettle.a
Supports Markdown
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