forked from davmac314/dinit
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
47 lines (39 loc) · 1.12 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
# Makefile for Dinit.
all: mconfig
$(MAKE) -C build all
$(MAKE) -C src all
$(MAKE) -C doc/manpages all
@echo "***"
@echo "*** Build complete; use \"make check\" to run unit tests, \"make check-igr\" for"
@echo "*** integration tests, or \"make install\" to install."
@echo "***"
check: mconfig
$(MAKE) -C src check
check-igr: mconfig
$(MAKE) -C src check-igr
run-cppcheck:
$(MAKE) -C src run-cppcheck
install: mconfig
$(MAKE) -C src install
$(MAKE) -C doc/manpages install
ipk: all
$(MAKE) -C ipk clean
$(MAKE) DESTDIR=../ipk/tmp/data/ -C src install
$(MAKE) -C ipk
clean:
$(MAKE) -C src clean
$(MAKE) -C build clean
$(MAKE) -C doc/manpages clean
$(MAKE) -C ipk clean
mconfig:
@UNAME=`uname`;\
if [ -f "./configs/mconfig.$$UNAME.sh" ]; then \
echo "*** Found auto-configuration script for OS: $$UNAME"; \
( cd ./configs; sh "mconfig.$$UNAME.sh" ) \
elif [ -f "./configs/mconfig.$$UNAME" ]; then \
echo "*** Found configuration for OS: $$UNAME"; \
ln -sf "configs/mconfig.$$UNAME" mconfig; \
else \
echo "*** No config available. Please create suitable mconfig file."; \
exit 1; \
fi