source: freewrt/build.mk@ c04ece1

freewrt_1_0 freewrt_2_0
Last change on this file since c04ece1 was c04ece1, checked in by Thorsten Glaser <tg@…>, 19 years ago

as discussed with wbx@ some 2-3 weeks ago, change
the BR2_ prefix to FWRT_

tested with a standard build (only the squashfs
image since the jffs2 didn't get built)

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

  • Property mode set to 100644
File size: 3.4 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 $(FWRT_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 ${BASH} ${TOPDIR}/scripts/scan-pkgs.sh
34 $(MAKE) -f build.mk tools/install toolchain/install target/compile package/compile root_clean package/install target/install package_index
35 @$(TRACE) Build complete.
36
37package_index:
38 (cd $(PACKAGE_DIR); $(STAGING_DIR)/usr/bin/ipkg-make-index . > Packages)
39
40$(DL_DIR):
41 @mkdir -p $(DL_DIR)
42
43$(BUILD_DIR):
44 @mkdir -p $(BUILD_DIR)
45
46$(STAMP_DIR):
47 @mkdir -p $(STAMP_DIR)
48
49source: tools/source toolchain/source package/source target/source
50
51package/%:
52 @$(TRACE) $@
53 $(MAKE) -C package $(patsubst package/%,%,$@)
54
55target/%:
56 @$(TRACE) $@
57 $(MAKE) -C target $(patsubst target/%,%,$@)
58
59toolchain/%:
60 @$(TRACE) $@
61 $(MAKE) -C toolchain $(patsubst toolchain/%,%,$@)
62
63tools/%:
64 @$(TRACE) $@
65 $(MAKE) -C tools $(patsubst tools/%,%,$@)
66
67#############################################################
68#
69# Cleanup and misc junk
70#
71#############################################################
72root_clean:
73 @$(TRACE) root_clean
74 rm -rf $(BUILD_DIR)/linux-*/root $(BUILD_DIR)/root
75
76target_clean: root_clean
77 rm -f $(STAMP_DIR)/.*-compile
78 rm -f $(STAMP_DIR)/.*-install
79 rm -rf $(BIN_DIR)
80
81clean:
82 @$(TRACE) clean
83 @$(MAKE) -C $(CONFIG) clean
84 rm -rf $(BUILD_DIR) $(BIN_DIR)
85
86cleandir:
87 @$(TRACE) cleandir
88 @$(MAKE) -C $(CONFIG) clean
89 rm -rf $(BUILD_DIR) $(BIN_DIR)
90 rm -rf $(TOOLS_BUILD_DIR) $(TOOLCHAIN_BUILD_DIR) $(STAGING_DIR)
91 rm -rf $(STAMP_DIR) $(TOOLS_STAMP_DIR) $(TOOLCHAIN_STAMP_DIR)
92 rm -f .tmpconfig.h
93
94distclean:
95 @$(TRACE) distclean
96 @$(MAKE) -C $(CONFIG) clean
97 rm -rf $(BUILD_DIR) $(BIN_DIR) $(DL_DIR)
98 rm -rf $(TOOLS_BUILD_DIR) $(TOOLCHAIN_BUILD_DIR) $(STAGING_DIR)
99 rm -rf $(STAMP_DIR) $(TOOLS_STAMP_DIR) $(TOOLCHAIN_STAMP_DIR)
100 rm -f .config* .tmpconfig.h
101
102else # ifeq ($(strip $(FWRT_HAVE_DOT_CONFIG)),y)
103
104include $(TOPDIR)/lbin/prereq.mk
105
106all: menuconfig
107 @echo "Start the build with \"make\" or with \"make v\" to be verbose"
108
109# configuration
110# ---------------------------------------------------------------------------
111
112$(CONFIG)/conf:
113 $(MAKE) -C $(CONFIG) conf
114$(CONFIG)/mconf:
115 $(MAKE) -C $(CONFIG)
116
117menuconfig: $(CONFIG)/mconf
118 -touch .config
119 @$(CONFIG)/mconf $(CONFIG_CONFIG_IN)
120
121config: $(CONFIG)/conf
122 -touch .config
123 @$(CONFIG)/conf $(CONFIG_CONFIG_IN)
124
125oldconfig: $(CONFIG)/conf
126 -touch .config
127 @$(CONFIG)/conf -o $(CONFIG_CONFIG_IN)
128
129randconfig: $(CONFIG)/conf
130 -touch .config
131 @$(CONFIG)/conf -r $(CONFIG_CONFIG_IN)
132
133allyesconfig: $(CONFIG)/conf
134 -touch .config
135 @$(CONFIG)/conf -o $(CONFIG_CONFIG_IN)
136
137allnoconfig: $(CONFIG)/conf
138 -touch .config
139 @$(CONFIG)/conf -n $(CONFIG_CONFIG_IN)
140
141endif # ifeq ($(strip $(FWRT_HAVE_DOT_CONFIG)),y)
Note: See TracBrowser for help on using the repository browser.