-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
73 lines (57 loc) · 1.62 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
# Makefile provided as a convenience wrapper around setup.sh and bitbake
defaulttarget = core-image-base
$(defaulttarget):
help:
@echo >&2 "Note: Default target is $(defaulttarget)"
@echo >&2
@echo >&2 "Usage: make [TARGET]"
@echo >&2 " make clean"
@echo >&2 " make clean-sstate"
@echo >&2 " make clean-TARGET"
@echo >&2 " make cleanall-TARGET"
@echo >&2 " make cleansstate-TARGET"
@echo >&2 " make graph-TARGET"
@echo >72 " Generate dependency graphs for TARGET"
@echo >&2 " make update"
@echo >72 " Update to the latest bitbake and metadata"
clean-sstate:
@echo Cleaning sstate files...
@-rm -rf sstate-cache
clean:
@echo Cleaning build directory...
@-rm -rf build*/* pseudodone
graph-%:
@echo Graphing $*...
@$(call bitbake,-g,$*)
rebuild-%:
@echo Cleaning $*...
@$(call bitbake,-c cleansstate,$*)
@echo Building $*...
@$(call bitbake,$*)
clean-%:
@echo Cleaning $*...
@$(call bitbake,-c clean,$*)
cleanall-%:
@echo Running cleanall against $*...
@$(call bitbake,-c cleanall,$*)
cleansstate-%:
@echo Running cleansstate against $*...
@$(call bitbake,-c cleansstate,$*)
update:
@echo Updating repositories...
@git submodule foreach 'git fetch && git checkout $$(git config -f ../.gitmodules "submodule.$$(basename "$$PWD").branch") && git pull --rebase'
env:
@echo Showing environment
@$(call bitbake,-e)
env-%:
@echo Showing environment for $*
@$(call bitbake,-e,$*)
devshell-%:
@echo Starting devshell for $*
@$(call bitbake,-c,devshell,$*)
%:
@echo Building $*...
@$(call bitbake,$*)
define bitbake
. ./setup.sh && bitbake -k $1 $2 $3 $4
endef