source: freewrt/build.mk@ 2406422

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

cosmetic changes to Makefile/build.mk
remove configtest.pl
cosmetic changes in freewrt/toolchain/sed/Makefile, add md5sum

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

  • Property mode set to 100644
File size: 4.0 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
28CONFIG_CONFIG_IN = Config.in
29CONFIG = package/config
30
31noconfig_targets := menuconfig config oldconfig randconfig \
32 allyesconfig allnoconfig tags
33
34# Pull in the user's configuration file
35ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),)
36-include $(TOPDIR)/.config
37endif
38
39ifeq ($(strip $(BR2_HAVE_DOT_CONFIG)),y)
40include $(TOPDIR)/rules.mk
41
42all: world
43
44.NOTPARALLEL:
45.PHONY: all world clean cleandir distclean image_clean target_clean source
46
47#############################################################
48#
49# You should probably leave this stuff alone unless you know
50# what you are doing.
51#
52#############################################################
53
54# In this section, we need .config
55include .config.cmd
56
57world: $(DL_DIR) $(BUILD_DIR)
58 $(MAKE) -f build.mk toolchain/install target/compile package/compile root_clean package/install target/install package_index
59 @$(TRACE) Build complete.
60
61package_index:
62 (cd $(PACKAGE_DIR); $(STAGING_DIR)/usr/bin/ipkg-make-index . > Packages)
63
64$(DL_DIR):
65 @mkdir -p $(DL_DIR)
66
67$(BUILD_DIR):
68 @mkdir -p $(BUILD_DIR)
69
70source: toolchain/source package/source target/source
71
72package/%:
73 @$(TRACE) $@
74 $(MAKE) -C package $(patsubst package/%,%,$@)
75
76target/%:
77 @$(TRACE) $@
78 $(MAKE) -C target $(patsubst target/%,%,$@)
79
80toolchain/%:
81 @$(TRACE) $@
82 $(MAKE) -C toolchain $(patsubst toolchain/%,%,$@)
83
84#############################################################
85#
86# Cleanup and misc junk
87#
88#############################################################
89root_clean:
90 @$(TRACE) root_clean
91 rm -rf $(BUILD_DIR)/linux-*/root $(BUILD_DIR)/root
92
93target_clean: root_clean
94 rm -f $(STAMP_DIR)/.*-compile
95 rm -f $(STAMP_DIR)/.*-install
96 rm -rf $(BIN_DIR)
97
98clean:
99 @$(TRACE) clean
100 @$(MAKE) -C $(CONFIG) clean
101 rm -rf $(BUILD_DIR) $(BIN_DIR)
102
103cleandir:
104 @$(TRACE) cleandir
105 @$(MAKE) -C $(CONFIG) clean
106 rm -rf $(BUILD_DIR) $(BIN_DIR)
107 rm -rf $(STAMP_DIR) $(TOOL_BUILD_DIR) $(STAGING_DIR)
108 rm -f .tmpconfig.h
109
110distclean:
111 @$(TRACE) distclean
112 @$(MAKE) -C $(CONFIG) clean
113 rm -rf $(BUILD_DIR) $(BIN_DIR) $(DL_DIR)
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 @$(CONFIG)/mconf $(CONFIG_CONFIG_IN)
132
133config: $(CONFIG)/conf
134 -touch .config
135 @$(CONFIG)/conf $(CONFIG_CONFIG_IN)
136
137oldconfig: $(CONFIG)/conf
138 -touch .config
139 @$(CONFIG)/conf -o $(CONFIG_CONFIG_IN)
140
141randconfig: $(CONFIG)/conf
142 -touch .config
143 @$(CONFIG)/conf -r $(CONFIG_CONFIG_IN)
144
145allyesconfig: $(CONFIG)/conf
146 -touch .config
147 @$(CONFIG)/conf -o $(CONFIG_CONFIG_IN)
148
149allnoconfig: $(CONFIG)/conf
150 -touch .config
151 @$(CONFIG)/conf -n $(CONFIG_CONFIG_IN)
152
153endif # ifeq ($(strip $(BR2_HAVE_DOT_CONFIG)),y)
Note: See TracBrowser for help on using the repository browser.