From 81b38ec2cc75e6695970a1ece1d479c717acf991 Mon Sep 17 00:00:00 2001 From: Petter Reinholdtsen Date: Thu, 28 Apr 2022 07:21:33 +0200 Subject: [PATCH] Allow CFLAGS additions and install in DESTDIR This make it easier to create a Debian package. --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 159b197..e8b2430 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ STRIP=strip OUTDIR?=build OUTFILE="$(OUTDIR)/rtl_wmbus" -CFLAGS?=-Iinclude -std=gnu99 +CFLAGS+=-Iinclude -std=gnu99 CFLAGS_WARNINGS?=-Wall -W -Waggregate-return -Wbad-function-cast -Wcast-align -Wcast-qual -Wchar-subscripts -Wcomment -Wno-float-equal -Winline -Wmain -Wmissing-noreturn -Wno-missing-prototypes -Wparentheses -Wpointer-arith -Wredundant-decls -Wreturn-type -Wshadow -Wsign-compare -Wstrict-prototypes -Wswitch -Wunreachable-code -Wno-unused -Wuninitialized LIB?=-lm SRC=rtl_wmbus.c @@ -62,7 +62,8 @@ pi1: rebuild: clean all install: release - cp -f $(OUTFILE) /usr/bin + install -d $(DESTDIR)/usr/bin + install $(OUTFILE) $(DESTDIR)/usr/bin clean: $(RM) -rf "$(OUTDIR)"