1 ## SPDX-License-Identifier: GPL-2.0-only
5 CFLAGS
= -O2
-Wall
-Wextra
-Wshadow
$(WERROR
)
7 INSTALL ?
= /usr
/bin
/env
install
9 OS_ARCH ?
= $(shell uname
)
11 ifeq ($(shell uname
-o
2>/dev
/null
), Cygwin
)
15 ifeq ($(OS_ARCH
), $(filter $(OS_ARCH
), NetBSD OpenBSD
))
16 LDFLAGS
= -l
$(shell uname
-p
)
21 $(PROGRAM
): ec.o ectool.o
22 $(CC
) $(CFLAGS
) -o
$@
$^
$(LDFLAGS
)
25 $(INSTALL
) -d
$(DESTDIR
)$(PREFIX
)/sbin
26 $(INSTALL
) $(PROGRAM
) $(DESTDIR
)$(PREFIX
)/sbin
29 rm -f
*.o
$(PROGRAM
) junit.xml
34 $(CC
) $(CFLAGS
) -c
$^
-I.
-o
$@
37 @echo
"${PROGRAM}: Dump RAM of Embedded Controller (EC)"
38 @echo
"Targets: all, clean, distclean, help, install"
39 @echo
"To disable warnings as errors, run make as:"
40 @echo
" make all WERROR=\"\""
42 .PHONY
: all clean distclean help
install