From: "Diego 'Flameeyes' Pettenò" <flameeyes@gmail.com>
To: linux-wireless@vger.kernel.org
Subject: [crda PATCH 3/5] Make it possible to switch gcrypt/openssl via knob.
Date: Mon, 01 Dec 2008 11:31:07 +0100 [thread overview]
Message-ID: <20081201103107.18024.38565.stgit@localhost> (raw)
In-Reply-To: <20081201103016.18024.80454.stgit@localhost>
=46rom: Diego E. 'Flameeyes' Petten=C3=B2 <flameeyes@gmail.com>
By building with "make USE_OPENSSL=3D1", OpenSSL will be used in
libcrypt's stead. This also allows for properly depend just on the
keys-*.c source file that is actually going to be used.
Note that the all target is moved up so that it still hits as default
target.
Signed-off-by: Diego E. 'Flameeyes' Petten=C3=B2 <flameeyes@gmail.com>
---
Makefile | 22 +++++++++++++++-------
1 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/Makefile b/Makefile
index ec06534..4ac8495 100644
--- a/Makefile
+++ b/Makefile
@@ -6,11 +6,24 @@ REG_BIN?=3D/usr/lib/crda/regulatory.bin
PUBKEY_DIR=3Dpubkeys
=20
CFLAGS +=3D -Wall -g
-#CFLAGS +=3D -DUSE_OPENSSL `pkg-config --cflags openssl`
-#LDLIBS +=3D `pkg-config --libs openssl`
+
+all: crda intersect
+ $(Q)$(MAKE) --no-print-directory -f Makefile verify
+
+ifeq ($(USE_OPENSSL),1)
+CFLAGS +=3D -DUSE_OPENSSL `pkg-config --cflags openssl`
+LDLIBS +=3D `pkg-config --libs openssl`
+
+reglib.o: keys-ssl.c
+
+else
CFLAGS +=3D -DUSE_GCRYPT
LDLIBS +=3D -lgcrypt
=20
+reglib.o: keys-gcrypt.c
+
+endif
+
MKDIR ?=3D mkdir -p
INSTALL ?=3D install
=20
@@ -22,9 +35,6 @@ Q=3D@
NQ=3D@echo
endif
=20
-all: crda intersect
- $(Q)$(MAKE) --no-print-directory -f Makefile verify
-
keys-%.c: utils/key2pub.py $(PUBKEY_DIR)/$(wildcard *.pem)
$(NQ) ' GEN ' $@
$(Q)./utils/key2pub.py --$* $(PUBKEY_DIR)/*.pem > $@
@@ -33,8 +43,6 @@ keys-%.c: utils/key2pub.py $(PUBKEY_DIR)/$(wildcard *=
=2Epem)
$(NQ) ' CC ' $@
$(Q)$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
=20
-reglib.o: keys-ssl.c keys-gcrypt.c
-
crda: reglib.o crda.o
$(NQ) ' LD ' $@
$(Q)$(CC) $(CFLAGS) $(LDFLAGS) -o $@ reglib.o crda.o `pkg-config --li=
bs libnl-1` $(LDLIBS)
--
To unsubscribe from this list: send the line "unsubscribe linux-wireles=
s" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2008-12-01 10:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-01 10:30 [crda PATCH 0/5] Makefile improvement and fixes Diego 'Flameeyes' Pettenò
2008-12-01 10:30 ` [crda PATCH 1/5] Fix building with --as-needed LD flag Diego 'Flameeyes' Pettenò
2008-12-01 10:30 ` [crda PATCH 2/5] Fix dependencies for parallel make and others Diego 'Flameeyes' Pettenò
2008-12-01 10:31 ` Diego 'Flameeyes' Pettenò [this message]
2008-12-01 10:31 ` [crda PATCH 4/5] Don't use recursive make for verify target Diego 'Flameeyes' Pettenò
2008-12-01 10:31 ` [crda PATCH 5/5] Ignore built files Diego 'Flameeyes' Pettenò
2008-12-01 22:35 ` [crda PATCH 0/5] Makefile improvement and fixes Luis R. Rodriguez
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20081201103107.18024.38565.stgit@localhost \
--to=flameeyes@gmail.com \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.