build: use config.site in place of hard coded flags variables.
Signed-off-by: Philip Tricca <[email protected]>
diff --git a/ChangeLog b/ChangeLog
index c2fa9d6..91fc59d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Unreleased
+Changed
+* Move default compiler flags to config.site file.
+
2015-07-28 Will Arthur <[email protected]>
* 0.98 release
* Added ability for resource manager to communicate with a real TPM via
diff --git a/INSTALL b/INSTALL
index bde2d90..9cc08a8 100644
--- a/INSTALL
+++ b/INSTALL
@@ -13,10 +13,14 @@
must clone them from the 01.org GitHub organization TPM2.0-TSS git repository:
git clone https://github.com/01org/TPM2.0-TSS
-To compile tpm2.0-tss execute the following commands from the root of the
-source directory:
+To configure the tpm2.0-tss source code first define the environment for your
+build using a config.site file. The default for the project is kept at
+lib/config.site. Pass this environment to the build through the CONFIG_SITE
+variable:
$ ./bootstrap
-$ ./configure
+$ ./configure CONFIG_SITE=$(pwd)/lib/config.site
+
+Then compile the code:
$ make
We now have basic VPATH support which allows us to separate the source
diff --git a/Makefile.am b/Makefile.am
index 8035ea6..51b1b12 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -29,10 +29,8 @@
include src_vars.mk
ACLOCAL_AMFLAGS = -I m4
-AM_CPPFLAGS = -I$(srcdir)/include
-ERR_FLAGS = -Wall -Werror
-AM_CFLAGS = $(ERR_FLAGS)
-AM_CXXFLAGS = $(ERR_FLAGS)
+AM_CFLAGS = -I$(srcdir)/include
+AM_CXXFLAGS = $(AM_CFLAGS)
# stuff to build, what that stuff is, and where/if to install said stuff
sbin_PROGRAMS = $(resourcemgr)
diff --git a/lib/default_config.site b/lib/default_config.site
new file mode 100644
index 0000000..7a7f2aa
--- /dev/null
+++ b/lib/default_config.site
@@ -0,0 +1,2 @@
+CFLAGS="-Wall -Werror"
+CXXFLAGS="-Wall -Werror"