remove cpu clock entry - causes problems to some new routers
[tomato.git] / toolchain / Makefile
bloba762a022b3d4a063b548f1d19e95cb39fa036c91
1 # Makefile for OpenWrt
3 # Copyright (C) 2007 OpenWrt.org
5 # This is free software, licensed under the GNU General Public License v2.
6 # See /LICENSE for more information.
9 TOPDIR:=${CURDIR}
10 LC_ALL:=C
11 LANG:=C
12 export TOPDIR LC_ALL LANG
15 world:
17 include $(TOPDIR)/include/host.mk
19 ifneq ($(OPENWRT_BUILD),1)
20 # XXX: these three lines are normally defined by rules.mk
21 # but we can't include that file in this context
22 empty:=
23 space:= $(empty) $(empty)
24 _SINGLE=MAKEFLAGS=$(space)
26 override OPENWRT_BUILD=1
27 export OPENWRT_BUILD
28 include $(TOPDIR)/include/debug.mk
29 include $(TOPDIR)/include/depends.mk
30 include $(TOPDIR)/include/toplevel.mk
31 else
32 include rules.mk
33 include $(INCLUDE_DIR)/depends.mk
34 include $(INCLUDE_DIR)/subdir.mk
35 include tools/Makefile
36 include toolchain/Makefile
38 $(toolchain/stamp-install): $(tools/stamp-install)
39 #$(target/stamp-compile): $(toolchain/stamp-install) $(tools/stamp-install) $(BUILD_DIR)/.prepared
40 #$(package/stamp-cleanup): $(target/stamp-compile)
41 #$(package/stamp-compile): $(target/stamp-compile) $(package/stamp-cleanup)
42 #$(package/stamp-install): $(package/stamp-compile)
43 #$(package/stamp-rootfs-prepare): $(package/stamp-install)
44 #$(target/stamp-install): $(package/stamp-compile) $(package/stamp-install) $(package/stamp-rootfs-prepare)
47 $(BUILD_DIR)/.prepared: Makefile
48 @mkdir -p $$(dirname $@)
49 @touch $@
51 clean: FORCE
52 rm -rf $(BUILD_DIR) $(BIN_DIR)
54 dirclean: clean
55 rm -rf $(STAGING_DIR) $(STAGING_DIR_HOST) $(STAGING_DIR_TOOLCHAIN) $(TOOLCHAIN_DIR) $(BUILD_DIR_HOST)
56 rm -rf $(TMP_DIR)
58 # check prerequisites before starting to build
59 prereq: ;
61 prepare: .config $(tools/stamp-install) $(toolchain/stamp-install)
63 # build toolchain
64 world: prepare FORCE
65 # Strip binaries
66 $(RSTRIP) $(TOOLCHAIN_DIR)/bin
67 $(RSTRIP) $(TOOLCHAIN_DIR)/$(ARCH)-linux-uclibc/bin
68 # Fix includes
69 ifeq ($(CONFIG_LINUX_2_4),y)
70 -rm $(TOOLCHAIN_DIR)/include/sys/inotify.h
71 endif
72 -tar -C toolchain/kernel-headers/extras/ --exclude='.svn' -cf - include | tar -C $(TOOLCHAIN_DIR) -xf -
74 # Create addtional symlinks
75 ln -sf $(ARCH)-linux-gcc $(TOOLCHAIN_DIR)/bin/$(ARCH)-linux-cc
76 ln -sf $(ARCH)-linux-uclibc-g\+\+ $(TOOLCHAIN_DIR)/bin/$(ARCH)-uclibc-g\+\+
77 ln -sf $(ARCH)-linux-uclibc-ar $(TOOLCHAIN_DIR)/bin/$(ARCH)-uclibc-ar
78 ln -sf $(ARCH)-linux-uclibc-gcc $(TOOLCHAIN_DIR)/bin/$(ARCH)-uclibc-gcc
79 ln -sf $(ARCH)-linux-uclibc-gcc-$(GCCV) $(TOOLCHAIN_DIR)/bin/$(ARCH)-uclibc-gcc-$(GCCV)
80 ln -sf $(ARCH)-linux-uclibc-ld $(TOOLCHAIN_DIR)/bin/$(ARCH)-uclibc-ld
81 ln -sf $(ARCH)-linux-uclibc-nm $(TOOLCHAIN_DIR)/bin/$(ARCH)-uclibc-nm
82 ln -sf $(ARCH)-linux-uclibc-objcopy $(TOOLCHAIN_DIR)/bin/$(ARCH)-uclibc-objcopy
83 ln -sf $(ARCH)-linux-uclibc-objdump $(TOOLCHAIN_DIR)/bin/$(ARCH)-uclibc-objdump
84 ln -sf $(ARCH)-linux-uclibc-ranlib $(TOOLCHAIN_DIR)/bin/$(ARCH)-uclibc-ranlib
85 ln -sf $(ARCH)-linux-uclibc-size $(TOOLCHAIN_DIR)/bin/$(ARCH)-uclibc-size
86 ln -sf $(ARCH)-linux-uclibc-strings $(TOOLCHAIN_DIR)/bin/$(ARCH)-uclibc-strings
87 ln -sf $(ARCH)-linux-uclibc-strip $(TOOLCHAIN_DIR)/bin/$(ARCH)-uclibc-strip
90 #world: prepare $(target/stamp-compile) $(package/stamp-cleanup) $(package/stamp-compile) $(package/stamp-install) $(package/stamp-rootfs-prepare) $(target/stamp-install) FORCE
91 # $(SUBMAKE) package/index
93 # update all feeds, re-create index files, install symlinks
94 #package/symlinks:
95 # $(SCRIPT_DIR)/feeds update -a
96 # $(SCRIPT_DIR)/feeds install -a
98 # re-create index files, install symlinks
99 #package/symlinks-install:
100 # $(SCRIPT_DIR)/feeds update -i
101 # $(SCRIPT_DIR)/feeds install -a
103 # remove all symlinks, don't touch ./feeds
104 #package/symlinks-clean:
105 # $(SCRIPT_DIR)/feeds uninstall -a
107 .PHONY: clean dirclean prereq prepare world package/symlinks package/symlinks-install package/symlinks-clean
109 endif