summaryrefslogtreecommitdiff
path: root/util/ectool/Makefile
diff options
context:
space:
mode:
authorAndrey Korolyov <andrey@xdel.ru>2016-01-05 14:27:59 +0300
committerPatrick Georgi <pgeorgi@google.com>2016-01-27 17:15:56 +0100
commit393d9322ba51feeea33cd08f77945f593cb70e32 (patch)
treedde365c28462b404b923ec5067f6d97e139747bb /util/ectool/Makefile
parentffc2260d749a1774a79805ec51bcb67021c07c28 (diff)
ectool: fix NetBSD compilation
Since NetBSD does not support uname -o, push check for CygWin inside separate non-failing condition in Makefile. Change-Id: Ibd264384f49b33412f0ef8554bd9c9fb8f60a892 Signed-off-by: Andrey Korolyov <andrey@xdel.ru> Reviewed-on: https://review.coreboot.org/12831 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'util/ectool/Makefile')
-rw-r--r--util/ectool/Makefile8
1 files changed, 6 insertions, 2 deletions
diff --git a/util/ectool/Makefile b/util/ectool/Makefile
index a869577da6..8aa1415a56 100644
--- a/util/ectool/Makefile
+++ b/util/ectool/Makefile
@@ -19,12 +19,16 @@ CFLAGS = -O2 -Wall -W
PROGRAM = ectool
INSTALL = /usr/bin/install
PREFIX = /usr/local
+OS_ARCH = $(shell uname)
-OS_ARCH = $(shell uname -o)
-ifeq ($(OS_ARCH), Cygwin)
+ifeq ($(shell uname -o 2>/dev/null), Cygwin)
LDFLAGS = -lioperm
endif
+ifeq ($(OS_ARCH), NetBSD)
+LDFLAGS = -l$(shell uname -p)
+endif
+
all: $(PROGRAM)
$(PROGRAM): ec.o ectool.o