aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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