mainboard/dell: Add new mainboard XPS 8300 (Sandy Bridge)
[coreboot.git] / util / cbmem / Makefile
blob0c88aebbbed5a438134101b33abab43e2fd4b67d
1 ##
2 ## SPDX-License-Identifier: GPL-2.0-only
4 PROGRAM = cbmem
5 TOP ?= $(abspath ../..)
6 ROOT = $(TOP)/src
7 COMMONLIB = $(ROOT)/commonlib
8 CC ?= $(CROSS_COMPILE)gcc
9 INSTALL ?= /usr/bin/env install
10 PREFIX ?= /usr/local
11 CFLAGS ?= -O2
12 WERROR=-Werror
13 CFLAGS += -Wall -Wextra -Wmissing-prototypes -Wshadow $(WERROR)
14 CPPFLAGS += -I . -I $(ROOT)/commonlib/include -I $(ROOT)/commonlib/bsd/include
15 CPPFLAGS += -include $(ROOT)/commonlib/bsd/include/commonlib/bsd/compiler.h
17 OBJS = $(PROGRAM).o $(COMMONLIB)/bsd/ipchksum.o
19 all: $(PROGRAM)
21 $(PROGRAM): $(OBJS)
23 clean:
24 rm -f $(PROGRAM) $(OBJS:.c=.o) .dependencies *~ junit.xml
26 install: $(PROGRAM)
27 $(INSTALL) -d $(DESTDIR)$(PREFIX)/sbin/
28 $(INSTALL) cbmem $(DESTDIR)$(PREFIX)/sbin/
30 distclean: clean
32 .dependencies:
33 @$(CC) $(CFLAGS) $(CPPFLAGS) -MM *.c > .dependencies
35 help:
36 @echo "${PROGRAM}: View machine's cbmem contents"
37 @echo "Targets: all, clean, distclean, help, install"
38 @echo "To disable warnings as errors, run make as:"
39 @echo " make all WERROR=\"\""
41 .PHONY: all clean distclean install help
43 -include .dependencies