From 69c1d2d61902b314223afb304543f22db4c15da5 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Thu, 16 Sep 2021 18:36:15 +0200 Subject: Improve makefile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- Makefile | 6 ++---- config.mk | 6 ++++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index f239a15..5399d45 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,7 @@ CONFIGFILE = config.mk include $(CONFIGFILE) + all: pdeath tinysleep test pdeath: pdeath.o @@ -44,19 +45,16 @@ check: pdeath tinysleep test install: pdeath mkdir -p -- "$(DESTDIR)$(PREFIX)/bin" - mkdir -p -- "$(DESTDIR)$(PREFIX)/share/licenses/pdeath" mkdir -p -- "$(DESTDIR)$(MANPREFIX)/man1" cp -- pdeath "$(DESTDIR)$(PREFIX)/bin/" - cp -- LICENSE "$(DESTDIR)$(PREFIX)/share/licenses/pdeath/" cp -- pdeath.1 "$(DESTDIR)$(MANPREFIX)/man1/" uninstall: -rm -f -- "$(DESTDIR)$(PREFIX)/bin/pdeath" -rm -f -- "$(DESTDIR)$(MANPREFIX)/man1/pdeath.1" - -rm -rf -- "$(DESTDIR)$(PREFIX)/share/licenses/pdeath" clean: - -rm -rf -- *.o pdeath tinysleep test .testdir + -rm -rf -- *.o *.su pdeath tinysleep test .testdir SUFFIXES: SUFFIXES: .o .c diff --git a/config.mk b/config.mk index 9e148ca..aa81003 100644 --- a/config.mk +++ b/config.mk @@ -1,6 +1,8 @@ -PREFIX = /usr/local +PREFIX = /usr MANPREFIX = $(PREFIX)/share/man -CFLAGS = -std=c99 -Wall -Wextra -O2 +CC = cc + CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700 +CFLAGS = -std=c99 -Wall -O2 LDFLAGS = -s -- cgit v1.2.3-70-g09d2