mb/ocp/deltalake: Configure FSP DCI via VPD
[coreboot.git] / util / ectool / Makefile
blob75504c73b6d8378087a3702f690e481f3ae34211
1 ## SPDX-License-Identifier: GPL-2.0-only
3 CC = gcc
4 CFLAGS = -O2 -Wall -Wextra
5 PROGRAM = ectool
6 INSTALL = /usr/bin/env install
7 PREFIX = /usr/local
8 OS_ARCH = $(shell uname)
10 ifeq ($(shell uname -o 2>/dev/null), Cygwin)
11 LDFLAGS = -lioperm
12 endif
14 ifeq ($(OS_ARCH), $(filter $(OS_ARCH), NetBSD OpenBSD))
15 LDFLAGS = -l$(shell uname -p)
16 endif
18 all: $(PROGRAM)
20 $(PROGRAM): ec.o ectool.o
21 $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
23 install: $(PROGRAM)
24 $(INSTALL) $(PROGRAM) $(PREFIX)/sbin
26 clean:
27 rm -f *.o $(PROGRAM) junit.xml
29 distclean: clean
31 %.o: %.c
32 $(CC) $(CFLAGS) -c $^ -I. -o $@
34 .PHONY: all install clean distclean