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>
This commit is contained in:
Raymond Danks 2012-04-27 08:51:02 -06:00 committed by Stefan Reinauer
parent e9dfdd9dbd
commit 51b8f05ab3
1 changed files with 6 additions and 1 deletions

View File

@ -24,10 +24,15 @@ PROGRAM = ectool
INSTALL = /usr/bin/install INSTALL = /usr/bin/install
PREFIX = /usr/local PREFIX = /usr/local
OS_ARCH = $(shell uname -o)
ifeq ($(OS_ARCH), Cygwin)
LDFLAGS = -lioperm
endif
all: $(PROGRAM) all: $(PROGRAM)
$(PROGRAM): ec.o ectool.o $(PROGRAM): ec.o ectool.o
$(CC) $(CFLAGS) -o $@ $^ $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
install: $(PROGRAM) install: $(PROGRAM)
$(INSTALL) $(PROGRAM) $(PREFIX)/sbin $(INSTALL) $(PROGRAM) $(PREFIX)/sbin