-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
59 lines (50 loc) · 1.64 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
MENUPROG = xpomodmenu
SERVERPROG = xpomodbell
TIMERPROG = xpomoinfo
PREFIX ?= /usr/local
BINDIR = $(DESTDIR)$(PREFIX)/bin
SHAREDIR = $(DESTDIR)$(PREFIX)/share
PIXMAPDIR = $(SHAREDIR)/pixmaps/$(MENUPROG)
SOUNDSDIR = $(SHAREDIR)/sounds/$(SERVERPROG)
MLVWMRCDIR = $(HOME)/.mlvwm
build: build-pixmap
build-pixmap:
convert pixmap/control_play.{png,xpm}
convert pixmap/control_play_blue.{png,xpm}
convert pixmap/control_stop.{png,xpm}
convert pixmap/control_stop_blue.{png,xpm}
convert pixmap/error.{png,xpm}
convert pixmap/time.{png,xpm}
convert pixmap/time_go.{png,xpm}
install: build
mkdir -p $(BINDIR)
install -m 755 bin/$(MENUPROG) $(BINDIR)
sed -i 's@pixmap/@$(PIXMAPDIR)/@g' $(BINDIR)/$(MENUPROG)
install -m 755 bin/$(SERVERPROG) $(BINDIR)
sed -i 's@sounds/@$(SOUNDSDIR)/@g' $(BINDIR)/$(SERVERPROG)
install -m 755 bin/$(TIMERPROG) $(BINDIR)/$(TIMERPROG)
mkdir -p $(PIXMAPDIR)
cp -R pixmap/* $(PIXMAPDIR)/
mkdir -p $(SOUNDSDIR)
cp -R sounds/* $(SOUNDSDIR)/
install-mlvwmrc-menuextra:
mkdir -p $(MLVWMRCDIR)/pixmap
cp pixmap/time.xpm $(MLVWMRCDIR)/pixmap/$(TIMERPROG).xpm
mkdir -p $(MLVWMRCDIR)/apps
install .mlvwm/apps/$(TIMERPROG) $(MLVWMRCDIR)/apps
mkdir -p $(MLVWMRCDIR)/MenuExtras
install .mlvwm/MenuExtras/$(MENUPROG) $(MLVWMRCDIR)/MenuExtras
sed -i 's@pixmap/@$(PIXMAPDIR)/@g' $(MLVWMRCDIR)/MenuExtras/$(MENUPROG)
uninstall:
rm $(BINDIR)/$(MENUPROG)
rm $(BINDIR)/$(SERVERPROG)
rm $(BINDIR)/$(TIMERPROG)
rm -r $(PIXMAPDIR)
rm -r $(SOUNDSDIR)
uninstall-mlvwmrc-menuextra:
rm $(MLVWMRCDIR)/pixmap/$(TIMERPROG).xpm
rm $(MLVWMRCDIR)/apps/$(TIMERPROG)
rm $(MLVWMRCDIR)/MenuExtras/$(MENUPROG)
clean: clean-pixmap
clean-pixmap:
rm pixmap/*.xpm