-
Notifications
You must be signed in to change notification settings - Fork 14
/
Makefile
55 lines (37 loc) · 1.36 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
default: world
OPENWRT_DIR := openwrt
include config.mk
include target/$(TARGET)/config.mk
OPENWRT_MAKE := +$(MAKE) -C $(OPENWRT_DIR)
print-%: ; $(info $* = $($*))
MK = config.mk target/$(TARGET)/config.mk
openwrt/.config: $(MK) openwrt openwrt/feeds/tessel.index openwrt/feeds.conf
+cd openwrt; ./scripts/feeds install $(PACKAGES)
+make --no-print-directory -s print-config > openwrt/.config
$(OPENWRT_MAKE) defconfig
print-config:
# Include CONFIG_* vars from included makefiles in OpenWRT configuration
$(foreach V, $(filter CONFIG_%, $(.VARIABLES)),$(info $V=$($V)))
# Enable packages in OpenWRT configuration
$(foreach P, $(PACKAGES),$(info CONFIG_PACKAGE_$(P)=y))
.PHONY: print-config
openwrt/feeds.conf: feeds.conf $(MK)
cp feeds.conf openwrt/feeds.conf
openwrt/feeds/tessel.index: openwrt/feeds.conf
+cd openwrt; ./scripts/feeds update -a
openwrt/files:
ln -s ../files openwrt/files
download: openwrt/.config openwrt/feeds.conf
$(OPENWRT_MAKE) download
toolchain: openwrt/.config
$(OPENWRT_MAKE) toolchain
world: openwrt/.config openwrt/files openwrt/feeds.conf
git rev-parse HEAD > openwrt/files/etc/tessel-version
$(OPENWRT_MAKE) world PROFILE=$(PROFILE)
clean:
$(OPENWRT_MAKE) clean
rm -f openwrt/feeds.conf openwrt/.config
update:
git submodule update
rm -f openwrt/feeds.conf openwrt/.config
.PHONY: download toolchain world clean update