-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
42 lines (32 loc) · 1.07 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
CONFIG=BR2_DEFCONFIG=../main.config
all: build
.PHONY:
init: buildroot
.PHONY:
update:
@cd buildroot/ && git pull
buildroot:
@git clone git://git.buildroot.net/buildroot buildroot/
.PHONY:
clean:
@if [ -d buildroot/ ]; then \
make -s apply-config; \
cd buildroot/; make -s clean; \
fi
.PHONY:
clean-all:
@if [ -d buildroot/ ]; then rm -rf buildroot/; fi
.PHONY:
build: buildroot apply-config
@cd buildroot/ && make -s all # run builds
.PHONY:
config: buildroot apply-config
@cd buildroot/ && make -s xconfig # run configure dialog
@cd buildroot/ && make -s $(CONFIG) savedefconfig >/dev/null # retrieve changes made from dialog and store them into main.config
.PHONY:
apply-config: buildroot
@cd buildroot/ && make -s $(CONFIG) defconfig >/dev/null # loads config from main.config into Buildroot
.PHONY:
linux-config: buildroot apply-config
@cd buildroot/ && make -s linux-xconfig # loads config from linux.config into Buildroot and runs configure dialog
@cd buildroot/ && make -s linux-update-defconfig # retrive changes made from dialog and store them into linux.config