blob: e7430a51004870bc6f8f852da6cf0e0e3f2dd5f7 (
plain)
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
|
.NOTPARALLEL:
.PHONY: openwrt/backfire
openwrt/backfire/.repo_access:
mkdir -p openwrt
cd openwrt && svn co svn://svn.openwrt.org/openwrt/branches/backfire
cd $(@D) && ./scripts/feeds update
cd $(@D) && make package/symlinks
touch $@
update/%: openwrt/%
cd $< && svn update
cd $< && ./scripts/feeds update
cd $< && make package/symlinks
touch $</.repo_access
# format image/($repo)/openwrt-$(platform)-$(model).bin
.SECONDEXPANSION:
image/%: REPO=$(shell basename $(@D))
image/%: PLATFORM=$(shell echo $(@F) | cut -f2 -d-)
image/%: MODEL=$(shell echo $(@F) | cut -f3- -d-)
image/%: openwrt/$$(REPO)/.repo_access config/$$(REPO).config \
config/$$(REPO)-$$(PLATFORM).patch config/$$(REPO)-$$(PLATFORM)-$$(MODEL).patch
@echo === Building $(REPO), $(PLATFORM), $(MODEL) ===
cp config/$(REPO).config openwrt/$(REPO)/.config
patch openwrt/$(REPO)/.config <config/$(REPO)-$(PLATFORM).patch
patch openwrt/$(REPO)/.config <config/$(REPO)-$(PLATFORM)-$(MODEL).patch
-rm -r openwrt/$(REPO)/files openwrt/$(REPO)/bin/$(PLATFORM)
cp -a files/common openwrt/$(REPO)/files
rsync -a files/$(PLATFORM)/ openwrt/$(REPO)/files/
rsync -a files/$(PLATFORM)-$(MODEL)/ openwrt/$(REPO)/files/
cd openwrt/$(REPO) && $(MAKE)
mkdir -p $@
rsync -a openwrt/$(REPO)/bin/$(PLATFORM)/ $@/
|