annotate examples/build_Make.params @ 3229:50ae55e2e856

Implemented support for I2C [Bugzilla 1001397]
author vae
date Fri, 26 Apr 2013 16:42:48 +0000
parents ba637aa555ec
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
436
f44d40e6cdd3 Improve makefile build tools
gthomas
parents:
diff changeset
1 #! /bin/sh
f44d40e6cdd3 Improve makefile build tools
gthomas
parents:
diff changeset
2
f44d40e6cdd3 Improve makefile build tools
gthomas
parents:
diff changeset
3 # This script will set up a Makefile fragment with
f44d40e6cdd3 Improve makefile build tools
gthomas
parents:
diff changeset
4 # platform specifics. This fragement can be used by
f44d40e6cdd3 Improve makefile build tools
gthomas
parents:
diff changeset
5 # the automatically generated Makefile (via the script
f44d40e6cdd3 Improve makefile build tools
gthomas
parents:
diff changeset
6 # 'build_Makefile')
f44d40e6cdd3 Improve makefile build tools
gthomas
parents:
diff changeset
7
1197
e68cf4daeda4 Update build_Make* to handle ConfigTool generated trees
gthomas
parents: 436
diff changeset
8 # Copied from 'makefile' in the "install" tree
436
f44d40e6cdd3 Improve makefile build tools
gthomas
parents:
diff changeset
9
1197
e68cf4daeda4 Update build_Make* to handle ConfigTool generated trees
gthomas
parents: 436
diff changeset
10 ECOS_BUILD_DIR=${1-`pwd`}
e68cf4daeda4 Update build_Make* to handle ConfigTool generated trees
gthomas
parents: 436
diff changeset
11 ECOS_INSTALL_DIR=`echo ${ECOS_BUILD_DIR}/install`
e68cf4daeda4 Update build_Make* to handle ConfigTool generated trees
gthomas
parents: 436
diff changeset
12 if [ ! -d ${ECOS_BUILD_DIR}/install ]; then
e68cf4daeda4 Update build_Make* to handle ConfigTool generated trees
gthomas
parents: 436
diff changeset
13 if [ ! -d ${ECOS_BUILD_DIR}/*_build ]; then
e68cf4daeda4 Update build_Make* to handle ConfigTool generated trees
gthomas
parents: 436
diff changeset
14 echo "Not an eCos install tree"
e68cf4daeda4 Update build_Make* to handle ConfigTool generated trees
gthomas
parents: 436
diff changeset
15 echo "usage: <eCos_repository>/build_Make.params [<eCos_install_dir>]"
e68cf4daeda4 Update build_Make* to handle ConfigTool generated trees
gthomas
parents: 436
diff changeset
16 echo "... where <eCos_install_dir> is the directory which contains"
e68cf4daeda4 Update build_Make* to handle ConfigTool generated trees
gthomas
parents: 436
diff changeset
17 echo " the *.ecc configuration file used to build the kernel"
e68cf4daeda4 Update build_Make* to handle ConfigTool generated trees
gthomas
parents: 436
diff changeset
18 exit
e68cf4daeda4 Update build_Make* to handle ConfigTool generated trees
gthomas
parents: 436
diff changeset
19 else
e68cf4daeda4 Update build_Make* to handle ConfigTool generated trees
gthomas
parents: 436
diff changeset
20 ECOS_INSTALL_DIR=`echo ${ECOS_BUILD_DIR}/*_install`
e68cf4daeda4 Update build_Make* to handle ConfigTool generated trees
gthomas
parents: 436
diff changeset
21 ECOS_BUILD_DIR=`echo ${ECOS_BUILD_DIR}/*_build`
e68cf4daeda4 Update build_Make* to handle ConfigTool generated trees
gthomas
parents: 436
diff changeset
22 fi
436
f44d40e6cdd3 Improve makefile build tools
gthomas
parents:
diff changeset
23 fi
f44d40e6cdd3 Improve makefile build tools
gthomas
parents:
diff changeset
24
f44d40e6cdd3 Improve makefile build tools
gthomas
parents:
diff changeset
25 cat <<EOF >Make.params
f44d40e6cdd3 Improve makefile build tools
gthomas
parents:
diff changeset
26
f44d40e6cdd3 Improve makefile build tools
gthomas
parents:
diff changeset
27 # Copied from 'makefile' in the "install" tree
f44d40e6cdd3 Improve makefile build tools
gthomas
parents:
diff changeset
28
f44d40e6cdd3 Improve makefile build tools
gthomas
parents:
diff changeset
29 EOF
f44d40e6cdd3 Improve makefile build tools
gthomas
parents:
diff changeset
30
1197
e68cf4daeda4 Update build_Make* to handle ConfigTool generated trees
gthomas
parents: 436
diff changeset
31 grep export ${ECOS_BUILD_DIR}/makefile >>Make.params
436
f44d40e6cdd3 Improve makefile build tools
gthomas
parents:
diff changeset
32
f44d40e6cdd3 Improve makefile build tools
gthomas
parents:
diff changeset
33 cat <<EOF >>Make.params
f44d40e6cdd3 Improve makefile build tools
gthomas
parents:
diff changeset
34
f44d40e6cdd3 Improve makefile build tools
gthomas
parents:
diff changeset
35 #
f44d40e6cdd3 Improve makefile build tools
gthomas
parents:
diff changeset
36 # Target specific flags, etc.
f44d40e6cdd3 Improve makefile build tools
gthomas
parents:
diff changeset
37 #
f44d40e6cdd3 Improve makefile build tools
gthomas
parents:
diff changeset
38
f44d40e6cdd3 Improve makefile build tools
gthomas
parents:
diff changeset
39 EOF
f44d40e6cdd3 Improve makefile build tools
gthomas
parents:
diff changeset
40
1197
e68cf4daeda4 Update build_Make* to handle ConfigTool generated trees
gthomas
parents: 436
diff changeset
41 cat ${ECOS_INSTALL_DIR}/include/pkgconf/ecos.mak >>Make.params
436
f44d40e6cdd3 Improve makefile build tools
gthomas
parents:
diff changeset
42
2113
ba637aa555ec Improved setup for newer compilers (which have problems with some options)
gthomas
parents: 1197
diff changeset
43 #
ba637aa555ec Improved setup for newer compilers (which have problems with some options)
gthomas
parents: 1197
diff changeset
44 # Add CFLAGS manipulation - this should match <ecos>/packages/pkgconf/rules.mak
ba637aa555ec Improved setup for newer compilers (which have problems with some options)
gthomas
parents: 1197
diff changeset
45 #
436
f44d40e6cdd3 Improve makefile build tools
gthomas
parents:
diff changeset
46
2113
ba637aa555ec Improved setup for newer compilers (which have problems with some options)
gthomas
parents: 1197
diff changeset
47 cat <<EOF >>Make.params
436
f44d40e6cdd3 Improve makefile build tools
gthomas
parents:
diff changeset
48
2113
ba637aa555ec Improved setup for newer compilers (which have problems with some options)
gthomas
parents: 1197
diff changeset
49 #
ba637aa555ec Improved setup for newer compilers (which have problems with some options)
gthomas
parents: 1197
diff changeset
50 # Modify CFLAGS to match newer compilers
ba637aa555ec Improved setup for newer compilers (which have problems with some options)
gthomas
parents: 1197
diff changeset
51 #
ba637aa555ec Improved setup for newer compilers (which have problems with some options)
gthomas
parents: 1197
diff changeset
52 ACTUAL_CFLAGS = \$(ECOS_GLOBAL_CFLAGS)
ba637aa555ec Improved setup for newer compilers (which have problems with some options)
gthomas
parents: 1197
diff changeset
53 ACTUAL_CXXFLAGS = \$(ECOS_GLOBAL_CFLAGS)
ba637aa555ec Improved setup for newer compilers (which have problems with some options)
gthomas
parents: 1197
diff changeset
54 ACTUAL_LDFLAGS = \$(ECOS_GLOBAL_LDFLAGS)
ba637aa555ec Improved setup for newer compilers (which have problems with some options)
gthomas
parents: 1197
diff changeset
55
ba637aa555ec Improved setup for newer compilers (which have problems with some options)
gthomas
parents: 1197
diff changeset
56 # GCC since 2.95 does -finit-priority by default so remove it from old HALs
ba637aa555ec Improved setup for newer compilers (which have problems with some options)
gthomas
parents: 1197
diff changeset
57 ACTUAL_CFLAGS := \$(subst -finit-priority,,\$(ACTUAL_CFLAGS))
ba637aa555ec Improved setup for newer compilers (which have problems with some options)
gthomas
parents: 1197
diff changeset
58
ba637aa555ec Improved setup for newer compilers (which have problems with some options)
gthomas
parents: 1197
diff changeset
59 # -fvtable-gc is known to be broken in all recent GCC.
ba637aa555ec Improved setup for newer compilers (which have problems with some options)
gthomas
parents: 1197
diff changeset
60 ACTUAL_CFLAGS := \$(subst -fvtable-gc,,\$(ACTUAL_CFLAGS))
ba637aa555ec Improved setup for newer compilers (which have problems with some options)
gthomas
parents: 1197
diff changeset
61
ba637aa555ec Improved setup for newer compilers (which have problems with some options)
gthomas
parents: 1197
diff changeset
62 # Expand inline functions
ba637aa555ec Improved setup for newer compilers (which have problems with some options)
gthomas
parents: 1197
diff changeset
63 ACTUAL_CFLAGS := -finline-limit=7000 \$(ACTUAL_CFLAGS)
ba637aa555ec Improved setup for newer compilers (which have problems with some options)
gthomas
parents: 1197
diff changeset
64
ba637aa555ec Improved setup for newer compilers (which have problems with some options)
gthomas
parents: 1197
diff changeset
65 # Separate C++ flags out from C flags.
ba637aa555ec Improved setup for newer compilers (which have problems with some options)
gthomas
parents: 1197
diff changeset
66 ACTUAL_CFLAGS := \$(subst -fno-rtti,,\$(ACTUAL_CFLAGS))
ba637aa555ec Improved setup for newer compilers (which have problems with some options)
gthomas
parents: 1197
diff changeset
67 ACTUAL_CFLAGS := \$(subst -frtti,,\$(ACTUAL_CFLAGS))
ba637aa555ec Improved setup for newer compilers (which have problems with some options)
gthomas
parents: 1197
diff changeset
68 ACTUAL_CFLAGS := \$(subst -Woverloaded-virtual,,\$(ACTUAL_CFLAGS))
ba637aa555ec Improved setup for newer compilers (which have problems with some options)
gthomas
parents: 1197
diff changeset
69 ACTUAL_CFLAGS := \$(subst -fvtable-gc,,\$(ACTUAL_CFLAGS))
ba637aa555ec Improved setup for newer compilers (which have problems with some options)
gthomas
parents: 1197
diff changeset
70
ba637aa555ec Improved setup for newer compilers (which have problems with some options)
gthomas
parents: 1197
diff changeset
71 ACTUAL_CXXFLAGS := \$(subst -Wstrict-prototypes,,\$(ACTUAL_CXXFLAGS))
ba637aa555ec Improved setup for newer compilers (which have problems with some options)
gthomas
parents: 1197
diff changeset
72
ba637aa555ec Improved setup for newer compilers (which have problems with some options)
gthomas
parents: 1197
diff changeset
73 EOF
ba637aa555ec Improved setup for newer compilers (which have problems with some options)
gthomas
parents: 1197
diff changeset
74