source: freewrt/build.mk@ a3abab6

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

V wasn't effective there

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

  • Property mode set to 100644
File size: 3.2 KB
RevLine 
[635ae4b]1# $FreeWRT$
2#-
3# This file is part of the FreeWRT project. FreeWRT is copyrighted
4# material, please see the LICENCE file in the top-level directory
5# or at http://www.freewrt.org/license for details.
[8ec9389]6
[6d5c7cc]7TOPDIR=${shell pwd}
8export TOPDIR
9
10CONFIG_CONFIG_IN = Config.in
11CONFIG = package/config
12
[542263d]13noconfig_targets := menuconfig config tags autobuild
[6d5c7cc]14
15# Pull in the user's configuration file
16ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),)
17-include $(TOPDIR)/.config
18endif
[5a54ece]19ifeq ($(strip $(FWRT_HAVE_DOT_CONFIG)),y)
20else
21V:=99
22endif
[6d5c7cc]23include $(TOPDIR)/rules.mk
24
[f9ec0e7]25ifeq ($(strip $(FWRT_HAVE_DOT_CONFIG)),y)
[6d5c7cc]26all: world
27
28.NOTPARALLEL:
[925b0c7]29.PHONY: all world clean cleandir distclean image_clean target_clean
[6d5c7cc]30
[0ea1f3f]31world: $(DL_DIR) $(BUILD_DIR) $(STAMP_DIR)
[dff9faf]32 ${BASH} ${TOPDIR}/scripts/scan-pkgs.sh
[131a9d7]33 $(MAKE) -f build.mk tools/install toolchain/install target/compile package/compile root_clean package/install target/install package_index
[925b0c7]34 @$(TRACE) Build complete. See bin/ for the firmware and packages.
[6d5c7cc]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
[0ea1f3f]45$(STAMP_DIR):
46 @mkdir -p $(STAMP_DIR)
47
[6d5c7cc]48package/%:
49 @$(TRACE) $@
50 $(MAKE) -C package $(patsubst package/%,%,$@)
51
52target/%:
53 @$(TRACE) $@
54 $(MAKE) -C target $(patsubst target/%,%,$@)
55
56toolchain/%:
57 @$(TRACE) $@
[6ffb3bf]58 $(MAKE) -C toolchain $(patsubst toolchain/%,%,$@)
[6d5c7cc]59
[131a9d7]60tools/%:
61 @$(TRACE) $@
62 $(MAKE) -C tools $(patsubst tools/%,%,$@)
63
[6d5c7cc]64#############################################################
65#
66# Cleanup and misc junk
67#
68#############################################################
69root_clean:
70 @$(TRACE) root_clean
71 rm -rf $(BUILD_DIR)/linux-*/root $(BUILD_DIR)/root
72
73target_clean: root_clean
74 rm -f $(STAMP_DIR)/.*-compile
75 rm -f $(STAMP_DIR)/.*-install
76 rm -rf $(BIN_DIR)
77
[4ea6595]78cleandir:
79 @$(TRACE) cleandir
[6d5c7cc]80 @$(MAKE) -C $(CONFIG) clean
81 rm -rf $(BUILD_DIR) $(BIN_DIR)
[131a9d7]82 rm -rf $(TOOLS_BUILD_DIR) $(TOOLCHAIN_BUILD_DIR) $(STAGING_DIR)
83 rm -rf $(STAMP_DIR) $(TOOLS_STAMP_DIR) $(TOOLCHAIN_STAMP_DIR)
[4ea6595]84 rm -f .tmpconfig.h
[6d5c7cc]85
[4ea6595]86distclean:
87 @$(TRACE) distclean
88 @$(MAKE) -C $(CONFIG) clean
89 rm -rf $(BUILD_DIR) $(BIN_DIR) $(DL_DIR)
[131a9d7]90 rm -rf $(TOOLS_BUILD_DIR) $(TOOLCHAIN_BUILD_DIR) $(STAGING_DIR)
91 rm -rf $(STAMP_DIR) $(TOOLS_STAMP_DIR) $(TOOLCHAIN_STAMP_DIR)
[6d5c7cc]92 rm -f .config* .tmpconfig.h
93
[c04ece1]94else # ifeq ($(strip $(FWRT_HAVE_DOT_CONFIG)),y)
[6d5c7cc]95all: menuconfig
[5642350]96 @echo "Start the build with \"make\" or with \"make v\" to be verbose"
[6d5c7cc]97
[542263d]98tools/install-lbin:
99 $(MAKE) -C tools install-lbin
100
101endif # ifeq ($(strip $(FWRT_HAVE_DOT_CONFIG)),y)
[1085fd7]102
[6d5c7cc]103# configuration
104# ---------------------------------------------------------------------------
105
106$(CONFIG)/conf:
[542263d]107 @$(MAKE) -C $(CONFIG) conf >/dev/null 2>&1
[6d5c7cc]108$(CONFIG)/mconf:
[542263d]109 @$(MAKE) -C $(CONFIG) >/dev/null 2>&1
[6d5c7cc]110
111menuconfig: $(CONFIG)/mconf
[3e1f33c]112 @-touch .config
[6d5c7cc]113 @$(CONFIG)/mconf $(CONFIG_CONFIG_IN)
114
115config: $(CONFIG)/conf
[3e1f33c]116 @-touch .config
[6d5c7cc]117 @$(CONFIG)/conf $(CONFIG_CONFIG_IN)
118
119oldconfig: $(CONFIG)/conf
[3e1f33c]120 @-touch .config
[6d5c7cc]121 @$(CONFIG)/conf -o $(CONFIG_CONFIG_IN)
122
[925b0c7]123autobuild: $(CONFIG)/conf
[3e1f33c]124 @-touch .config
[925b0c7]125 @$(CONFIG)/conf -m $(CONFIG_CONFIG_IN)
[79128b4]126 @grep -v ^BUSYBOX .config > .config.autobuild
127 @cat .busybox-config .config.autobuild > .config
[e877ecf]128
129clean:
130 @$(TRACE) clean
131 @$(MAKE) -C $(CONFIG) clean
132 rm -rf $(BUILD_DIR) $(BIN_DIR)
Note: See TracBrowser for help on using the repository browser.