summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJean Delvare <jdelvare@suse.de>2015-06-17 20:28:11 +0000
committerJean Delvare <jdelvare@suse.de>2015-06-17 20:28:11 +0000
commit272ec325c69be63591183f2d4b4c672cab42bae1 (patch)
treef0ecf8fd7ecbb92cbd8765ad8aa7f4641c1e2019 /Makefile
parent2cbd9b5d758c9c83308fa2d126f0aa86e12ccbac (diff)
downloadi2c-tools-git-272ec325c69be63591183f2d4b4c672cab42bae1.tar.gz
Enable static use of libi2c
When debugging embedded systems, it is often nice to simply TFTP the desired i2ctool to the target without the hazzle of dealing with shared libs. Using -static is overkill, too, so let's add a switch which will only link functions from libi2c statically. git-svn-id: http://lm-sensors.org/svn/i2c-tools/trunk@6289 7894878c-1315-0410-8ee3-d5d059ff63e0
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 4 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 252a126..3b49bd4 100644
--- a/Makefile
+++ b/Makefile
@@ -32,7 +32,11 @@ CFLAGS ?= -O2
CFLAGS += -Wall
SOCFLAGS := -fpic -D_REENTRANT $(CFLAGS)
+USE_STATIC_LIB ?= 0
BUILD_STATIC_LIB ?= 1
+ifeq ($(USE_STATIC_LIB),1)
+BUILD_STATIC_LIB := 1
+endif
KERNELVERSION := $(shell uname -r)