diff options
author | Przemyslaw Pawelczyk <przemoc@gmail.com> | 2016-01-09 00:44:23 +0100 |
---|---|---|
committer | Przemyslaw Pawelczyk <przemoc@gmail.com> | 2016-01-09 00:44:23 +0100 |
commit | 58955dd621099cfc50a4efdea481bc1fa00e3df0 (patch) | |
tree | db9c2bcaf73c87dcc0b388b3d16a76369911a220 | |
parent | f256eda0f284f727ab2553934d19fdc94f401fa5 (diff) |
Makefile: Link with libbsd only on non-BSD platforms.
BSD platforms are not supported yet, though.
-rw-r--r-- | Makefile | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -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 |