1 ## SPDX-License-Identifier: GPL-2.0-only
4 CFLAGS
= -O2
-Wall
-Wextra
6 INSTALL
= /usr
/bin
/env
install
8 OS_ARCH
= $(shell uname
)
10 ifeq ($(shell uname
-o
2>/dev
/null
), Cygwin
)
14 ifeq ($(OS_ARCH
), $(filter $(OS_ARCH
), NetBSD OpenBSD
))
15 LDFLAGS
= -l
$(shell uname
-p
)
20 $(PROGRAM
): ec.o ectool.o
21 $(CC
) $(CFLAGS
) -o
$@
$^
$(LDFLAGS
)
24 $(INSTALL
) $(PROGRAM
) $(PREFIX
)/sbin
27 rm -f
*.o
$(PROGRAM
) junit.xml
32 $(CC
) $(CFLAGS
) -c
$^
-I.
-o
$@
34 .PHONY
: all install clean distclean