1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
From: Tomasz Buchert <tomasz@debian.org>
Date: Thu, 3 Sep 2015 11:16:18 +0200
Subject: include-LDFLAGS-and-CPPFLAGS
The build process should respect {C,LD,CPP}FLAGS.
---
Makefile | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/Makefile b/Makefile
index 4271303..cbd4d47 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,6 @@
-CFLAGS = -O2 -Wall -Wextra -std=c89 -pedantic -D_POSIX_C_SOURCE=200112 # -D NOBEEP
+CFLAGS ?= -O2
+CFLAGS += -Wall -Wextra -std=c89 -pedantic -D_POSIX_C_SOURCE=200112 # -D NOBEEP
+CFLAGS += $(CPPFLAGS)
LIBS = -lgcrypt
default: binaries # doc
@@ -29,9 +31,8 @@ rebuild: clean default
seccure-key: seccure.o numtheory.o ecc.o serialize.o protocol.o curves.o aes256ctr.o
- $(CC) $(CFLAGS) -o seccure-key seccure.o numtheory.o ecc.o \
+ $(CC) $(CFLAGS) $(LDFLAGS) -o seccure-key seccure.o numtheory.o ecc.o \
curves.o serialize.o protocol.o aes256ctr.o $(LIBS)
- strip seccure-key
seccure-encrypt: seccure-key
ln -f seccure-key seccure-encrypt
|