source: freewrt/rules.mk@ 655dec8

Last change on this file since 655dec8 was 064433a, checked in by Waldemar Brodkorb <wbx@…>, 19 years ago

introduce FWRT_DEVEL to mark platforms/boards which are not ready for release

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

  • Property mode set to 100644
File size: 2.7 KB
RevLine 
[1e977a4]1# $FreeWRT$
[635ae4b]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
[b9492d5]5# or at http://www.freewrt.org/licence for details.
[1e977a4]6
[b84b14f]7include $(TOPDIR)/lbin/prereq.mk
[9772d83]8-include $(TOPDIR)/.config
[b9492d5]9-include ${TOPDIR}/prefs.mk
[475ad56]10
11ifeq ($(V),)
[c746a832]12V= 5
[475ad56]13endif
14
15ifneq ($(V),0)
[c746a832]16TRACE:= echo "---> "
17START_TRACE:= echo -n "---> "
18END_TRACE:= echo
[475ad56]19else
[c746a832]20START_TRACE:= :
21END_TRACE:= :
22TRACE:= :
[475ad56]23endif
24
25ifeq (${shell [ "$(V)" -ge 5 ] && echo 1},)
[c746a832]26CMD_TRACE:= :
27PKG_TRACE:= :
[475ad56]28else
[c746a832]29CMD_TRACE:= echo -n
30PKG_TRACE:= echo "------> "
[475ad56]31endif
32
33ifeq (${shell [ "$(V)" -ge 10 ] && echo 1},)
[c746a832]34EXTRA_MAKEFLAGS:= -s
35MAKE_TRACE:= >/dev/null 2>&1 || { echo "Build failed. Please re-run make with V=99 to see what's going on"; false; }
[475ad56]36else
37MAKE_TRACE:=
38EXTRA_MAKEFLAGS:=
[c746a832]39TRACE:= :
40PKG_TRACE:= :
41CMD_TRACE:= :
42START_TRACE:= :
43END_TRACE:= :
[475ad56]44endif
45
[2bdf580]46ifeq (${shell [ "$(V)" -ge 90 ] && echo 1},)
[c746a832]47SET_DASHX:= :
[2bdf580]48else
[c746a832]49SET_DASHX:= set -x
[2bdf580]50endif
51
[475ad56]52# Strip off the annoying quoting
[c04ece1]53ARCH:= $(strip $(subst ",, $(FWRT_ARCH)))
54WGET:= $(strip $(subst ",, $(FWRT_WGET)))
55TARGET_OPTIMIZATION:= $(strip $(subst ",, $(FWRT_TARGET_OPTIMIZATION)))
[a3f04e0]56FWRT_PREFIX:= $(strip $(subst ",, $(FWRT_PREFIX)))
[475ad56]57#"))"))"))"))")) # for vim's broken syntax highlighting :)
58
[fa38bca]59ifneq ($(FWRT_USE_CCACHE),)
60TARGET_COMPILER_PREFIX+= ccache
61endif
62
[db5651c]63include $(TOPDIR)/mk/vars.mk
[9d1f6cc]64
[d6462e5]65ifeq (${OStype},Linux)
[c746a832]66MKPASSWD:= $(STAGING_DIR)/bin/mkpasswd -H md5
[d6462e5]67else
[c746a832]68MKPASSWD:= encrypt -m
[d6462e5]69endif
[ed3352a2]70
[b210cba]71ifeq ($(strip ${FWRT_HAVE_DOT_CONFIG}),y)
[2fb5d1a]72# XXX derive these from FWRT_* vars
73UNAME_S:= Linux
74
[0af9d4d]75ifeq ($(strip ${FWRT_LINUX_2_4_BRCM}),y)
76UNAME_R:= 2.4.34
77else ifeq ($(strip ${FWRT_LINUX_2_6_BRCM}),y)
78UNAME_R:= 2.6.19.1
79else ifeq ($(strip ${FWRT_LINUX_2_4_RB}),y)
80UNAME_R:= 2.4.34
[064433a]81else ifeq ($(strip ${FWRT_LINUX_2_4_X86}),y)
82UNAME_R:= 2.4.34
[0af9d4d]83else ifeq ($(strip ${FWRT_LINUX_2_6_RB}),y)
84UNAME_R:= 2.6.19.1
85else ifeq ($(strip ${FWRT_LINUX_2_6_X86}),y)
86UNAME_R:= 2.6.19.1
87else
88$(error Cannot determine target "uname -r" output)
89endif
90
91ifeq ($(strip ${FWRT_mipsel}),y)
92UNAME_M:= mips
93else ifeq ($(strip ${FWRT_i386}),y)
94UNAME_M:= i386
95else
96$(error Cannot determine target "uname -m" output)
97endif
[2fb5d1a]98
[ff5402d]99export UNAME_S UNAME_R UNAME_M
[b210cba]100else # ! ifeq ($(strip ${FWRT_HAVE_DOT_CONFIG}),y)
101UNAME_S= $(error This variable cannot be used without .config)
102UNAME_R= $(error This variable cannot be used without .config)
103UNAME_M= $(error This variable cannot be used without .config)
104endif # ! ifeq ($(strip ${FWRT_HAVE_DOT_CONFIG}),y)
105
106export BASH HOSTCC HOSTCFLAGS MAKE LANGUAGE LC_ALL OStype PATH
[dd02a42]107
[188d52d]108HOSTCPPFLAGS?=
109HOSTLDFLAGS?=
110
[8dba2b7]111HOST_CFLAGS:= ${HOSTCFLAGS}
[b9492d5]112TARGET_CFLAGS:= $(strip -Os -fno-ident ${TARGET_CFLAGS} -fwrapv -fhonour-copts)
[de1d22f]113
[b9492d5]114ifneq (${show},)
[dd02a42]115_show:
116 @echo '$($(show))'
[b9492d5]117endif
Note: See TracBrowser for help on using the repository browser.