root/tags/freewrt_1_0_3/rules.mk

Revision 710, 1.6 kB (checked in by tg, 2 years ago)

add -fno-ident, on the host too (I wonder what host-built
files get into the target... libgcc probably)

Line 
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.
6
7 include $(TOPDIR)/lbin/prereq.mk
8 -include $(TOPDIR)/.config
9
10 ifeq ($(V),)
11 V=                      5
12 endif
13
14 ifneq ($(V),0)
15 TRACE:=                 echo "---> "
16 START_TRACE:=           echo -n "---> "
17 END_TRACE:=             echo
18 else
19 START_TRACE:=           :
20 END_TRACE:=             :
21 TRACE:=                 :
22 endif
23
24 ifeq (${shell [ "$(V)" -ge 5 ] && echo 1},)
25 CMD_TRACE:=             :
26 PKG_TRACE:=             :
27 else
28 CMD_TRACE:=             echo -n
29 PKG_TRACE:=             echo "------> "
30 endif
31
32 ifeq (${shell [ "$(V)" -ge 10 ] && echo 1},)
33 EXTRA_MAKEFLAGS:=       -s
34 MAKE_TRACE:=            >/dev/null 2>&1 || { echo "Build failed. Please re-run make with V=99 to see what's going on"; false; }
35 else
36 MAKE_TRACE:=
37 EXTRA_MAKEFLAGS:=
38 TRACE:=                 :
39 PKG_TRACE:=             :
40 CMD_TRACE:=             :
41 START_TRACE:=           :
42 END_TRACE:=             :
43 endif
44
45 ifeq (${shell [ "$(V)" -ge 90 ] && echo 1},)
46 SET_DASHX:=             :
47 else
48 SET_DASHX:=             set -x
49 endif
50
51 # Strip off the annoying quoting
52 ARCH:=                  $(strip $(subst ",, $(FWRT_ARCH)))
53 WGET:=                  $(strip $(subst ",, $(FWRT_WGET)))
54 TARGET_OPTIMIZATION:=   $(strip $(subst ",, $(FWRT_TARGET_OPTIMIZATION)))
55 FWRT_PREFIX:=           $(strip $(subst ",, $(FWRT_PREFIX)))
56 #"))"))"))"))")) # for vim's broken syntax highlighting :)
57
58 include $(TOPDIR)/mk/vars.mk
59
60 ifeq (${OStype},Linux)
61 MKPASSWD:=              $(STAGING_DIR)/bin/mkpasswd -H md5
62 else
63 MKPASSWD:=              encrypt -m
64 endif
65
66 export BASH HOSTCC HOSTCFLAGS LC_ALL MAKE OStype PATH
67 export UNAME_S UNAME_R UNAME_M
68
69 ifeq ($(strip ${CFLAGS}),)
70 CFLAGS:=                -Os -fno-ident
71 endif
72 ifeq ($(strip ${TARGET_CFLAGS}),)
73 TARGET_CFLAGS:=         -Os -fno-ident
74 endif
75
76 _show:
77         @echo '$($(show))'
Note: See TracBrowser for help on using the browser.