aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2021-09-16 18:45:22 +0200
committerMattias Andrée <maandree@kth.se>2021-09-16 18:45:22 +0200
commita3ddd87ec2e8d7165d28c5f8236b4547a3742abe (patch)
treeb83d5d39244bb3f3bf2c34eb08cf96863d8af427
parentFix readme (diff)
downloadslack-a3ddd87ec2e8d7165d28c5f8236b4547a3742abe.tar.gz
slack-a3ddd87ec2e8d7165d28c5f8236b4547a3742abe.tar.bz2
slack-a3ddd87ec2e8d7165d28c5f8236b4547a3742abe.tar.xz
Imrpove makefile + add missing , in README + m whitespace fix3.0.2
Signed-off-by: Mattias Andrée <maandree@kth.se>
-rw-r--r--Makefile8
-rw-r--r--README2
-rw-r--r--config.mk6
-rw-r--r--slack.c1
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