mirror of git://git.suckless.org/slstatus
Compare commits
2 Commits
e0c155e9ab
...
86c7a84c23
Author | SHA1 | Date |
---|---|---|
drkhsh | 86c7a84c23 | |
drkhsh | 483169021b |
5
Makefile
5
Makefile
|
@ -44,14 +44,15 @@ slstatus: slstatus.o $(COM:=.o) $(REQ:=.o)
|
|||
$(CC) -o $@ $(LDFLAGS) $(COM:=.o) $(REQ:=.o) slstatus.o $(LDLIBS)
|
||||
|
||||
clean:
|
||||
rm -f slstatus slstatus.o $(COM:=.o) $(REQ:=.o)
|
||||
rm -f slstatus slstatus.o $(COM:=.o) $(REQ:=.o) slstatus-${VERSION}.tar.gz
|
||||
|
||||
dist:
|
||||
rm -rf "slstatus-$(VERSION)"
|
||||
mkdir -p "slstatus-$(VERSION)/components"
|
||||
cp -R LICENSE Makefile README config.mk config.def.h \
|
||||
arg.h slstatus.c $(COM:=.c) $(REQ:=.c) $(REQ:=.h) \
|
||||
arg.h slstatus.h slstatus.c $(REQ:=.c) $(REQ:=.h) \
|
||||
slstatus.1 "slstatus-$(VERSION)"
|
||||
cp -R $(COM:=.c) "slstatus-$(VERSION)/components"
|
||||
tar -cf - "slstatus-$(VERSION)" | gzip -c > "slstatus-$(VERSION).tar.gz"
|
||||
rm -rf "slstatus-$(VERSION)"
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ X11INC = /usr/X11R6/include
|
|||
X11LIB = /usr/X11R6/lib
|
||||
|
||||
# flags
|
||||
CPPFLAGS = -I$(X11INC) -D_DEFAULT_SOURCE
|
||||
CPPFLAGS = -I$(X11INC) -D_DEFAULT_SOURCE -DVERSION=\"${VERSION}\"
|
||||
CFLAGS = -std=c99 -pedantic -Wall -Wextra -Wno-unused-parameter -Os
|
||||
LDFLAGS = -L$(X11LIB) -s
|
||||
# OpenBSD: add -lsndio
|
||||
|
|
|
@ -22,6 +22,8 @@ By default,
|
|||
outputs to WM_NAME.
|
||||
.Sh OPTIONS
|
||||
.Bl -tag -width Ds
|
||||
.It Fl v
|
||||
Print version information to stderr, then exit.
|
||||
.It Fl s
|
||||
Write to stdout instead of WM_NAME.
|
||||
.It Fl 1
|
||||
|
|
|
@ -41,7 +41,7 @@ difftimespec(struct timespec *res, struct timespec *a, struct timespec *b)
|
|||
static void
|
||||
usage(void)
|
||||
{
|
||||
die("usage: %s [-s] [-1]", argv0);
|
||||
die("usage: %s [-v] [-s] [-1]", argv0);
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -56,6 +56,8 @@ main(int argc, char *argv[])
|
|||
|
||||
sflag = 0;
|
||||
ARGBEGIN {
|
||||
case 'v':
|
||||
die("slstatus-"VERSION);
|
||||
case '1':
|
||||
done = 1;
|
||||
/* FALLTHROUGH */
|
||||
|
|
Loading…
Reference in New Issue