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

(GETOPT_OBJS): New variable.

(rsa-keygen, rsa-encrypt, nettle-benchmark): Depend on and link
with $(GETOPT_OBJS).

Rev: src/nettle/examples/
parent 7d434e71
...@@ -16,6 +16,8 @@ SOURCES = nettle-benchmark.c nettle-openssl.c \ ...@@ -16,6 +16,8 @@ SOURCES = nettle-benchmark.c nettle-openssl.c \
io.c getopt.c getopt1.c \ io.c getopt.c getopt1.c \
rsa-encrypt.c rsa-decrypt.c rsa-keygen.c rsa-sign.c rsa-verify.c rsa-encrypt.c rsa-decrypt.c rsa-keygen.c rsa-sign.c rsa-verify.c
GETOPT_OBJS = getopt.$(OBJEXT) getopt1.$(OBJEXT)
TS_ALL = rsa-sign-test rsa-verify-test rsa-encrypt-test TS_ALL = rsa-sign-test rsa-verify-test rsa-encrypt-test
DISTFILES= $(SOURCES) $(TS_ALL) run-tests setup-env teardown-env \ DISTFILES= $(SOURCES) $(TS_ALL) run-tests setup-env teardown-env \
...@@ -27,8 +29,8 @@ all: $(TARGETS) ...@@ -27,8 +29,8 @@ all: $(TARGETS)
$(COMPILE) -c $< && $(DEP_PROCESS) $(COMPILE) -c $< && $(DEP_PROCESS)
# For Solaris and BSD make, we have to use an explicit rule for each executable # For Solaris and BSD make, we have to use an explicit rule for each executable
rsa-keygen$(EXEEXT): rsa-keygen.$(OBJEXT) rsa-keygen$(EXEEXT): rsa-keygen.$(OBJEXT) $(GETOPT_OBJS)
$(LINK) rsa-keygen.$(OBJEXT) io.$(OBJEXT) \ $(LINK) rsa-keygen.$(OBJEXT) io.$(OBJEXT) $(GETOPT_OBJS) \
-lnettle $(LIBS) -o rsa-keygen$(EXEEXT) -lnettle $(LIBS) -o rsa-keygen$(EXEEXT)
rsa-sign$(EXEEXT): rsa-sign.$(OBJEXT) rsa-sign$(EXEEXT): rsa-sign.$(OBJEXT)
...@@ -39,19 +41,16 @@ rsa-verify$(EXEEXT): rsa-verify.$(OBJEXT) ...@@ -39,19 +41,16 @@ rsa-verify$(EXEEXT): rsa-verify.$(OBJEXT)
$(LINK) rsa-verify.$(OBJEXT) io.$(OBJEXT) \ $(LINK) rsa-verify.$(OBJEXT) io.$(OBJEXT) \
-lnettle $(LIBS) -o rsa-verify$(EXEEXT) -lnettle $(LIBS) -o rsa-verify$(EXEEXT)
rsa-encrypt$(EXEEXT): rsa-encrypt.$(OBJEXT) rsa-encrypt$(EXEEXT): rsa-encrypt.$(OBJEXT) $(GETOPT_OBJS)
$(LINK) rsa-encrypt.$(OBJEXT) io.$(OBJEXT) \ $(LINK) rsa-encrypt.$(OBJEXT) io.$(OBJEXT) $(GETOPT_OBJS) \
-lnettle $(LIBS) -o rsa-encrypt$(EXEEXT) -lnettle $(LIBS) -o rsa-encrypt$(EXEEXT)
rsa-decrypt$(EXEEXT): rsa-decrypt.$(OBJEXT) rsa-decrypt$(EXEEXT): rsa-decrypt.$(OBJEXT)
$(LINK) rsa-decrypt.$(OBJEXT) io.$(OBJEXT) \ $(LINK) rsa-decrypt.$(OBJEXT) io.$(OBJEXT) \
-lnettle $(LIBS) -o rsa-decrypt$(EXEEXT) -lnettle $(LIBS) -o rsa-decrypt$(EXEEXT)
# .$(OBJEXT)$(EXEEXT): nettle-benchmark$(EXEEXT): nettle-benchmark.$(OBJEXT) nettle-openssl.$(OBJEXT) $(GETOPT_OBJS)
# $(LINK) $< io.$(OBJEXT) -lnettle $(LIBS) -o $@ $(LINK) nettle-benchmark.$(OBJEXT) nettle-openssl.$(OBJEXT) io.$(OBJEXT) $(GETOPT_OBJS) \
nettle-benchmark$(EXEEXT): nettle-benchmark.$(OBJEXT) nettle-openssl.$(OBJEXT)
$(LINK) nettle-benchmark.$(OBJEXT) nettle-openssl.$(OBJEXT) io.$(OBJEXT) \
-lnettle $(LIBS) $(OPENSSL_LIBFLAGS) -o $@ -lnettle $(LIBS) $(OPENSSL_LIBFLAGS) -o $@
$(TARGETS) : io.$(OBJEXT) ../libnettle.a $(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