summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Schier <nicolas@fjasle.eu>2019-11-27 21:16:12 +0100
committerJoey Hess <joeyh@joeyh.name>2019-11-29 13:11:29 -0400
commit6c88aaa6b828d7bd7c1dccb3b842594d48c1764c (patch)
tree0553f081a10f4a48e3d8caf778067de729eab047
parentaeddd0f4caa9d10aaa691040773fa4764e12ff46 (diff)
downloadmoreutils-6c88aaa6b828d7bd7c1dccb3b842594d48c1764c.tar.gz
is_utf8: allow propagation of compiler and linker flags
Allow propagating compiler and linker flags via overrides of CFLAGS and LDFLAGS variables. This allows enabling of hardening flags w/o modification of the original Makefile. Signed-off-by: Nicolas Schier <nicolas@fjasle.eu>
-rw-r--r--is_utf8/Makefile6
1 files changed, 3 insertions, 3 deletions
diff --git a/is_utf8/Makefile b/is_utf8/Makefile
index 4ebf8be..13b1021 100644
--- a/is_utf8/Makefile
+++ b/is_utf8/Makefile
@@ -38,13 +38,13 @@ SONAME = $(LINKERNAME).$(VERSION)
REALNAME = $(SONAME).$(MINOR).$(RELEASE)
CC = gcc
-CFLAGS = -O3 -Wextra -Wall -ansi -Wstrict-prototypes
+CFLAGS ?= -O3 -Wextra -Wall -ansi -Wstrict-prototypes
$(NAME): $(OBJ)
- $(CC) $(CFLAGS) -o $(NAME) $(OBJ)
+ $(CC) $(CFLAGS) -o $(NAME) $(OBJ) $(LDFLAGS)
IS_UTF8_LIB:
- $(CC) --shared -fPIC $(CFLAGS) $(LIB_SRC) -o $(LINKERNAME)
+ $(CC) --shared -fPIC $(CFLAGS) $(LDFLAGS) $(LIB_SRC) -o $(LINKERNAME)
all:
@make $(NAME)