summaryrefslogtreecommitdiff
path: root/util/amdfwtool/Makefile
blob: 7b7793535ac9d7662ff4275da2544eda3935ae41 (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
# SPDX-License-Identifier: BSD-3-Clause

HOSTCC ?= cc

SRC = amdfwtool.c data_parse.c
OBJ = $(SRC:%.c=%.o)
TARGET = amdfwtool
WERROR=-Werror
CFLAGS=-O2 -Wall -Wextra -Wshadow ${WERROR}

all: $(TARGET)

$(TARGET): $(OBJ)
	$(CC) $(OBJ) $(LDFLAGS) -o $@

%.o: %.c $(HEADER)
	$(CC) $(CFLAGS) -c -o $@ $<

clean:
	@rm -f $(TARGET) $(OBJ)

distclean: clean

help:
	@echo "${TARGET}: Create AMD Firmware combination"
	@echo "Targets: all, clean, distclean, help"
	@echo "To disable warnings as errors, run make as:"
	@echo "  make all WERROR=\"\""

.PHONY: all clean distclean help