diff options
author | Wolfram Sang <wsa@kernel.org> | 2020-08-05 23:57:12 +0200 |
---|---|---|
committer | Wolfram Sang <wsa@kernel.org> | 2020-08-10 12:05:48 +0200 |
commit | 162ed6c94528d743ee94cfd209a2e866c4f7d77a (patch) | |
tree | e15da3551105ea0746d93ae40b4d795d8aa1da32 | |
parent | 0cadafa030496f913dc44ace38513dc57db15c4e (diff) | |
download | i2c-tools-162ed6c94528d743ee94cfd209a2e866c4f7d77a.tar.gz |
allow to preset custom CFLAGS and LDFLAGS
Sometimes I need to add some flags (like -static for the linker), so
allow this for all CFLAGS and LDFLAGS used in this project.
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Acked-by: Jean Delvare <jdelvare@suse.de>
-rw-r--r-- | CHANGES | 1 | ||||
-rw-r--r-- | eeprog/Module.mk | 6 | ||||
-rw-r--r-- | lib/Module.mk | 2 | ||||
-rw-r--r-- | tools/Module.mk | 6 |
4 files changed, 8 insertions, 7 deletions
@@ -2,6 +2,7 @@ i2c-tools CHANGES ----------------- master + Makefile: allow to preset all CFLAGS and LDFLAGS variables tools: Consistently use snprintf instead of sprintf Restrict addresses 0x03-0x07, too (defined by I2C standard) decode-dimms: Print SPD revision for DDR3 too diff --git a/eeprog/Module.mk b/eeprog/Module.mk index ac3a368..3f442aa 100644 --- a/eeprog/Module.mk +++ b/eeprog/Module.mk @@ -7,11 +7,11 @@ EEPROG_DIR := eeprog -EEPROG_CFLAGS := -Iinclude +EEPROG_CFLAGS += -Iinclude ifeq ($(USE_STATIC_LIB),1) -EEPROG_LDFLAGS := $(LIB_DIR)/$(LIB_STLIBNAME) +EEPROG_LDFLAGS += $(LIB_DIR)/$(LIB_STLIBNAME) else -EEPROG_LDFLAGS := -L$(LIB_DIR) -li2c +EEPROG_LDFLAGS += -L$(LIB_DIR) -li2c endif EEPROG_TARGETS := eeprog diff --git a/lib/Module.mk b/lib/Module.mk index 46a1c91..6727de7 100644 --- a/lib/Module.mk +++ b/lib/Module.mk @@ -9,7 +9,7 @@ LIB_DIR := lib -LIB_CFLAGS := -Wstrict-prototypes -Wshadow -Wpointer-arith -Wcast-qual \ +LIB_CFLAGS += -Wstrict-prototypes -Wshadow -Wpointer-arith -Wcast-qual \ -Wcast-align -Wwrite-strings -Wnested-externs -Winline \ -W -Wundef -Wmissing-prototypes -Iinclude diff --git a/tools/Module.mk b/tools/Module.mk index 693102f..f5b133d 100644 --- a/tools/Module.mk +++ b/tools/Module.mk @@ -9,13 +9,13 @@ TOOLS_DIR := tools -TOOLS_CFLAGS := -Wstrict-prototypes -Wshadow -Wpointer-arith -Wcast-qual \ +TOOLS_CFLAGS += -Wstrict-prototypes -Wshadow -Wpointer-arith -Wcast-qual \ -Wcast-align -Wwrite-strings -Wnested-externs -Winline \ -W -Wundef -Wmissing-prototypes -Iinclude ifeq ($(USE_STATIC_LIB),1) -TOOLS_LDFLAGS := $(LIB_DIR)/$(LIB_STLIBNAME) +TOOLS_LDFLAGS += $(LIB_DIR)/$(LIB_STLIBNAME) else -TOOLS_LDFLAGS := -L$(LIB_DIR) -li2c +TOOLS_LDFLAGS += -L$(LIB_DIR) -li2c endif TOOLS_TARGETS := i2cdetect i2cdump i2cset i2cget i2ctransfer |