source: trunk/Makefile @ 694

Last change on this file since 694 was 694, checked in by amain, 4 years ago

Split firmware build from rootfs creation and debian build environment creation

File size: 2.4 KB
Line 
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
24TOPDIR:=$(CURDIR)
25
26LC_ALL:=C
27
28all: world
29
30include rules/functions.mk
31include rules/scripts.mk
32include rules/debwrt.mk
33include rules/users.mk
34include rules/help.mk
35include config/config.mk
36
37ifeq ($(CONFIG_DEBWRT_FIRMWARE),n)
38        include openwrt/openwrt.mk
39        include openwrt/openwrt-deliver.mk
40test1:
41        echo "hoi"
42endif
43
44include debian/debian.mk
45include plugins/plugins.mk
46
47world: .config openwrt/all debian/rootfs
48        @echo Make DebWrt completed
49        @echo
50        @echo "DEBWRTVERSION : $$DEBWRTVERSION"
51        @echo "TARGET_ARCH   : $$TARGET_ARCH"
52        @echo "BOARD         : $$BOARD"
53        @echo "SUB_BOARD     : $$SUB_BOARD"
54        @echo "LINUX_VERSION : $$OPENWRT_LINUX_VERSION ($$LINUX_VERSION)" 
55
56update-targets: openwrt/prepare
57        cat $(OPENWRT_BUILD_DIR)/tmp/.config-target.in \
58                |  awk 'BEGIN{ print "# note: this file has been generated" } \
59               /select HAS_SUB/ { print $0; next } \
60               /select[ \t]+[[:lower:]]+/ { print; next } \
61               /select/ {next} \
62               // { print $0 }' \
63        >$(TOPDIR)/config/target.in
64        cat $(OPENWRT_BUILD_DIR)/target/Config.in | grep -v 'source "tmp/.config-target.in"' >$(TOPDIR)/config/archs.in
65
66board:
67        @echo "Board    :" $(BOARD)
68        @echo "Sub-Board:" $(SUB_BOARD)
69
70flash:
71        cd $(INSTALL_DIR) && $(SCRIPT_FLASH) "$(call qstrip,$(CONFIG_FLASH_IP))" "$(CONFIG_DEBWRT_TARGET_IMAGE_NAME_TRX)" || echo
72        @echo "Note: wait a couple of minutes before rebooting your device. It takes time to write the firmware to the flash."
73
74clean: openwrt/clean debian/clean config/clean plugins/clean
75        @rm -f .config .config.old
76
77.PHONY: clean
78
79FORCE: ;
80.PHONY: FORCE
81.NOTPARALLEL:
82
83
Note: See TracBrowser for help on using the repository browser.