-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
151 lines (118 loc) · 4.56 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
PROGS = scripts/kconfig/dumpconf scripts/kconfig/conf undertaker/undertaker undertaker/predator undertaker/rsf2cnf \
undertaker/satyr python/rsf2model tailor/undertaker-traceutil ziz/zizler picosat/picomus
MANPAGES = doc/undertaker.1.gz doc/undertaker-linux-tree.1.gz doc/undertaker-kconfigdump.1.gz \
doc/undertaker-kconfigpp.1.gz
PREFIX ?= /usr/local
BINDIR ?= $(PREFIX)/bin
SBINDIR ?= $(PREFIX)/sbin
LIBDIR ?= $(PREFIX)/lib
MANDIR ?= $(PREFIX)/share/man
DOCDIR ?= $(PREFIX)/share/doc
ETCDIR ?= $(PREFIX)/etc
VERSION=$(shell cat VERSION)
ifneq (,$(DESTDIR))
SETUP_PY_EXTRA_ARG = --root=$(DESTDIR)
SETUP_PY_INSTALL_EXTRA_ARG = $(SETUP_PY_EXTRA_ARG)
endif
all: picosat/libpicosat.a $(PROGS)
version.h: generate-version.sh
./$<
scripts/kconfig/dumpconf scripts/kconfig/conf: FORCE
$(MAKE) -f Makefile.kbuild $(@F)
picosat/libpicosat.a:
cd picosat && ./configure -static -O
$(MAKE) -C picosat
undertaker/undertaker: FORCE
$(MAKE) -C undertaker undertaker
undertaker/predator: FORCE
$(MAKE) -C undertaker predator
undertaker/rsf2cnf: FORCE
$(MAKE) -C undertaker rsf2cnf
tailor/undertaker-traceutil: FORCE
$(MAKE) -C tailor undertaker-traceutil
undertaker/satyr: FORCE
$(MAKE) -C undertaker satyr
ziz/zizler: FORCE
$(MAKE) -C ziz zizler
%.1.gz: %.1
gzip < $< > $@
conf: scripts/kconfig/conf
clean:
$(MAKE) -f Makefile.kbuild clean
$(MAKE) -C undertaker clean
$(MAKE) -C ziz clean
$(MAKE) -C python clean
$(MAKE) -C tailor clean
$(MAKE) -C fm clean
test ! -f picosat/makefile || $(MAKE) -C picosat clean
rm -rf doc/*.gz
@python setup.py clean
docs:
$(MAKE) -C undertaker docs
check:
$(MAKE) -C undertaker $@
$(MAKE) -C ziz $@
$(MAKE) -C python $@
$(MAKE) -C tailor $@
$(MAKE) -s -C fm $@
models: picosat/libpicosat.a
$(MAKE) -C undertaker/kconfig-dumps/
install: all $(MANPAGES)
@install -d -v $(DESTDIR)$(BINDIR)
@install -d -v $(DESTDIR)$(SBINDIR)
@install -d -v $(DESTDIR)$(DOCDIR)
@install -d -v $(DESTDIR)$(LIBDIR)/undertaker
@install -d -v $(DESTDIR)$(ETCDIR)/undertaker
@install -d -v $(DESTDIR)$(LIBDIR)/undertaker/tailor/ubuntu-boot
@install -d -v $(DESTDIR)$(PREFIX)/share/emacs/site-lisp/undertaker
@install -d -v $(DESTDIR)$(DOCDIR)/undertaker/tailor
@install -d -v $(DESTDIR)$(MANDIR)/man1
@install -v python/undertaker-calc-coverage $(DESTDIR)$(BINDIR)
@install -v python/undertaker-kconfigdump $(DESTDIR)$(BINDIR)
@install -v python/vampyr-spatch-wrapper $(DESTDIR)$(BINDIR)
@install -v python/fakecc $(DESTDIR)$(BINDIR)
@install -v scripts/kconfig/dumpconf $(DESTDIR)$(LIBDIR)/undertaker
@install -v tailor/undertaker-tailor $(DESTDIR)$(BINDIR)
@install -v tailor/undertaker-tracecontrol-prepare-debian $(DESTDIR)$(BINDIR)
@install -v tailor/undertaker-tracecontrol-prepare-ubuntu $(DESTDIR)$(BINDIR)
@install -v tailor/undertaker-tracecontrol $(DESTDIR)$(BINDIR)
@install -v tailor/undertaker-traceutil $(DESTDIR)$(SBINDIR)
@cp -v tailor/lists/* $(DESTDIR)$(ETCDIR)/undertaker/
@cp -v tailor/HOWTO $(DESTDIR)$(DOCDIR)/undertaker/tailor/
@cp -v tailor/README $(DESTDIR)$(DOCDIR)/undertaker/tailor/
@cp -r -v tailor/boot/* $(DESTDIR)$(LIBDIR)/undertaker/tailor/ubuntu-boot
@install -v undertaker/predator $(DESTDIR)$(BINDIR)
@install -v undertaker/undertaker $(DESTDIR)$(BINDIR)
@install -v undertaker/undertaker-linux-tree $(DESTDIR)$(BINDIR)
@install -v undertaker/undertaker-coreboot-tree $(DESTDIR)$(BINDIR)
@install -v undertaker/undertaker-scan-head $(DESTDIR)$(BINDIR)
@install -v undertaker/undertaker-busybox-tree $(DESTDIR)$(BINDIR)
@install -v undertaker/rsf2cnf $(DESTDIR)$(BINDIR)
@install -v undertaker/satyr $(DESTDIR)$(BINDIR)
@install -v picosat/picomus $(DESTDIR)$(BINDIR)
@install -v ziz/zizler $(DESTDIR)$(BINDIR)
@install -v scripts/Makefile.list $(DESTDIR)$(LIBDIR)
@install -v scripts/Makefile.list_recursion $(DESTDIR)$(LIBDIR)
@install -v scripts/Makefile.list_fiasco $(DESTDIR)$(LIBDIR)
@install -v scripts/Makefile.version $(DESTDIR)$(LIBDIR)
@install -v -m 0644 contrib/undertaker.el $(DESTDIR)$(PREFIX)/share/emacs/site-lisp/undertaker
@install -v -m 0644 -t $(DESTDIR)$(MANDIR)/man1 $(MANPAGES)
@python setup.py build $(SETUP_PY_BUILD_EXTRA_ARG)
@python setup.py install --prefix=$(PREFIX) $(SETUP_PY_INSTALL_EXTRA_ARG)
dist: clean
tar -czvf ../undertaker-$(VERSION).tar.gz . \
--show-transformed-names \
--transform 's,^./,undertaker-$(VERSION)/,'\
--exclude=*~ \
--exclude=*.rsf \
--exclude=*.model \
--exclude-vcs \
--exclude="*nfs*" \
--exclude="*git*" \
--exclude=*.tar.gz \
--exclude="*.html"
undertaker-lcov:
$(MAKE) -C undertaker run-lcov
FORCE:
.PHONY: FORCE check undertaker-lcov conf
.NOTPARALLEL: