1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-03-27 10:20:37 +00:00

Including all suggestions made by Gemeni code check. Now includes linking to libbsd (if requested) only if glibc < version 2.38 since glibc >= 2.38 includes strlcat and friends.

This commit is contained in:
Frank Halasz
2026-03-17 23:02:12 -07:00
parent 3430574f61
commit c6f3ba4305
4 changed files with 45 additions and 17 deletions

View File

@@ -4,7 +4,7 @@
ifneq ($(MAKECMDGOALS),clean)
ifneq ($(MAKECMDGOALS),cleanup)
CHK_PKG_CONFIG := $(shell command -v pkg-config)
CHK_PKG_CONFIG := $(shell /bin/sh -c "command -v pkg-config")
ifeq ($(CHK_PKG_CONFIG),)
# pkg-config not found, print an error
$(error "pkg-config not found. Please install it to build this project.")
@@ -12,13 +12,15 @@ ifneq ($(MAKECMDGOALS),clean)
CHK_LIBBSD_DEV := $(shell pkg-config --exists libbsd-overlay && echo true)
ifneq ($(CHK_LIBBSD_DEV),true)
$(error "libbsd-dev (or libbsd-devel) package not found. Please install it to build this project.")
$(error "libbsd-dev (or libbsd-devel) package not found. Please install it to build this project.")
endif
endif
endif
BSD_CFLAGS = $(shell pkg-config --cflags libbsd-overlay)
BSD_CFLAGS := $(shell pkg-config --cflags libbsd-overlay)
BSD_LDFLAGS := $(shell pkg-config --libs libbsd-overlay)
endif # clean
endif # cleanup
BSD_LDFLAGS = $(shell pkg-config --libs libbsd-overlay)