7698a55202
Add Makefile.inc to compliant with other tools. Makefile is kept for building amdfwtool by typing make in the folder. Change-Id: I3688d93de4459f5f838955892086b4b9bf30a9b8 Signed-off-by: Zheng Bao <fishbaozi@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/45286 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin Roth <martinroth@google.com> Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
18 lines
280 B
Makefile
18 lines
280 B
Makefile
# SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
HOSTCC ?= cc
|
|
|
|
SRC = amdfwtool.c
|
|
OBJ = $(SRC:%.c=%.o)
|
|
TARGET = amdfwtool
|
|
CFLAGS=-O2 -Wall -Wextra -Wshadow
|
|
|
|
|
|
$(TARGET): $(OBJ)
|
|
$(CC) $(OBJ) $(LDFLAGS) -o $@
|
|
|
|
%.o: %.c $(HEADER)
|
|
$(CC) $(CFLAGS) -c -o $@ $<
|
|
|
|
clean:
|
|
@rm -f $(TARGET) $(OBJ)
|