-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
56 lines (47 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
CC = gcc
LDFLAGS = -lImlib2 -lX11
CFLAGS ?= -O2 -s
#CFLAGS ?= -ggdb -g3 # For debugging
all: xlunch entries.dsv
install: xlunch
mkdir -p $(DESTDIR)/etc/xlunch/
mkdir -p $(DESTDIR)/usr/share/xlunch/svgicons/
mkdir -p $(DESTDIR)/usr/bin/
mkdir -p $(DESTDIR)/usr/share/icons/hicolor/48x48/apps
mkdir -p $(DESTDIR)/usr/share/applications
cp extra/ghost.png $(DESTDIR)/usr/share/icons/hicolor/48x48/apps/xlunch_ghost.png
cp docs/logo.png $(DESTDIR)/usr/share/icons/hicolor/48x48/apps/xlunch.png
cp xlunch $(DESTDIR)/usr/bin/
cp extra/genentries $(DESTDIR)/usr/bin
cp extra/gentriesquick $(DESTDIR)/usr/bin/xlunch_genquick
cp extra/updateentries $(DESTDIR)/usr/bin
cp extra/genentries.desktop.sh $(DESTDIR)/usr/bin
cp extra/genentries.desktop $(DESTDIR)/usr/share/applications/
cp default.conf $(DESTDIR)/etc/xlunch/default.conf
bash extra/genentries --path $(DESTDIR)/usr/share/xlunch/svgicons/ > $(DESTDIR)/etc/xlunch/entries.dsv
cp -r svgicons/ $(DESTDIR)/usr/share/xlunch/ 2>/dev/null || :
remove:
rm -r $(DESTDIR)/etc/xlunch
rm -r $(DESTDIR)/usr/share/xlunch
rm $(DESTDIR)/usr/bin/xlunch
rm $(DESTDIR)/usr/bin/genentries
rm $(DESTDIR)/usr/bin/updateentries
rm $(DESTDIR)/usr/bin/genentries.desktop.sh
rm $(DESTDIR)/usr/share/icons/hicolor/48x48/apps/xlunch_ghost.png
rm $(DESTDIR)/usr/share/icons/hicolor/48x48/apps/xlunch.png
rm $(DESTDIR)/usr/share/applications/genentries.desktop
livetest: xlunch
./extra/gentriesquick > /tmp/xlunch-tmp.dsv
./xlunch -g extra/wp.jpg -f "extra/OpenSans-Regular.ttf/10" -i /tmp/xlunch-tmp.dsv -b 140 --iconpadding 20 --textpadding 10 --paddingswap --leastmargin 10 --scroll || true
rm -f /tmp/xlunch-tmp.dsv
test: xlunch
./xlunch -g extra/wp.jpg -f "extra/OpenSans-Regular.ttf/10" -i extra/sample_entries.dsv -b 140 --outputonly --iconpadding 20 --textpadding 10 --paddingswap --leastmargin 10 --highlight extra/highlight.png
xlunch: xlunch.c
$(CC) xlunch.c -o xlunch $(LDFLAGS) $(CFLAGS)
entries.dsv:
bash extra/genentries > entries.dsv
clean:
rm -f xlunch
rm -f entries.dsv
release:
bash extra/makerelease