-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
69 lines (57 loc) · 2.04 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# sss - simple screenshot
# see LICENSE for license info
.POSIX:
include config.mk
SRC = sss.c
OBJ = $(SRC:.c=.o)
# CFLAGS=-lxcb-cursor -lxcb-image -lxcb -lxcb-shm -lpng16 -lz
all: options sss
options:
@echo
@printf "\033[0;32m╭───┤ SSS ├──────────╮\n"
@echo "│────────────────────│"
@echo "│ \033[0;37msss build options:\033[0;32m │"
@echo "│ \033[0;37m├───> install\033[0;32m │"
@echo "│ \033[0;37m├───> here\033[0;32m │"
@echo "│ \033[0;37m├───> link\033[0;32m │"
@echo "│ \033[0;37m├───> unlink\033[0;32m │"
@echo "│ \033[0;37m└───> uninstall\033[0;32m │"
@echo "╰────────────────────╯\033[0;37m"
@echo
@echo "\033[0;31mCFLAGS\033[0;37m = $(STCFLAGS)"
@echo "\033[0;31mLDFLAGS\033[0;37m = $(STLDFLAGS)"
@echo "\033[0;31mCC\033[0;37m = $(CC)"
@echo
sss: $(OBJ)
$(CC) -o $@ $(OBJ) $(STLDFLAGS)
install: sss
mkdir -p $(DESTDIR)$(PREFIX)/bin
cp -f sss $(DESTDIR)$(PREFIX)/bin
chmod 755 $(DESTDIR)$(PREFIX)/bin/sss
mkdir -p $(DESTDIR)$(MANPREFIX)/man1
cp sss.1 $(DESTDIR)$(MANPREFIX)/man1/sss.1
chmod 644 $(DESTDIR)$(MANPREFIX)/man1/sss.1
uninstall:
rm -f $(DESTDIR)$(PREFIX)/bin/sss
rm -f $(DESTDIR)$(MANPREFIX)/man1/sss.1
here: sss
link: sss
mkdir -p $(DESTDIR)$(PREFIX)/bin
ln -sf $(shell pwd)/sss $(DESTDIR)$(PREFIX)/bin/sss
chmod 755 sss
mkdir -p $(DESTDIR)$(MANPREFIX)/man1
ln -sf $(shell pwd)/sss.1 $(DESTDIR)$(MANPREFIX)/man1/sss.1
chmod 644 sss.1
unlink:
rm -f $(DESTDIR)$(PREFIX)/bin/sss
rm -f $(DESTDIR)$(MANPREFIX)/man1/sss.1
depend:
@echo "╭┤ dependencies ├╮"
@echo "│────────────────│"
@echo "│ libxcb │"
@echo "│ libxcb-image │"
@echo "│ libxcb-shm │"
@echo "│ libxcb-cursor │"
@echo "│ libpng │"
@echo "╰────────────────╯"
.PHONY: install here link unlink uninstall depend