-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
46 lines (37 loc) · 1.36 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
CFLAGS += \
-Wall -D_GNU_SOURCE -O2 -Igtk-layer-shell/usr/include \
$(shell pkg-config --cflags gtk+-3.0 wayland-client)
LDFLAGS += \
-Wl,--no-as-needed -lpthread \
$(shell pkg-config --libs gtk+-3.0 wayland-client)
PREFIX ?= /usr/local
all: mauncher mauncher-launcher
mauncher: mauncher.o mauncher-win.o mauncher-ipc.o sysutil.o gtk-layer-shell/usr/lib/libgtk-layer-shell.a
mauncher.o: sysutil.h mauncher-win.h mauncher-ipc.h
mauncher-win.o: mauncher-win.h sysutil.h gtk-layer-shell/usr/lib/libgtk-layer-shell.a
mauncher-ipc.o: mauncher-ipc.h mauncher-win.h
mauncher-launcher: mauncher-launcher.o sysutil.o
mauncher-launcher.o: sysutil.h
sysutil.o: sysutil.h
gtk-layer-shell/usr/lib/libgtk-layer-shell.a:
[ -f gtk-layer-shell/.git ] || git submodule update --init gtk-layer-shell
(cd gtk-layer-shell && \
meson build --prefix /usr -Ddefault_library=static && \
ninja -C build && \
DESTDIR=`pwd` ninja -C build install)
.PHONY: clean
clean:
rm -f mauncher mauncher-launcher *.o
.PHONY: cleanall
cleanall: clean
rm -rf gtk-layer-shell
.PHONY: install
install: mauncher mauncher-launcher
mkdir -p $(DESTDIR)$(PREFIX)/bin
cp -f $^ $(DESTDIR)$(PREFIX)/bin
chmod 755 $(DESTDIR)$(PREFIX)/bin/mauncher
chmod 755 $(DESTDIR)$(PREFIX)/bin/mauncher-launcher
.PHONY: uninstall
uninstall:
rm -f $(DESTDIR)$(PREFIX)/bin/mauncher
rm -f $(DESTDIR)$(PREFIX)/bin/mauncher-launcher