$(CPPFLAGS) and $(LDFLAGS). This mechanism replaces $(INCLUDES).
* examples/Makefile.in (PRE_CPPFLAGS, PRE_LDFLAGS): Use these
flags to get -I.. and -L.. early on the command line.
* testsuite/Makefile.in: Likewise
* tools/Makefile.in: Likewise.
Rev: src/nettle/ChangeLog:1.283
Rev: src/nettle/config.make.in:1.4
Rev: src/nettle/examples/Makefile.in:1.4
Rev: src/nettle/testsuite/Makefile.in:1.4
Rev: src/nettle/tools/Makefile.in:1.5
+2004-10-20 Niels Möller <nisse@lysator.liu.se>
+
+ * config.make.in: Insert $(PRE_CPPFLAGS) and $(PRE_LDFLAGS) before
+ $(CPPFLAGS) and $(LDFLAGS). This mechanism replaces $(INCLUDES).
+
+ * examples/Makefile.in (PRE_CPPFLAGS, PRE_LDFLAGS): Use these
+ flags to get -I.. and -L.. early on the command line.
+ * testsuite/Makefile.in: Likewise
+ * tools/Makefile.in: Likewise.
+
2004-10-20 Niels Möller <niels@s3.kth.se>
* Makefile.in: In the assembler rules, there's no need to look in
includedir = @includedir@
infodir = @infodir@
-COMPILE = $(CC) $(CPPFLAGS) $(INCLUDES) $(DEFS) $(CFLAGS) $(CCPIC) $(DEP_FLAGS)
-LINK = $(CC) $(CFLAGS) $(LDFLAGS)
+# PRE_CPPFLAGS and PRE_LDFLAGS lets each Makefile.in prepend its own
+# flags before CPPFLAGS and LDFLAGS.
+
+COMPILE = $(CC) $(PRE_CPPFLAGS) $(CPPFLAGS) $(DEFS) $(CFLAGS) $(CCPIC) $(DEP_FLAGS)
+LINK = $(CC) $(CFLAGS) $(PRE_LDFLAGS) $(LDFLAGS)
# Disable builtin rule
%$(EXEEXT) : %.c
include ../config.make
-INCLUDES = -I.. -I$(top_srcdir)
+PRE_CPPFLAGS = -I.. -I$(top_srcdir)
+PRE_LDFLAGS = -L..
OPENSSL_LIBFLAGS = @OPENSSL_LIBFLAGS@
TARGETS = nettle-benchmark @RSA_EXAMPLES@
all: $(TARGETS)
.c.$(OBJEXT):
- $(COMPILE) -I.. -c $<
+ $(COMPILE) -c $<
.o$(EXEEXT):
- $(LINK) $^ $(LIBS) -L.. -lnettle -o $@
+ $(LINK) $^ -lnettle $(LIBS) -o $@
nettle-benchmark: nettle-benchmark.o nettle-openssl.o ../libnettle.a
- $(LINK) $^ $(LIBS) -L.. -lnettle $(OPENSSL_LIBFLAGS) -o $@
+ $(LINK) $^ -lnettle $(LIBS) $(OPENSSL_LIBFLAGS) -o $@
$(TARGETS) : io.o ../libnettle.a
include ../config.make
-INCLUDES = -I.. -I$(top_srcdir)
+PRE_CPPFLAGS = -I.. -I$(top_srcdir)
+PRE_LDFLAGS = -L..
TS_SOURCES = aes-test.c arcfour-test.c arctwo-test.c \
blowfish-test.c cast128-test.c \
$(COMPILE) -I.. -c $< && $(DEP_PROCESS)
.o$(EXEEXT):
- $(LINK) $< testutils.o $(LIBS) -L.. -lnettle -o $@
+ $(LINK) $< testutils.o -lnettle $(LIBS) -o $@
# .c$(EXEEXT):
# $(COMPILE) -I..
# $(CC) $(CFLAGS) $(LDFLAGS) $*.o testutils.o -L.. -lnettle $(LIBS) -o $@
include ../config.make
-INCLUDES = -I.. -I$(top_srcdir)
+PRE_CPPFLAGS = -I.. -I$(top_srcdir)
+PRE_LDFLAGS = -L..
TARGETS = sexp-conv nettle-lfib-stream
DISTFILES = $(SOURCES) Makefile.in getopt.h input.h misc.h output.h parse.h
sexp-conv: $(sexp_conv_SOURCES:.c=.$(OBJEXT)) ../libnettle.a
- $(LINK) $^ $(LIBS) -L.. -lnettle -o $@
+ $(LINK) $^ -lnettle $(LIBS) -o $@
nettle-lfib-stream: nettle-lfib-stream.$(OBJEXT) ../libnettle.a
- $(LINK) $^ $(LIBS) -L.. -lnettle -o $@
+ $(LINK) $^ -lnettle $(LIBS) -o $@
.c.$(OBJEXT):
$(COMPILE) -c $< && $(DEP_PROCESS)