forked from davmac314/dinit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
40 lines (33 loc) · 954 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
# 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
clean:
$(MAKE) -C src clean
$(MAKE) -C build clean
$(MAKE) -C doc/manpages 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 \
./configure; \
fi