forked from alba4k/albafetch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
58 lines (40 loc) · 996 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
55
56
57
58
.PHONY: compile
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
OS := $(shell uname -o 2> /dev/null)
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:
meson setup build --wipe
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: build/albafetch
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