-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathMakefile
54 lines (39 loc) · 978 Bytes
/
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
.PHONY: all compile clean run debug deb install uninstall
OS := $(shell uname -o 2> /dev/null)
KERNEL := $(shell uname -s 2> /dev/null)
INSTALLPATH := /usr/local/bin
CONFIGPATH := /etc/xdg
INSTALLFLAGS := -Dm755
CONFIGFLAGS := -Dm644
ifeq ($(OS),Android)
INSTALLPATH := $(PREFIX)/bin
CONFIGPATH := $(PREFIX)/etc/xdg
endif
ifeq ($(KERNEL),Darwin)
INSTALLFLAGS := -m755
CONFIGFLAGS := -m644
INSTALLPATH := $(PREFIX)/bin
CONFIGPATH := ~/.config/
endif
all: compile
build:
meson setup build
clean:
rm -rf build
compile: build
meson compile -C build albafetch
run: compile
build/albafetch
debug: build
meson compile -C build debug
build/debug --no-pip
deb: compile
cd debian; \
./makedeb.sh
install: compile
mkdir -p $(INSTALLPATH) $(CONFIGPATH)
install $(INSTALLFLAGS) build/albafetch $(INSTALLPATH)/albafetch
install $(CONFIGFLAGS) albafetch.conf $(CONFIGPATH)/albafetch.conf
uninstall:
rm $(INSTALLPATH)/albafetch
rm $(CONFIGPATH)/albafetch.conf