1 | # DebWrt - Debian on Embedded devices |
---|
2 | # |
---|
3 | # Copyright (C) 2010 Johan van Zoomeren <amain@debwrt.net> |
---|
4 | # |
---|
5 | # This program is free software: you can redistribute it and/or modify |
---|
6 | # it under the terms of the GNU General Public License as published by |
---|
7 | # the Free Software Foundation, either version 3 of the License, or |
---|
8 | # (at your option) any later version. |
---|
9 | # |
---|
10 | # This program is distributed in the hope that it will be useful, |
---|
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
13 | # GNU General Public License for more details. |
---|
14 | # |
---|
15 | # You should have received a copy of the GNU General Public License |
---|
16 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
---|
17 | |
---|
18 | # Debuging make file |
---|
19 | #OLD_SHELL := $(SHELL) |
---|
20 | #SHELL = $(warning [$@ ($^) ($?)])$(OLD_SHELL) |
---|
21 | # |
---|
22 | # make --debug=basic |
---|
23 | |
---|
24 | TOPDIR:=${CURDIR} |
---|
25 | |
---|
26 | LC_ALL:=C |
---|
27 | |
---|
28 | all: world |
---|
29 | |
---|
30 | include rules/functions.mk |
---|
31 | include rules/scripts.mk |
---|
32 | include rules/debwrt.mk |
---|
33 | include rules/users.mk |
---|
34 | include rules/help.mk |
---|
35 | include config/config.mk |
---|
36 | include openwrt/openwrt.mk |
---|
37 | include openwrt/openwrt-deliver.mk |
---|
38 | include debian/debian.mk |
---|
39 | include plugins/plugins.mk |
---|
40 | |
---|
41 | world: .config openwrt/all debian/rootfs |
---|
42 | @echo Make DebWrt completed |
---|
43 | @echo |
---|
44 | @echo "DEBWRTVERSION : $$DEBWRTVERSION" |
---|
45 | @echo "TARGET_ARCH : $$TARGET_ARCH" |
---|
46 | @echo "BOARD : $$BOARD" |
---|
47 | @echo "SUB_BOARD : $$SUB_BOARD" |
---|
48 | @echo "LINUX_VERSION : $$OPENWRT_LINUX_VERSION ($$LINUX_VERSION)" |
---|
49 | |
---|
50 | update-targets: openwrt/prepare |
---|
51 | cat $(OPENWRT_BUILD_DIR)/tmp/.config-target.in \ |
---|
52 | | awk 'BEGIN{ print "# note: this file has been generated" } \ |
---|
53 | /select HAS_SUB/ { print $0; next } \ |
---|
54 | /select[ \t]+[[:lower:]]+/ { print; next } \ |
---|
55 | /select/ {next} \ |
---|
56 | // { print $0 }' \ |
---|
57 | >${TOPDIR}/config/config-target.in |
---|
58 | cat $(OPENWRT_BUILD_DIR)/target/Config.in | grep -v 'source "tmp/.config-target.in"' >$(TOPDIR)/config/archs.in |
---|
59 | |
---|
60 | board: |
---|
61 | @echo "Board :" ${BOARD} |
---|
62 | @echo "Sub-Board:" ${SUB_BOARD} |
---|
63 | |
---|
64 | flash: |
---|
65 | cd $(INSTALL_DIR) && $(SCRIPT_FLASH) "$(call qstrip,$(CONFIG_FLASH_IP))" "$(CONFIG_DEBWRT_TARGET_IMAGE_NAME_TRX)" || echo |
---|
66 | @echo "Note: wait a couple of minutes before rebooting your device. It takes time to write the firmware to the flash." |
---|
67 | |
---|
68 | clean: openwrt/clean openwrt/debwrt-clean debian/package/clean debian/buildenv/clean debian/rootfs/clean config-clean |
---|
69 | @rm -f .config .config.old |
---|
70 | |
---|
71 | FORCE: ; |
---|
72 | .PHONY: FORCE |
---|
73 | .NOTPARALLEL: |
---|
74 | |
---|
75 | |
---|