$NetBSD: patch-Makefile,v 1.7 2025/02/02 15:54:45 wiz Exp $ - Avoid to possibly pass extra optimization CFLAGS - Do not override PCLIBDIR for FreeBSD, NetBSD and DragonFly --- Makefile.orig 2025-02-01 02:11:10.000000000 +0000 +++ Makefile @@ -25,7 +25,7 @@ OBJ := $(SRC:.c=.o) # define default flags, and override to append mandatory flags ARFLAGS := rcs -CFLAGS ?= -O3 -Wall -Wextra -Wshadow -Wpedantic -Werror=incompatible-pointer-types +CFLAGS ?= -Wall -Wextra -Wshadow -Wpedantic -Werror=incompatible-pointer-types override CFLAGS += -std=c11 -fPIC -fvisibility=hidden override CFLAGS += -D_POSIX_C_SOURCE=200112L -D_DEFAULT_SOURCE override CFLAGS += -Ilib/src -Ilib/src/wasm -Ilib/include @@ -46,9 +46,6 @@ else SOEXTVER = $(SOEXT).$(SONAME_MAJOR).$(SONAME_MINOR) LINKSHARED += -shared -Wl,-soname,libtree-sitter.$(SOEXTVER) endif -ifneq ($(filter $(shell uname),FreeBSD NetBSD DragonFly),) - PCLIBDIR := $(PREFIX)/libdata/pkgconfig -endif all: libtree-sitter.a libtree-sitter.$(SOEXT) tree-sitter.pc