When updating the Makefiles, to keep from having to update two files at the same time, import Makefile.mk into the external Makefile. This allows the bulk of the settings to be in a single location. While I'm here, I adjusted the print statements to match the rest of coreboot. Change-Id: Id5b869f49b34b22e6a02fc086e7b42975141a87e Signed-off-by: Martin Roth <gaumless@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/80715 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
38 lines
748 B
Makefile
38 lines
748 B
Makefile
# SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
top ?= $(abspath ../..)
|
|
ifneq ($(CC),)
|
|
HOSTCC ?= $(CC)
|
|
else
|
|
HOSTCC ?= cc
|
|
endif
|
|
|
|
TARGETS = amdfwread amdfwtool
|
|
|
|
all: $(TARGETS)
|
|
|
|
BUILD_ALL_TOOLS = 1
|
|
include ./Makefile.mk
|
|
|
|
amdfwread: $(amdfwreadobj)
|
|
$(HOSTCC) $(amdfwreadobj) $(LDFLAGS) -o $@
|
|
|
|
amdfwtool: $(amdfwtoolobj)
|
|
$(HOSTCC) $(amdfwtoolobj) $(LDFLAGS) -o $@
|
|
|
|
%.o: %.c $(amdfwheader)
|
|
$(HOSTCC) $(AMDFWTOOLCFLAGS) -c -o $@ $<
|
|
|
|
clean:
|
|
@rm -f $(TARGETS) $(amdfwreadobj) $(amdfwtoolobj)
|
|
|
|
distclean: clean
|
|
|
|
help:
|
|
@echo "${TARGETS}: Tools to create and read from AMD firmware combinations"
|
|
@echo "Targets: all, clean, distclean, help"
|
|
@echo "To disable warnings as errors, run make as:"
|
|
@echo " make all WERROR=\"\""
|
|
|
|
.PHONY: all clean distclean help
|