diff options
author | Christian Seiler <christian@iwakd.de> | 2015-05-28 18:33:21 +0200 |
---|---|---|
committer | Mike Christie <michaelc@cs.wisc.edu> | 2015-06-05 14:06:55 -0500 |
commit | da2473dc01bd5d6c4909e61d3b00284e5535f2ca (patch) | |
tree | a3bdccfda13f1ae645d34af325766771eadf66b7 /Makefile | |
parent | 4a4498b3379599c25d5276dee84b328840ce969e (diff) | |
download | open-iscsi-da2473dc01bd5d6c4909e61d3b00284e5535f2ca.tar.gz |
buildsys: respect CFLAGS and LDFLAGS from the outside
Make the build systsem respect CFLAGS and LDFLAGS set from the outside.
Previously, OPTFLAGS could be set to alter CFLAGS (which were
overridden completely), but that is non-standard, so also check for
user-set CFLAGS. This will make life easier when packaging this for
distributions. If OPTFLAGS is set, prefer that to CFLAGS to retain the
old behavior in that case (and not break current builds).
Additionally, also use LDFLAGS for linking the binaries, which was not
respected at all previously.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -20,6 +20,17 @@ INSTALL = install ETCFILES = etc/iscsid.conf IFACEFILES = etc/iface.example +# Compatibility: parse old OPTFLAGS argument +ifdef OPTFLAGS +CFLAGS = $(OPTFLAGS) +endif + +# Export it so configure of iscsiuio & open-isns will +# pick it up. +ifneq (,$(CFLAGS)) +export CFLAGS +endif + # Random comments: # using '$(MAKE)' instead of just 'make' allows make to run in parallel # over multiple makefile. @@ -44,7 +55,7 @@ user: utils/open-isns/Makefile iscsiuio/Makefile @echo "Read README file for detailed information." utils/open-isns/Makefile: utils/open-isns/configure utils/open-isns/Makefile.in - cd utils/open-isns; ./configure CFLAGS="$(OPTFLAGS)" --with-security=no + cd utils/open-isns; ./configure --with-security=no iscsiuio/Makefile: iscsiuio/configure iscsiuio/Makefile.in cd iscsiuio; ./configure |