From 58955dd621099cfc50a4efdea481bc1fa00e3df0 Mon Sep 17 00:00:00 2001 From: Przemyslaw Pawelczyk Date: Sat, 9 Jan 2016 00:44:23 +0100 Subject: [PATCH] Makefile: Link with libbsd only on non-BSD platforms. BSD platforms are not supported yet, though. --- Makefile | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Makefile b/Makefile index 5c54f70..8d84b6c 100644 --- a/Makefile +++ b/Makefile @@ -19,12 +19,21 @@ # PROJ_DIR := $(dir $(lastword $(MAKEFILE_LIST))) METASTORE_VER := $(shell "$(PROJ_DIR)"/version.sh) +UNAME_S := $(shell uname -s) CC = gcc CFLAGS += -g -Wall -pedantic -std=c99 -D_FILE_OFFSET_BITS=64 -O2 CFLAGS += -DMETASTORE_VER="\"$(METASTORE_VER)\"" LDFLAGS += + +ifeq ($(findstring BSD,$(UNAME_S)),) +ifneq (DragonFly,$(UNAME_S)) +ifneq (Darwin,$(UNAME_S)) LIBS += -lbsd +endif +endif +endif + INCLUDES = INSTALL = install INSTALL_PROGRAM = ${INSTALL} -c -- 2.11.4.GIT