summaryrefslogtreecommitdiffstats
path: root/util/amdfwtool/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'util/amdfwtool/Makefile')
-rw-r--r--util/amdfwtool/Makefile22
1 files changed, 14 insertions, 8 deletions
diff --git a/util/amdfwtool/Makefile b/util/amdfwtool/Makefile
index 7b7793535ac9..bdc3dc3432b6 100644
--- a/util/amdfwtool/Makefile
+++ b/util/amdfwtool/Makefile
@@ -2,27 +2,33 @@
HOSTCC ?= cc
-SRC = amdfwtool.c data_parse.c
-OBJ = $(SRC:%.c=%.o)
-TARGET = amdfwtool
+READ_SRC = amdfwread.c
+READ_OBJ = $(READ_SRC:%.c=%.o)
+TOOL_SRC = amdfwtool.c data_parse.c
+TOOL_OBJ = $(TOOL_SRC:%.c=%.o)
+HEADER=amdfwtool.h
+TARGETS = amdfwread amdfwtool
WERROR=-Werror
CFLAGS=-O2 -Wall -Wextra -Wshadow ${WERROR}
-all: $(TARGET)
+all: $(TARGETS)
-$(TARGET): $(OBJ)
- $(CC) $(OBJ) $(LDFLAGS) -o $@
+amdfwread: $(READ_OBJ)
+ $(CC) $(READ_OBJ) $(LDFLAGS) -o $@
+
+amdfwtool: $(TOOL_OBJ)
+ $(CC) $(TOOL_OBJ) $(LDFLAGS) -o $@
%.o: %.c $(HEADER)
$(CC) $(CFLAGS) -c -o $@ $<
clean:
- @rm -f $(TARGET) $(OBJ)
+ @rm -f $(TARGETS) $(READ_OBJ) $(TOOL_OBJ)
distclean: clean
help:
- @echo "${TARGET}: Create AMD Firmware combination"
+ @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=\"\""