2 ## SPDX-License-Identifier: GPL-2.0-only
6 CC ?
= $(CROSS_COMPILE
)gcc
7 INSTALL ?
= /usr
/bin
/env
install
11 CFLAGS
+= -Wall
-Wextra
-Wmissing-prototypes
-Wshadow
$(WERROR
)
12 CPPFLAGS
+= -I .
-I
$(ROOT
)/commonlib
/include -I
$(ROOT
)/commonlib
/bsd
/include
13 CPPFLAGS
+= -include $(ROOT
)/commonlib
/bsd
/include/commonlib
/bsd
/compiler.h
22 rm -f
$(PROGRAM
) *.o .dependencies
*~ junit.xml
25 $(INSTALL
) -d
$(DESTDIR
)$(PREFIX
)/sbin
/
26 $(INSTALL
) cbmem
$(DESTDIR
)$(PREFIX
)/sbin
/
31 @
$(CC
) $(CFLAGS
) $(CPPFLAGS
) -MM
*.c
> .dependencies
34 @echo
"${PROGRAM}: View machine's cbmem contents"
35 @echo
"Targets: all, clean, distclean, help, install"
36 @echo
"To disable warnings as errors, run make as:"
37 @echo
" make all WERROR=\"\""
39 .PHONY
: all clean distclean install help
41 -include .dependencies