From c86ddbbc0eee0e8317d4ed180ee4505f10e8a52c Mon Sep 17 00:00:00 2001 From: Jari Vetoniemi Date: Thu, 18 Oct 2018 13:25:53 +0300 Subject: Initial commit --- Makefile | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..4086d15 --- /dev/null +++ b/Makefile @@ -0,0 +1,28 @@ +PREFIX ?= /usr/local +bindir ?= /bin + +MAKEFLAGS += --no-builtin-rules + +WARNINGS := -Wall -Wextra -Wpedantic -Wformat=2 -Wstrict-aliasing=3 -Wstrict-overflow=5 -Wstack-usage=12500 \ + -Wfloat-equal -Wcast-align -Wpointer-arith -Wchar-subscripts -Warray-bounds=2 + +override CFLAGS ?= -g +override CFLAGS += -std=c99 -D_DEFAULT_SOURCE $(WARNINGS) + +bins = proc-region-rw +all: $(bins) + +$(bins): %: + $(LINK.c) $(filter %.c %.a,$^) $(LDLIBS) -o $@ + +proc-region-rw: proc-region-rw.c + +install-bin: $(bins) + install -Dm755 $^ -t "$(DESTDIR)$(PREFIX)$(bindir)" + +install: install-bin + +clean: + $(RM) $(bins) + +.PHONY: all clean install -- cgit v1.2.3