| 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 | |
|---|
| 40 | world: .config openwrt/all debian/rootfs |
|---|
| 41 | @echo Make DebWrt completed |
|---|
| 42 | @echo |
|---|
| 43 | @echo "DEBWRTVERSION : $$DEBWRTVERSION" |
|---|
| 44 | @echo "TARGET_ARCH : $$TARGET_ARCH" |
|---|
| 45 | @echo "BOARD : $$BOARD" |
|---|
| 46 | @echo "SUB_BOARD : $$SUB_BOARD" |
|---|
| 47 | @echo "LINUX_VERSION : $$OPENWRT_LINUX_VERSION ($$LINUX_VERSION)" |
|---|
| 48 | |
|---|
| 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 | |
|---|
| 67 | clean: config-clean openwrt/clean debian/package/clean debian/buildenv/clean debian/rootfs/clean |
|---|
| 68 | @rm -f .config .config.old |
|---|
| 69 | |
|---|
| 70 | FORCE: ; |
|---|
| 71 | .PHONY: FORCE |
|---|
| 72 | .NOTPARALLEL: |
|---|
| 73 | |
|---|
| 74 | |
|---|