source: trunk/Makefile @ 917

Last change on this file since 917 was 903, checked in by amain, 2 years ago

native: octeon erlite install

File size: 3.1 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),y)
38ifeq ($(CONFIG_DEBWRT_FIRMWARE_NATIVE),y)
39        include arch/octeon/erlite/arch.mk
40        include arch/octeon/erlite/arch-deliver.mk
41else
42        include openwrt/openwrt.mk
43        include openwrt/openwrt-deliver.mk
44endif
45endif
46
47include debian/debian.mk
48include plugins/plugins.mk
49
50include qemu/qemu.mk
51
52world: .config openwrt/all debian/rootfs
53        @echo Make DebWrt completed
54        @echo
55        @echo "DEBWRTVERSION : $$DEBWRTVERSION"
56        @echo "TARGET_ARCH   : $$TARGET_ARCH"
57        @echo "TARGET        : $$TARGET"
58        @echo "SUB_TARGET    : $$SUB_TARGET"
59        @echo "LINUX_VERSION : $$OPENWRT_LINUX_VERSION ($$LINUX_VERSION)" 
60
61update-targets: openwrt/prepare
62        cat $(OPENWRT_BUILD_DIR)/tmp/.config-target.in \
63                |  awk 'BEGIN{ print "# note: this file has been generated" } \
64               /select HAS_SUB/ { print $0; next } \
65               /select[ \t]+[[:lower:]]+/ { print; next } \
66               /select/ {next} \
67               // { print $0 }' \
68        >$(TOPDIR)/config/firmware/openwrt/target/target.in
69        cat $(OPENWRT_BUILD_DIR)/target/Config.in | grep -v 'source "tmp/.config-target.in"' >$(TOPDIR)/config/firmware/openwrt/target/archs.in
70
71board:
72        @echo "Architecture: " $(TARGET_ARCH)
73        @echo "Target      : " $(TARGET)
74        @echo "Sub-Target  : " $(SUB_TARGET)
75
76flash:
77        cd $(INSTALL_DIR) && $(SCRIPT_FLASH) "$(call qstrip,$(CONFIG_FLASH_IP))" "$(CONFIG_DEBWRT_TARGET_IMAGE_NAME_TRX)" || echo
78        @echo "Note: wait a couple of minutes before rebooting your device. It takes time to write the firmware to the flash."
79
80ifeq ($(CONFIG_DEBWRT_FIRMWARE),y)
81clean: openwrt/clean debian/clean plugins/clean
82else
83clean: debian/clean config/clean plugins/clean
84endif
85        rm -rf $(BIN_DIR)
86
87ifeq ($(CONFIG_DEBWRT_FIRMWARE),y)
88dirclean: openwrt/dirclean debian/clean config/clean plugins/clean
89else
90dirclean: debian/clean config/clean plugins/clean
91endif
92        rm -rf $(BIN_DIR)
93
94ifeq ($(CONFIG_DEBWRT_FIRMWARE),y)
95distclean: openwrt/distclean debian/clean config/clean plugins/clean
96else
97distclean: debian/clean config/clean plugins/clean
98endif
99        rm -rf $(BIN_DIR)
100        rm -rf $(BUILD_DIR)
101        rm -f .config
102
103
104.PHONY: clean all world flash board update-targets
105
106FORCE: ;
107.PHONY: FORCE
108.NOTPARALLEL:
Note: See TracBrowser for help on using the repository browser.