From d4862ff9f733382ea726b0b20dead6e196ab010d Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Tue, 12 Mar 2024 06:50:56 +0100 Subject: [PATCH] build(lib): allow overriding CFLAGS on the commandline If you package tree-sitter for a distribution, the distribution is setting the CFLAGS which should be used for all packages. Allow those flags to be used. Signed-off-by: Andreas Schneider --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index e1164428..f9e62d7e 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,7 @@ OBJ := $(SRC:.c=.o) # define default flags, and override to append mandatory flags ARFLAGS := rcs -CFLAGS := -O3 -Wall -Wextra -Wshadow -pedantic +CFLAGS ?= -O3 -Wall -Wextra -Wshadow -pedantic override CFLAGS += -std=c11 -fPIC -fvisibility=hidden override CFLAGS += -Ilib/src -Ilib/src/wasm -Ilib/include