make/toolchain.sh

Sun, 30 Nov 2025 16:52:33 +0100

author
Mike Becker <universe@uap-core.de>
date
Sun, 30 Nov 2025 16:52:33 +0100
changeset 289
237cb9038109
parent 285
dc13730ff1ec
permissions
-rw-r--r--

update uwproj

0
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
1 #!/bin/sh
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
2 #
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
3 # toolchain detection
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
4 #
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
5
285
dc13730ff1ec update uwproj
Mike Becker <universe@uap-core.de>
parents: 103
diff changeset
6 TAIL="tail"
76
eb16be99b0ad update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents: 0
diff changeset
7 if isplatform "bsd" && notisplatform "openbsd"; then
eb16be99b0ad update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents: 0
diff changeset
8 C_COMPILERS="clang gcc cc"
eb16be99b0ad update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents: 0
diff changeset
9 CPP_COMPILERS="clang++ g++ CC"
285
dc13730ff1ec update uwproj
Mike Becker <universe@uap-core.de>
parents: 103
diff changeset
10 elif isplatform "solaris"; then
dc13730ff1ec update uwproj
Mike Becker <universe@uap-core.de>
parents: 103
diff changeset
11 C_COMPILERS="cc suncc gcc clang"
dc13730ff1ec update uwproj
Mike Becker <universe@uap-core.de>
parents: 103
diff changeset
12 CPP_COMPILERS="CC sunCC g++ clang++"
dc13730ff1ec update uwproj
Mike Becker <universe@uap-core.de>
parents: 103
diff changeset
13 if [ -f /usr/xpg4/bin/tail ]; then
dc13730ff1ec update uwproj
Mike Becker <universe@uap-core.de>
parents: 103
diff changeset
14 TAIL=/usr/xpg4/bin/tail
dc13730ff1ec update uwproj
Mike Becker <universe@uap-core.de>
parents: 103
diff changeset
15 fi
76
eb16be99b0ad update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents: 0
diff changeset
16 else
285
dc13730ff1ec update uwproj
Mike Becker <universe@uap-core.de>
parents: 103
diff changeset
17 C_COMPILERS="gcc clang cc"
dc13730ff1ec update uwproj
Mike Becker <universe@uap-core.de>
parents: 103
diff changeset
18 CPP_COMPILERS="g++ clang++ c++"
76
eb16be99b0ad update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents: 0
diff changeset
19 fi
eb16be99b0ad update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents: 0
diff changeset
20 unset TOOLCHAIN
0
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
21 unset TOOLCHAIN_NAME
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
22 unset TOOLCHAIN_CC
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
23 unset TOOLCHAIN_CXX
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
24
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
25 check_c_compiler()
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
26 {
289
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
27 if command -v "$1" >/dev/null 2>&1 ; then
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
28 :
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
29 else
103
d9549dd8e9a9 update uwproj
Mike Becker <universe@uap-core.de>
parents: 76
diff changeset
30 return 1
d9549dd8e9a9 update uwproj
Mike Becker <universe@uap-core.de>
parents: 76
diff changeset
31 fi
76
eb16be99b0ad update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents: 0
diff changeset
32 cat > "$TEMP_DIR/test.c" << __EOF__
0
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
33 /* test file */
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
34 #include <stdio.h>
285
dc13730ff1ec update uwproj
Mike Becker <universe@uap-core.de>
parents: 103
diff changeset
35 int main(void) {
76
eb16be99b0ad update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents: 0
diff changeset
36 #if defined(_MSC_VER)
103
d9549dd8e9a9 update uwproj
Mike Becker <universe@uap-core.de>
parents: 76
diff changeset
37 printf("toolchain:msc\n");
76
eb16be99b0ad update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents: 0
diff changeset
38 #elif defined(__clang__)
103
d9549dd8e9a9 update uwproj
Mike Becker <universe@uap-core.de>
parents: 76
diff changeset
39 printf("toolchain:clang gnuc\n");
0
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
40 #elif defined(__GNUC__)
103
d9549dd8e9a9 update uwproj
Mike Becker <universe@uap-core.de>
parents: 76
diff changeset
41 printf("toolchain:gcc gnuc\n");
0
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
42 #elif defined(__sun)
103
d9549dd8e9a9 update uwproj
Mike Becker <universe@uap-core.de>
parents: 76
diff changeset
43 printf("toolchain:suncc\n");
0
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
44 #else
103
d9549dd8e9a9 update uwproj
Mike Becker <universe@uap-core.de>
parents: 76
diff changeset
45 printf("toolchain:unknown\n");
d9549dd8e9a9 update uwproj
Mike Becker <universe@uap-core.de>
parents: 76
diff changeset
46 #endif
d9549dd8e9a9 update uwproj
Mike Becker <universe@uap-core.de>
parents: 76
diff changeset
47 printf("wsize:%d\n", (int)sizeof(void*)*8);
d9549dd8e9a9 update uwproj
Mike Becker <universe@uap-core.de>
parents: 76
diff changeset
48 #ifdef __STDC_VERSION__
285
dc13730ff1ec update uwproj
Mike Becker <universe@uap-core.de>
parents: 103
diff changeset
49 printf("stdcversion:%ld\n", (long int)__STDC_VERSION__);
0
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
50 #endif
76
eb16be99b0ad update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents: 0
diff changeset
51 return 0;
0
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
52 }
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
53 __EOF__
76
eb16be99b0ad update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents: 0
diff changeset
54 rm -f "$TEMP_DIR/checkcc"
eb16be99b0ad update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents: 0
diff changeset
55 $1 -o "$TEMP_DIR/checkcc" $CFLAGS $LDFLAGS "$TEMP_DIR/test.c" 2> /dev/null
0
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
56 }
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
57
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
58 check_cpp_compiler()
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
59 {
289
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
60 if command -v "$1" >/dev/null 2>&1 ; then
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
61 :
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
62 else
103
d9549dd8e9a9 update uwproj
Mike Becker <universe@uap-core.de>
parents: 76
diff changeset
63 return 1
d9549dd8e9a9 update uwproj
Mike Becker <universe@uap-core.de>
parents: 76
diff changeset
64 fi
76
eb16be99b0ad update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents: 0
diff changeset
65 cat > "$TEMP_DIR/test.cpp" << __EOF__
0
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
66 /* test file */
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
67 #include <iostream>
285
dc13730ff1ec update uwproj
Mike Becker <universe@uap-core.de>
parents: 103
diff changeset
68 int main(void) {
76
eb16be99b0ad update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents: 0
diff changeset
69 #if defined(_MSC_VER)
103
d9549dd8e9a9 update uwproj
Mike Becker <universe@uap-core.de>
parents: 76
diff changeset
70 std::cout << "toolchain:msc" << std::endl;
76
eb16be99b0ad update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents: 0
diff changeset
71 #elif defined(__clang__)
103
d9549dd8e9a9 update uwproj
Mike Becker <universe@uap-core.de>
parents: 76
diff changeset
72 std::cout << "toolchain:clang gnuc" << std::endl;
0
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
73 #elif defined(__GNUC__)
103
d9549dd8e9a9 update uwproj
Mike Becker <universe@uap-core.de>
parents: 76
diff changeset
74 std::cout << "toolchain:gcc gnuc" << std::endl;
0
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
75 #elif defined(__sun)
103
d9549dd8e9a9 update uwproj
Mike Becker <universe@uap-core.de>
parents: 76
diff changeset
76 std::cout << "toolchain:suncc" << std::endl;
0
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
77 #else
103
d9549dd8e9a9 update uwproj
Mike Becker <universe@uap-core.de>
parents: 76
diff changeset
78 std::cout << "toolchain:unknown" << std::endl;
0
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
79 #endif
285
dc13730ff1ec update uwproj
Mike Becker <universe@uap-core.de>
parents: 103
diff changeset
80 std::cout << "wsize:" << sizeof(void*)*8 << std::endl;
76
eb16be99b0ad update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents: 0
diff changeset
81 return 0;
0
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
82 }
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
83 __EOF__
76
eb16be99b0ad update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents: 0
diff changeset
84 rm -f "$TEMP_DIR/checkcc"
eb16be99b0ad update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents: 0
diff changeset
85 $1 -o "$TEMP_DIR/checkcc" $CXXFLAGS $LDFLAGS "$TEMP_DIR/test.cpp" 2> /dev/null
0
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
86 }
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
87
285
dc13730ff1ec update uwproj
Mike Becker <universe@uap-core.de>
parents: 103
diff changeset
88 parse_toolchain_properties()
0
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
89 {
285
dc13730ff1ec update uwproj
Mike Becker <universe@uap-core.de>
parents: 103
diff changeset
90 info_file="$1"
dc13730ff1ec update uwproj
Mike Becker <universe@uap-core.de>
parents: 103
diff changeset
91 TOOLCHAIN=`grep '^toolchain:' "$info_file" | $TAIL -c +11`
dc13730ff1ec update uwproj
Mike Becker <universe@uap-core.de>
parents: 103
diff changeset
92 TOOLCHAIN_NAME=`echo "$TOOLCHAIN" | cut -f1 -d' ' -`
dc13730ff1ec update uwproj
Mike Becker <universe@uap-core.de>
parents: 103
diff changeset
93 TOOLCHAIN_WSIZE=`grep '^wsize:' "$info_file" | $TAIL -c +7`
0
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
94 }
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
95
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
96 detect_c_compiler()
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
97 {
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
98 if [ -n "$TOOLCHAIN_CC" ]; then
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
99 return 0
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
100 fi
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
101 printf "detect C compiler... "
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
102 if [ -n "$CC" ]; then
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
103 if check_c_compiler "$CC"; then
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
104 TOOLCHAIN_CC=$CC
103
d9549dd8e9a9 update uwproj
Mike Becker <universe@uap-core.de>
parents: 76
diff changeset
105 "$TEMP_DIR/checkcc" > "$TEMP_DIR/checkcc_out"
285
dc13730ff1ec update uwproj
Mike Becker <universe@uap-core.de>
parents: 103
diff changeset
106 parse_toolchain_properties "$TEMP_DIR/checkcc_out"
dc13730ff1ec update uwproj
Mike Becker <universe@uap-core.de>
parents: 103
diff changeset
107 TOOLCHAIN_CSTD=`grep '^stdcversion:' "$TEMP_DIR/checkcc_out" | $TAIL -c +13`
0
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
108 echo "$CC"
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
109 return 0
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
110 else
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
111 echo "$CC is not a working C compiler"
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
112 return 1
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
113 fi
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
114 else
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
115 for COMP in $C_COMPILERS
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
116 do
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
117 if check_c_compiler "$COMP"; then
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
118 TOOLCHAIN_CC=$COMP
103
d9549dd8e9a9 update uwproj
Mike Becker <universe@uap-core.de>
parents: 76
diff changeset
119 "$TEMP_DIR/checkcc" > "$TEMP_DIR/checkcc_out"
285
dc13730ff1ec update uwproj
Mike Becker <universe@uap-core.de>
parents: 103
diff changeset
120 parse_toolchain_properties "$TEMP_DIR/checkcc_out"
dc13730ff1ec update uwproj
Mike Becker <universe@uap-core.de>
parents: 103
diff changeset
121 TOOLCHAIN_CSTD=`grep '^stdcversion:' "$TEMP_DIR/checkcc_out" | $TAIL -c +13`
0
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
122 echo "$COMP"
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
123 return 0
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
124 fi
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
125 done
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
126 echo "not found"
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
127 return 1
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
128 fi
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
129 }
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
130
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
131 detect_cpp_compiler()
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
132 {
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
133 if [ -n "$TOOLCHAIN_CXX" ]; then
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
134 return 0
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
135 fi
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
136 printf "detect C++ compiler... "
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
137
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
138 if [ -n "$CXX" ]; then
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
139 if check_cpp_compiler "$CXX"; then
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
140 TOOLCHAIN_CXX=$CXX
103
d9549dd8e9a9 update uwproj
Mike Becker <universe@uap-core.de>
parents: 76
diff changeset
141 "$TEMP_DIR/checkcc" > "$TEMP_DIR/checkcc_out"
285
dc13730ff1ec update uwproj
Mike Becker <universe@uap-core.de>
parents: 103
diff changeset
142 parse_toolchain_properties "$TEMP_DIR/checkcc_out"
0
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
143 echo "$CXX"
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
144 return 0
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
145 else
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
146 echo "$CXX is not a working C++ compiler"
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
147 return 1
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
148 fi
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
149 else
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
150 for COMP in $CPP_COMPILERS
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
151 do
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
152 if check_cpp_compiler "$COMP"; then
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
153 TOOLCHAIN_CXX=$COMP
103
d9549dd8e9a9 update uwproj
Mike Becker <universe@uap-core.de>
parents: 76
diff changeset
154 "$TEMP_DIR/checkcc" > "$TEMP_DIR/checkcc_out"
285
dc13730ff1ec update uwproj
Mike Becker <universe@uap-core.de>
parents: 103
diff changeset
155 parse_toolchain_properties "$TEMP_DIR/checkcc_out"
0
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
156 echo "$COMP"
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
157 return 0
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
158 fi
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
159 done
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
160 echo "${TOOLCHAIN_CXX:-"not found"}"
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
161 return 1
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
162 fi
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
163 }
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
164
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
165 write_toolchain_defaults()
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
166 {
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
167 echo "# toolchain" >> "$1"
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
168 if [ -n "$TOOLCHAIN_CC" ]; then
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
169 echo "CC = ${TOOLCHAIN_CC}" >> "$1"
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
170 fi
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
171 if [ -n "$TOOLCHAIN_CXX" ]; then
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
172 echo "CXX = ${TOOLCHAIN_CXX}" >> "$1"
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
173 fi
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
174 echo >> "$1"
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
175 if [ -f "make/${TOOLCHAIN_NAME}.mk" ]; then
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
176 cat "make/${TOOLCHAIN_NAME}.mk" >> "$1"
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
177 elif [ -f "make/cc.mk" ]; then
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
178 cat "make/cc.mk" >> "$1"
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
179 else
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
180 echo "!!! WARNING !!! Default toolchain flags not found. Configuration might be incomplete."
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
181 fi
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
182 }

mercurial