forked from AllskyTeam/allsky
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
59 lines (51 loc) · 1.22 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
platform = $(shell uname -m)
prefix =
sysconfdir = ${prefix}/etc
exec_prefix = /usr
bindir = ${exec_prefix}/bin
libexecdir = ${exec_prefix}/libexec/allsky
sharedir = ${exec_prefix}/share/allsky
.DEFAULT_GOAL := all
ROOTCHECK=$(shell id -u)
ifneq ($(ROOTCHECK),0)
ifeq ($(PKGBUILD),1)
ROOTCHECK=0
endif
endif
ifeq ($(PKGBUILD),)
PKGBUILD=0
endif
%:
@make -C src $@
@make -C config_repo $@
@make -C notification_images $@
@make -C scripts $@
deps:
@make -C src $@
.PHONY : deps
install:
ifneq ($(ROOTCHECK), 0)
@echo This must be run with root permissions.
@echo Please run \'sudo make install\'
else
@echo `date +%F\ %R:%S` Starting install...
@make -C src $@
@make -C config_repo $@
@make -C notification_images $@
@make -C scripts $@
@if [ $(PKGBUILD) -eq 1 ]; then \
[ ! -e $(DESTDIR)$(libexecdir) ] && mkdir -p $(DESTDIR)$(libexecdir) \
install allsky.sh $(DESTDIR)$(libexecdir)/allsky.sh; \
fi
@if [ $(PKGBUILD) -ne 1 ]; then \
echo `date +%F\ %R:%S` Setting directory permissions...; \
[ ! -e tmp ] && mkdir tmp; \
chown -R $(SUDO_USER):$(SUDO_USER) ./ ; \
echo ""; \
echo ""; \
echo `date +%F\ %R:%S` Install complete; \
echo ""; \
echo ""; \
fi
endif
.PHONY : install