source: freewrt/build.mk@ 5642350

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

add a short notice after configuring the system, suggestion by rob on the way to stuttgart, hacking in the train ;)

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

  • Property mode set to 100644
File size: 3.1 KB
Line 
1# $Id$
2#--------------------------------------------------------------
3# Just run 'make menuconfig', configure stuff, then run 'make'.
4# You shouldn't need to mess with anything beyond this point...
5#--------------------------------------------------------------
6
7TOPDIR=${shell pwd}
8export TOPDIR
9
10CONFIG_CONFIG_IN = Config.in
11CONFIG = package/config
12
13noconfig_targets := menuconfig config oldconfig randconfig \
14 allyesconfig allnoconfig tags
15
16# Pull in the user's configuration file
17ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),)
18-include $(TOPDIR)/.config
19endif
20
21ifeq ($(strip $(BR2_HAVE_DOT_CONFIG)),y)
22include $(TOPDIR)/rules.mk
23
24all: world
25
26.NOTPARALLEL:
27.PHONY: all world clean cleandir distclean image_clean target_clean source
28
29# In this section, we need .config
30include .config.cmd
31
32world: $(DL_DIR) $(BUILD_DIR) $(STAMP_DIR)
33 $(MAKE) -f build.mk toolchain/install target/compile package/compile root_clean package/install target/install package_index
34 @$(TRACE) Build complete.
35
36package_index:
37 (cd $(PACKAGE_DIR); $(STAGING_DIR)/usr/bin/ipkg-make-index . > Packages)
38
39$(DL_DIR):
40 @mkdir -p $(DL_DIR)
41
42$(BUILD_DIR):
43 @mkdir -p $(BUILD_DIR)
44
45$(STAMP_DIR):
46 @mkdir -p $(STAMP_DIR)
47
48source: toolchain/source package/source target/source
49
50package/%:
51 @$(TRACE) $@
52 $(MAKE) -C package $(patsubst package/%,%,$@)
53
54target/%:
55 @$(TRACE) $@
56 $(MAKE) -C target $(patsubst target/%,%,$@)
57
58toolchain/%:
59 @$(TRACE) $@
60 $(MAKE) -C toolchain $(patsubst toolchain/%,%,$@)
61
62#############################################################
63#
64# Cleanup and misc junk
65#
66#############################################################
67root_clean:
68 @$(TRACE) root_clean
69 rm -rf $(BUILD_DIR)/linux-*/root $(BUILD_DIR)/root
70
71target_clean: root_clean
72 rm -f $(STAMP_DIR)/.*-compile
73 rm -f $(STAMP_DIR)/.*-install
74 rm -rf $(BIN_DIR)
75
76clean:
77 @$(TRACE) clean
78 @$(MAKE) -C $(CONFIG) clean
79 rm -rf $(BUILD_DIR) $(BIN_DIR)
80
81cleandir:
82 @$(TRACE) cleandir
83 @$(MAKE) -C $(CONFIG) clean
84 rm -rf $(BUILD_DIR) $(BIN_DIR)
85 rm -rf $(STAMP_DIR) $(TOOLCHAIN_BUILD_DIR) $(STAGING_DIR)
86 rm -f .tmpconfig.h
87
88distclean:
89 @$(TRACE) distclean
90 @$(MAKE) -C $(CONFIG) clean
91 rm -rf $(BUILD_DIR) $(BIN_DIR) $(DL_DIR)
92 rm -rf $(STAMP_DIR) $(TOOLCHAIN_BUILD_DIR) $(STAGING_DIR)
93 rm -f .config* .tmpconfig.h
94
95else # ifeq ($(strip $(BR2_HAVE_DOT_CONFIG)),y)
96
97include $(TOPDIR)/lbin/prereq.mk
98
99all: menuconfig
100 @echo "Start the build with \"make\" or with \"make v\" to be verbose"
101
102# configuration
103# ---------------------------------------------------------------------------
104
105$(CONFIG)/conf:
106 $(MAKE) -C $(CONFIG) conf
107$(CONFIG)/mconf:
108 $(MAKE) -C $(CONFIG)
109
110menuconfig: $(CONFIG)/mconf
111 -touch .config
112 @$(CONFIG)/mconf $(CONFIG_CONFIG_IN)
113
114config: $(CONFIG)/conf
115 -touch .config
116 @$(CONFIG)/conf $(CONFIG_CONFIG_IN)
117
118oldconfig: $(CONFIG)/conf
119 -touch .config
120 @$(CONFIG)/conf -o $(CONFIG_CONFIG_IN)
121
122randconfig: $(CONFIG)/conf
123 -touch .config
124 @$(CONFIG)/conf -r $(CONFIG_CONFIG_IN)
125
126allyesconfig: $(CONFIG)/conf
127 -touch .config
128 @$(CONFIG)/conf -o $(CONFIG_CONFIG_IN)
129
130allnoconfig: $(CONFIG)/conf
131 -touch .config
132 @$(CONFIG)/conf -n $(CONFIG_CONFIG_IN)
133
134endif # ifeq ($(strip $(BR2_HAVE_DOT_CONFIG)),y)
Note: See TracBrowser for help on using the repository browser.