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