source: freewrt/Makefile@ 4a83e29

freewrt_1_0 freewrt_2_0
Last change on this file since 4a83e29 was 4a83e29, checked in by Waldemar Brodkorb <wbx@…>, 20 years ago

change description title

git-svn-id: svn://www.freewrt.org/trunk/freewrt@40 afb5a338-a214-0410-bd46-81f09a774fd1

  • Property mode set to 100644
File size: 4.2 KB
Line 
1# Makefile for FreeWRT development environment
2#
3# Copyright (C) 2005 by Felix Fietkau <openwrt@nbd.name>
4# Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
5#
6# This program is free software; you can redistribute it and/or modify
7# it under the terms of the GNU General Public License as published by
8# the Free Software Foundation; either version 2 of the License, or
9# (at your option) any later version.
10#
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14# General Public License for more details.
15#
16# You should have received a copy of the GNU General Public License
17# along with this program; if not, write to the Free Software
18# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19#
20
21#--------------------------------------------------------------
22# Just run 'make menuconfig', configure stuff, then run 'make'.
23# You shouldn't need to mess with anything beyond this point...
24#--------------------------------------------------------------
25TOPDIR=${shell pwd}
26export TOPDIR
27
28ifneq ($(DEVELOPER),)
29CONFIG_CONFIG_IN = Config.in.devel
30else
31CONFIG_CONFIG_IN = Config.in
32endif
33CONFIG = package/config
34
35noconfig_targets := menuconfig config oldconfig randconfig \
36 allyesconfig allnoconfig tags
37
38# Pull in the user's configuration file
39ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),)
40-include $(TOPDIR)/.config
41endif
42
43ifeq ($(strip $(BR2_HAVE_DOT_CONFIG)),y)
44include $(TOPDIR)/rules.mk
45
46all: world
47
48.NOTPARALLEL:
49.PHONY: all world clean dirclean distclean image_clean target_clean source configtest
50
51#############################################################
52#
53# You should probably leave this stuff alone unless you know
54# what you are doing.
55#
56#############################################################
57
58# In this section, we need .config
59include .config.cmd
60
61world: $(DL_DIR) $(BUILD_DIR) configtest
62 $(MAKE) toolchain/install target/compile package/compile root_clean package/install target/install package_index
63 @$(TRACE) Build complete.
64
65configtest:
66 -cp .config .config.test
67 -scripts/configtest.pl
68
69package_index:
70 (cd $(PACKAGE_DIR); $(STAGING_DIR)/usr/bin/ipkg-make-index . > Packages)
71
72$(DL_DIR):
73 @mkdir -p $(DL_DIR)
74
75$(BUILD_DIR):
76 @mkdir -p $(BUILD_DIR)
77
78source: toolchain/source package/source target/source
79
80package/%:
81 @$(TRACE) $@
82 $(MAKE) -C package $(patsubst package/%,%,$@)
83
84target/%:
85 @$(TRACE) $@
86 $(MAKE) -C target $(patsubst target/%,%,$@)
87
88toolchain/%:
89 @$(TRACE) $@
90 $(MAKE) -C toolchain $(patsubst toolchain/%,%,$@)
91
92#############################################################
93#
94# Cleanup and misc junk
95#
96#############################################################
97root_clean:
98 @$(TRACE) root_clean
99 rm -rf $(BUILD_DIR)/linux-*/root $(BUILD_DIR)/root
100
101target_clean: root_clean
102 rm -f $(STAMP_DIR)/.*-compile
103 rm -f $(STAMP_DIR)/.*-install
104 rm -rf $(BIN_DIR)
105
106clean: dirclean
107
108dirclean:
109 @$(TRACE) dirclean
110 @$(MAKE) -C $(CONFIG) clean
111 rm -rf $(BUILD_DIR) $(BIN_DIR)
112
113distclean: dirclean
114 rm -rf $(STAMP_DIR) $(TOOL_BUILD_DIR) $(STAGING_DIR)
115 rm -f .config* .tmpconfig.h
116
117else # ifeq ($(strip $(BR2_HAVE_DOT_CONFIG)),y)
118
119all: menuconfig
120
121# configuration
122# ---------------------------------------------------------------------------
123
124$(CONFIG)/conf:
125 $(MAKE) -C $(CONFIG) conf
126$(CONFIG)/mconf:
127 $(MAKE) -C $(CONFIG)
128
129menuconfig: $(CONFIG)/mconf
130 -touch .config
131 -cp .config .config.test
132 @$(CONFIG)/mconf $(CONFIG_CONFIG_IN)
133 -./scripts/configtest.pl
134
135config: $(CONFIG)/conf
136 -touch .config
137 -cp .config .config.test
138 @$(CONFIG)/conf $(CONFIG_CONFIG_IN)
139 -./scripts/configtest.pl
140
141oldconfig: $(CONFIG)/conf
142 -touch .config
143 -cp .config .config.test
144 @$(CONFIG)/conf -o $(CONFIG_CONFIG_IN)
145 -./scripts/configtest.pl
146
147randconfig: $(CONFIG)/conf
148 -touch .config
149 -cp .config .config.test
150 @$(CONFIG)/conf -r $(CONFIG_CONFIG_IN)
151 -./scripts/configtest.pl
152
153allyesconfig: $(CONFIG)/conf
154 -touch .config
155 -cp .config .config.test
156 @$(CONFIG)/conf -o $(CONFIG_CONFIG_IN)
157 -./scripts/configtest.pl
158
159allnoconfig: $(CONFIG)/conf
160 -touch .config
161 -cp .config .config.test
162 @$(CONFIG)/conf -n $(CONFIG_CONFIG_IN)
163 -./scripts/configtest.pl
164
165endif # ifeq ($(strip $(BR2_HAVE_DOT_CONFIG)),y)
Note: See TracBrowser for help on using the repository browser.