summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorRaymond Danks <ray.danks@se-eng.com>2012-04-27 08:51:02 -0600
committerStefan Reinauer <stefan.reinauer@coreboot.org>2012-04-28 02:46:54 +0200
commit51b8f05ab3082d8dae5077ff01753d29546f8ce6 (patch)
tree27a139a2ef905ec544d1d4f54845b2240aa0c26f /util
parente9dfdd9dbdbe91cb5754671592ae3d1fc0916f3c (diff)
downloadcoreboot-51b8f05ab3082d8dae5077ff01753d29546f8ce6.tar.xz
ectool: Allow build under Cygwin
To build under Cygwin, ectool depends upon the package ioperm: http://openwince.sourceforge.net/ioperm/ for sys/io.h and sys/perm.h. This change causes the ectool make to correctly include and link against these headers and libraries. Change-Id: I7d54ab5110c2bb1fd21dfa48d56031f3f29cd54e Signed-off-by: Raymond Danks <ray.danks@se-eng.com> Reviewed-on: http://review.coreboot.org/941 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Diffstat (limited to 'util')
-rw-r--r--util/ectool/Makefile7
1 files changed, 6 insertions, 1 deletions
diff --git a/util/ectool/Makefile b/util/ectool/Makefile
index c817395b0f..16a1ce9d10 100644
--- a/util/ectool/Makefile
+++ b/util/ectool/Makefile
@@ -24,10 +24,15 @@ PROGRAM = ectool
INSTALL = /usr/bin/install
PREFIX = /usr/local
+OS_ARCH = $(shell uname -o)
+ifeq ($(OS_ARCH), Cygwin)
+LDFLAGS = -lioperm
+endif
+
all: $(PROGRAM)
$(PROGRAM): ec.o ectool.o
- $(CC) $(CFLAGS) -o $@ $^
+ $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
install: $(PROGRAM)
$(INSTALL) $(PROGRAM) $(PREFIX)/sbin