summaryrefslogtreecommitdiff
path: root/util/amdfwtool/Makefile
blob: b45178d53545fdbbb88d510c3d5c0cade8294b04 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# 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