From a3ddd87ec2e8d7165d28c5f8236b4547a3742abe Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Thu, 16 Sep 2021 18:45:22 +0200 Subject: Imrpove makefile + add missing , in README + m whitespace fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- Makefile | 8 +++----- README | 2 +- config.mk | 6 ++++-- slack.c | 1 + 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 8652733..d0c9a85 100644 --- a/Makefile +++ b/Makefile @@ -3,13 +3,14 @@ CONFIGFILE = config.mk include $(CONFIGFILE) + all: slack slack: slack.o $(CC) -o $@ slack.o $(LDFLAGS) slack.o: slack.c arg.h - $(CC) -c -o $@ $< $(CFLAGS) $(CPPFLAGS) + $(CC) -c -o $@ slack.c $(CFLAGS) $(CPPFLAGS) check: test $$(./slack 1ms ./slack get) = 1ms @@ -27,18 +28,15 @@ check: install: slack mkdir -p -- "$(DESTDIR)$(PREFIX)/bin" mkdir -p -- "$(DESTDIR)$(MANPREFIX)/man1" - mkdir -p -- "$(DESTDIR)$(PREFIX)/share/licenses/slack" cp -- slack "$(DESTDIR)$(PREFIX)/bin/" cp -- slack.1 "$(DESTDIR)$(MANPREFIX)/man1/" - cp -- LICENSE "$(DESTDIR)$(PREFIX)/share/licenses/slack" uninstall: -rm -f -- "$(DESTDIR)$(PREFIX)/bin/slack" -rm -f -- "$(DESTDIR)$(MANPREFIX)/man1/slack.1" - -rm -rf -- "$(DESTDIR)$(PREFIX)/share/licenses/slack" clean: - -rm -f -- slack *.o + -rm -f -- slack *.o *.su .SUFFIXES: diff --git a/README b/README index 7c2c508..97aff1d 100644 --- a/README +++ b/README @@ -44,4 +44,4 @@ RATIONALE Could be useful increase the performance of your computer. SEE ALSO - nice(1) ionice(1), prctl(2) + nice(1), ionice(1), prctl(2) 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 diff --git a/slack.c b/slack.c index af4cf58..265255b 100644 --- a/slack.c +++ b/slack.c @@ -13,6 +13,7 @@ #define MS (1000L * 1000L) #define S (1000L * 1000L * 1000L) + char *argv0; static void -- cgit v1.2.3-70-g09d2