1 # See LICENSE file for copyright and license details
2 # slstatus - suckless status monitor
10 components
/$(OS
)/battery \
11 components
/$(OS
)/cpu \
14 components
/$(OS
)/entropy \
17 components
/kernel_release\
18 components
/keyboard_indicators\
21 components
/$(OS
)/ram \
22 components
/run_command\
23 components
/$(OS
)/swap \
24 components
/$(OS
)/temperature \
25 components
/$(OS
)/uptime \
30 SLSCFLAGS
= -I
$(X11INC
) -D_DEFAULT_SOURCE
$(CFLAGS
)
31 SLSLDFLAGS
= -L
$(X11LIB
) $(LDFLAGS
)
32 SLSLIBS
= -lX11
$(OSLIBS
) $(LIBS
)
36 slstatus
: slstatus.o
$(COM
:=.o
) $(REQ
:=.o
)
37 slstatus.o
: slstatus.c slstatus.h arg.h config.h
$(REQ
:=.h
)
38 $(COM
:=.o
): config.mk
$(REQ
:=.h
)
44 $(CC
) -o
$@
$(SLSLDFLAGS
) $< $(COM
:=.o
) $(REQ
:=.o
) $(SLSLIBS
)
47 $(CC
) -o
$@
-c
$(SLSCFLAGS
) $<
50 rm -f slstatus slstatus.o
$(COM
:=.o
) $(REQ
:=.o
)
53 for os in Linux OpenBSD
; do make OS
="$$os" clean; done
57 rm -rf
"slstatus-$(VERSION)"
58 mkdir
-p
"slstatus-$(VERSION)/components"
59 cp
-R LICENSE Makefile README config.mk config.def.h \
60 arg.h slstatus.c
$(COM
:=.c
) $(REQ
:=.c
) $(REQ
:=.h
) \
61 slstatus
.1 "slstatus-$(VERSION)"
62 tar -cf
- "slstatus-$(VERSION)" | gzip
-c
> "slstatus-$(VERSION).tar.gz"
63 rm -rf
"slstatus-$(VERSION)"
66 mkdir
-p
"$(DESTDIR)$(PREFIX)/bin"
67 cp
-f slstatus
"$(DESTDIR)$(PREFIX)/bin"
68 chmod
755 "$(DESTDIR)$(PREFIX)/bin/slstatus"
69 mkdir
-p
"$(DESTDIR)$(MANPREFIX)/man1"
70 cp
-f slstatus
.1 "$(DESTDIR)$(MANPREFIX)/man1"
71 chmod
644 "$(DESTDIR)$(MANPREFIX)/man1/slstatus.1"
74 rm -f
"$(DESTDIR)$(PREFIX)/bin/slstatus"
75 rm -f
"$(DESTDIR)$(MANPREFIX)/man1/slstatus.1"