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:
parent
e9dfdd9dbd
commit
51b8f05ab3
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue