summaryrefslogtreecommitdiff
path: root/util/archive
diff options
context:
space:
mode:
Diffstat (limited to 'util/archive')
-rw-r--r--util/archive/Makefile14
1 files changed, 12 insertions, 2 deletions
diff --git a/util/archive/Makefile b/util/archive/Makefile
index 7008cc2020..d4b58f765f 100644
--- a/util/archive/Makefile
+++ b/util/archive/Makefile
@@ -1,14 +1,24 @@
PROGRAM = archive
HOSTCC ?= gcc
+WERROR=-Werror
+CFLAGS=-O2 -Wall -Wextra -Wshadow ${WERROR}
SRCS = $(PROGRAM).c
all: $(PROGRAM)
$(PROGRAM): $(SRCS)
- $(HOSTCC) -o $@ $^
+ $(HOSTCC) $(CFLAGS) -o $@ $^
clean:
rm -f $(PROGRAM) *.o
-.PHONY: all clean
+distclean: clean
+
+help:
+ @echo "${PROGRAM}: Concatenate files and create an archive"
+ @echo "Targets: all, clean, distclean, help"
+ @echo "To disable warnings as errors, run make as:"
+ @echo " make all WERROR=\"\""
+
+.PHONY: all clean distclean help