Sun, 30 Nov 2025 16:52:33 +0100
update uwproj
| 0 | 1 | #!/bin/sh |
| 2 | ||
|
76
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
3 | |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
4 | # some utility functions |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
5 | isplatform() |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
6 | { |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
7 | for p in $PLATFORM |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
8 | do |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
9 | if [ "$p" = "$1" ]; then |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
10 | return 0 |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
11 | fi |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
12 | done |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
13 | return 1 |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
14 | } |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
15 | notisplatform() |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
16 | { |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
17 | for p in $PLATFORM |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
18 | do |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
19 | if [ "$p" = "$1" ]; then |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
20 | return 1 |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
21 | fi |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
22 | done |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
23 | return 0 |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
24 | } |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
25 | istoolchain() |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
26 | { |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
27 | for t in $TOOLCHAIN |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
28 | do |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
29 | if [ "$t" = "$1" ]; then |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
30 | return 0 |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
31 | fi |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
32 | done |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
33 | return 1 |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
34 | } |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
35 | notistoolchain() |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
36 | { |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
37 | for t in $TOOLCHAIN |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
38 | do |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
39 | if [ "$t" = "$1" ]; then |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
40 | return 1 |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
41 | fi |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
42 | done |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
43 | return 0 |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
44 | } |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
45 | |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
46 | # clean abort |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
47 | abort_configure() |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
48 | { |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
49 | rm -Rf "$TEMP_DIR" |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
50 | exit 1 |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
51 | } |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
52 | |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
53 | # Test for availability of pkg-config |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
54 | PKG_CONFIG=`command -v pkg-config` |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
55 | : ${PKG_CONFIG:="false"} |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
56 | |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
57 | # Simple uname based platform detection |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
58 | # $PLATFORM is used for platform dependent dependency selection |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
59 | OS=`uname -s` |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
60 | OS_VERSION=`uname -r` |
| 285 | 61 | ARCH=`uname -m` |
|
76
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
62 | printf "detect platform... " |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
63 | if [ "$OS" = "SunOS" ]; then |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
64 | PLATFORM="solaris sunos unix svr4" |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
65 | elif [ "$OS" = "Linux" ]; then |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
66 | PLATFORM="linux unix" |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
67 | elif [ "$OS" = "FreeBSD" ]; then |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
68 | PLATFORM="freebsd bsd unix" |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
69 | elif [ "$OS" = "OpenBSD" ]; then |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
70 | PLATFORM="openbsd bsd unix" |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
71 | elif [ "$OS" = "NetBSD" ]; then |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
72 | PLATFORM="netbsd bsd unix" |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
73 | elif [ "$OS" = "Darwin" ]; then |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
74 | PLATFORM="macos osx bsd unix" |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
75 | elif echo "$OS" | grep -i "MINGW" > /dev/null; then |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
76 | PLATFORM="windows mingw" |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
77 | fi |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
78 | : ${PLATFORM:="unix"} |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
79 | |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
80 | PLATFORM_NAME=`echo "$PLATFORM" | cut -f1 -d' ' -` |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
81 | echo "$PLATFORM_NAME" |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
82 | |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
83 | |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
84 | # help text |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
85 | printhelp() |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
86 | { |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
87 | echo "Usage: $0 [OPTIONS]..." |
| 289 | 88 | echo 'Configuration:' |
| 89 | if true \ | |
| 90 | ; then | |
| 91 | : | |
| 92 | if test -z "$TOOLKIT_HOME__described__"; then | |
| 93 | TOOLKIT_HOME__described__=1 | |
| 94 | cat << '__EOF__' | |
| 95 | --toolkit-home location of the toolkit installation (default: /usr) | |
| 96 | __EOF__ | |
| 97 | fi | |
| 98 | fi | |
| 99 | cat << '__EOF__' | |
|
76
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
100 | |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
101 | Build Types: |
| 103 | 102 | --debug add extra compile flags for debug builds |
| 103 | --release add extra compile flags for release builds | |
|
76
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
104 | |
|
138
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
105 | Optional Features: |
|
281
95d0fe30b3fa
fix style of the descriptions for the helptext
Mike Becker <universe@uap-core.de>
parents:
280
diff
changeset
|
106 | --enable-asan enable address sanitization |
|
95d0fe30b3fa
fix style of the descriptions for the helptext
Mike Becker <universe@uap-core.de>
parents:
280
diff
changeset
|
107 | --enable-tools enable compilation of tools |
|
138
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
108 | |
|
76
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
109 | __EOF__ |
| 289 | 110 | abort_configure |
|
76
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
111 | } |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
112 | |
| 0 | 113 | # create temporary directory |
| 114 | TEMP_DIR=".tmp-`uname -n`" | |
| 115 | rm -Rf "$TEMP_DIR" | |
| 116 | if mkdir -p "$TEMP_DIR"; then | |
| 117 | : | |
| 118 | else | |
| 119 | echo "Cannot create tmp dir $TEMP_DIR" | |
| 120 | echo "Abort" | |
| 121 | exit 1 | |
| 122 | fi | |
| 123 | touch "$TEMP_DIR/options" | |
| 124 | touch "$TEMP_DIR/features" | |
| 125 | ||
| 289 | 126 | # config variables |
|
84
e4116b4b5774
put snake test program into separate directory
Mike Becker <universe@uap-core.de>
parents:
76
diff
changeset
|
127 | if true \ |
|
e4116b4b5774
put snake test program into separate directory
Mike Becker <universe@uap-core.de>
parents:
76
diff
changeset
|
128 | ; then |
| 289 | 129 | : |
| 130 | if test -z "$srcdir__initialized__"; then | |
| 131 | srcdir__initialized__=1 | |
| 132 | srcdir=`pwd` | |
| 133 | fi | |
| 134 | if test -z "$TOOLKIT_HOME__initialized__"; then | |
| 135 | TOOLKIT_HOME__initialized__=1 | |
| 136 | TOOLKIT_HOME='/usr' | |
| 137 | fi | |
|
84
e4116b4b5774
put snake test program into separate directory
Mike Becker <universe@uap-core.de>
parents:
76
diff
changeset
|
138 | fi |
| 0 | 139 | |
| 140 | # features | |
| 141 | ||
| 142 | # | |
| 143 | # parse arguments | |
| 144 | # | |
| 145 | BUILD_TYPE="default" | |
| 146 | for ARG in "$@" | |
| 147 | do | |
| 148 | case "$ARG" in | |
| 289 | 149 | "--toolkit-home="*) TOOLKIT_HOME=${ARG#--toolkit-home=} ;; |
| 150 | "--help"*) printhelp ;; | |
| 151 | "--debug") BUILD_TYPE="debug" ;; | |
| 152 | "--release") BUILD_TYPE="release" ;; | |
|
138
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
153 | "--enable-asan") FEATURE_ASAN=on ;; |
|
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
154 | "--disable-asan") unset FEATURE_ASAN ;; |
|
280
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
155 | "--enable-tools") FEATURE_TOOLS=on ;; |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
156 | "--disable-tools") unset FEATURE_TOOLS ;; |
| 0 | 157 | "-"*) echo "unknown option: $ARG"; abort_configure ;; |
| 158 | esac | |
| 159 | done | |
| 160 | ||
| 289 | 161 | # toolchain detection utilities |
| 162 | . make/toolchain.sh | |
| 163 | ||
| 164 | # check languages | |
| 165 | lang_c= | |
| 166 | lang_cpp= | |
| 167 | if detect_c_compiler ; then | |
| 168 | lang_c=1 | |
| 169 | fi | |
| 170 | ||
| 0 | 171 | |
| 1 | 172 | |
| 173 | # set defaults for dir variables | |
| 174 | : ${exec_prefix:="$prefix"} | |
| 175 | : ${bindir:='${exec_prefix}/bin'} | |
| 176 | : ${sbindir:='${exec_prefix}/sbin'} | |
| 177 | : ${libdir:='${exec_prefix}/lib'} | |
| 178 | : ${libexecdir:='${exec_prefix}/libexec'} | |
| 179 | : ${datarootdir:='${prefix}/share'} | |
| 180 | : ${datadir:='${datarootdir}'} | |
| 181 | : ${sharedstatedir:='${prefix}/com'} | |
| 285 | 182 | if [ -z "$sysconfdir" ]; then |
| 183 | if [ "$prefix" = '/usr' ]; then | |
| 184 | sysconfdir='/etc' | |
| 185 | else | |
| 186 | sysconfdir='${prefix}/etc' | |
| 187 | fi | |
| 188 | fi | |
| 189 | if [ -z "$localstatedir" ]; then | |
| 190 | if [ "$prefix" = '/usr' ]; then | |
| 191 | localstatedir='/var' | |
| 192 | else | |
| 193 | localstatedir='${prefix}/var' | |
| 194 | fi | |
| 195 | fi | |
| 196 | if [ -z "$runstatedir" ]; then | |
| 197 | if [ "$prefix" = '/usr' ]; then | |
| 198 | runstatedir='/var/run' | |
| 199 | else | |
| 200 | runstatedir='${prefix}/var' | |
| 201 | fi | |
| 202 | fi | |
| 1 | 203 | : ${includedir:='${prefix}/include'} |
| 204 | : ${infodir:='${datarootdir}/info'} | |
| 205 | : ${mandir:='${datarootdir}/man'} | |
| 206 | : ${localedir:='${datarootdir}/locale'} | |
| 207 | ||
| 103 | 208 | |
| 1 | 209 | # check if a config.site exists and load it |
| 289 | 210 | CONFIG_SITE_OK=0 |
| 1 | 211 | if [ -n "$CONFIG_SITE" ]; then |
| 212 | # CONFIG_SITE may contain space separated file names | |
| 213 | for cs in $CONFIG_SITE; do | |
| 214 | printf "loading defaults from $cs... " | |
| 289 | 215 | if [ -f "$cs" ]; then |
| 216 | . "$cs" | |
| 217 | echo ok | |
| 218 | CONFIG_SITE_OK=1 | |
| 219 | break | |
| 220 | else | |
| 221 | echo "not found" | |
| 222 | fi | |
| 1 | 223 | done |
| 224 | elif [ -f "$prefix/share/config.site" ]; then | |
| 225 | printf "loading site defaults... " | |
| 226 | . "$prefix/share/config.site" | |
| 227 | echo ok | |
| 289 | 228 | CONFIG_SITE_OK=1 |
| 1 | 229 | elif [ -f "$prefix/etc/config.site" ]; then |
| 230 | printf "loading site defaults... " | |
| 231 | . "$prefix/etc/config.site" | |
| 232 | echo ok | |
| 289 | 233 | CONFIG_SITE_OK=1 |
| 234 | fi | |
| 235 | ||
| 236 | if [ $CONFIG_SITE_OK -eq 0 ]; then | |
| 285 | 237 | # try to detect the correct libdir on our own, except it was changed by the user |
| 289 | 238 | if [ "$libdir" = '${exec_prefix}/lib' ] ; then |
| 239 | if [ "$TOOLCHAIN_WSIZE" = "64" ] ; then | |
| 240 | if [ "$OS" = "SunOS" ]; then | |
| 241 | [ -d "${exec_prefix}/lib/64" ] && libdir='${exec_prefix}/lib/64' | |
| 285 | 242 | else |
| 289 | 243 | [ -d "${exec_prefix}/lib64" ] && libdir='${exec_prefix}/lib64' |
| 285 | 244 | fi |
| 289 | 245 | elif [ "$TOOLCHAIN_WSIZE" = "32" ] ; then |
| 246 | if [ "$OS" = "SunOS" ]; then | |
| 247 | [ -d "${exec_prefix}/lib/32" ] && libdir='${exec_prefix}/lib/32' | |
| 248 | else | |
| 249 | [ -d "${exec_prefix}/lib32" ] && libdir='${exec_prefix}/lib32' | |
| 250 | fi | |
| 285 | 251 | fi |
| 252 | fi | |
| 1 | 253 | fi |
| 0 | 254 | |
| 255 | ||
| 256 | # generate vars.mk | |
| 257 | cat > "$TEMP_DIR/vars.mk" << __EOF__ | |
| 289 | 258 | srcdir=$srcdir |
| 259 | TOOLKIT_HOME=$TOOLKIT_HOME | |
| 0 | 260 | __EOF__ |
| 261 | ||
| 262 | ||
| 263 | # | |
| 264 | # DEPENDENCIES | |
| 265 | # | |
| 266 | ||
| 289 | 267 | |
| 0 | 268 | |
| 269 | # create buffer for make variables required by dependencies | |
| 270 | echo > "$TEMP_DIR/make.mk" | |
| 271 | ||
| 272 | test_pkg_config() | |
| 273 | { | |
| 274 | if "$PKG_CONFIG" --exists "$1" ; then : | |
| 275 | else return 1 ; fi | |
| 276 | if [ -z "$2" ] || "$PKG_CONFIG" --atleast-version="$2" "$1" ; then : | |
| 277 | else return 1 ; fi | |
| 278 | if [ -z "$3" ] || "$PKG_CONFIG" --exact-version="$3" "$1" ; then : | |
| 279 | else return 1 ; fi | |
| 280 | if [ -z "$4" ] || "$PKG_CONFIG" --max-version="$4" "$1" ; then : | |
| 281 | else return 1 ; fi | |
| 282 | return 0 | |
| 283 | } | |
| 284 | ||
|
76
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
285 | print_check_msg() |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
286 | { |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
287 | if [ -z "$1" ]; then |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
288 | shift |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
289 | printf "$@" |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
290 | fi |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
291 | } |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
292 | |
|
138
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
293 | dependency_error_asan() |
|
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
294 | { |
|
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
295 | print_check_msg "$dep_checked_asan" "checking for asan... " |
|
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
296 | # dependency asan toolchain="gnuc" |
|
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
297 | while true |
|
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
298 | do |
|
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
299 | if notistoolchain "gnuc"; then |
|
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
300 | break |
|
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
301 | fi |
|
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
302 | TEMP_CFLAGS="$TEMP_CFLAGS -fsanitize=address" |
|
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
303 | TEMP_LDFLAGS="$TEMP_LDFLAGS -fsanitize=address" |
|
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
304 | print_check_msg "$dep_checked_asan" "yes\n" |
|
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
305 | dep_checked_asan=1 |
|
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
306 | return 1 |
|
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
307 | done |
|
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
308 | |
|
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
309 | print_check_msg "$dep_checked_asan" "no\n" |
|
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
310 | dep_checked_asan=1 |
|
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
311 | return 0 |
|
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
312 | } |
| 253 | 313 | dependency_error_sdl3_ttf() |
| 0 | 314 | { |
| 253 | 315 | print_check_msg "$dep_checked_sdl3_ttf" "checking for sdl3_ttf... " |
| 316 | # dependency sdl3_ttf | |
| 0 | 317 | while true |
| 318 | do | |
| 319 | if [ -z "$PKG_CONFIG" ]; then | |
| 320 | break | |
| 321 | fi | |
| 253 | 322 | if test_pkg_config "sdl3-ttf" "" "" "" ; then |
| 323 | TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags sdl3-ttf`" | |
| 324 | TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs sdl3-ttf`" | |
| 0 | 325 | else |
| 326 | break | |
| 327 | fi | |
| 253 | 328 | print_check_msg "$dep_checked_sdl3_ttf" "yes\n" |
| 329 | dep_checked_sdl3_ttf=1 | |
| 0 | 330 | return 1 |
| 331 | done | |
| 332 | ||
| 253 | 333 | print_check_msg "$dep_checked_sdl3_ttf" "no\n" |
| 334 | dep_checked_sdl3_ttf=1 | |
|
88
6234b7ea48f3
add support for 2d textures in sprite shader - fixes #386
Mike Becker <universe@uap-core.de>
parents:
84
diff
changeset
|
335 | return 0 |
|
6234b7ea48f3
add support for 2d textures in sprite shader - fixes #386
Mike Becker <universe@uap-core.de>
parents:
84
diff
changeset
|
336 | } |
|
280
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
337 | dependency_error_gtk3() |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
338 | { |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
339 | print_check_msg "$dep_checked_gtk3" "checking for gtk3... " |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
340 | # dependency gtk3 |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
341 | while true |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
342 | do |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
343 | if [ -z "$PKG_CONFIG" ]; then |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
344 | break |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
345 | fi |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
346 | if test_pkg_config "gtk+-3.0" "" "" "" ; then |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
347 | TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags gtk+-3.0`" |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
348 | TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs gtk+-3.0`" |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
349 | else |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
350 | break |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
351 | fi |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
352 | TEMP_CFLAGS="$TEMP_CFLAGS -DUI_GTK3" |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
353 | TEMP_LDFLAGS="$TEMP_LDFLAGS -lpthread" |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
354 | print_check_msg "$dep_checked_gtk3" "yes\n" |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
355 | dep_checked_gtk3=1 |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
356 | return 1 |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
357 | done |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
358 | |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
359 | print_check_msg "$dep_checked_gtk3" "no\n" |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
360 | dep_checked_gtk3=1 |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
361 | return 0 |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
362 | } |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
363 | dependency_error_toolkit() |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
364 | { |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
365 | print_check_msg "$dep_checked_toolkit" "checking for toolkit... " |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
366 | # dependency toolkit |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
367 | while true |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
368 | do |
| 285 | 369 | if test -n "$TOOLKIT_HOME" > /dev/null 2>&1 ; then |
|
280
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
370 | : |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
371 | else |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
372 | break |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
373 | fi |
| 285 | 374 | if test -f "$TOOLKIT_HOME/lib/libuitk.a" > /dev/null 2>&1 ; then |
|
280
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
375 | : |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
376 | else |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
377 | break |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
378 | fi |
| 285 | 379 | if test -f "$TOOLKIT_HOME/include/ui/ui.h" > /dev/null 2>&1 ; then |
|
280
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
380 | : |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
381 | else |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
382 | break |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
383 | fi |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
384 | TEMP_CFLAGS="$TEMP_CFLAGS -I$TOOLKIT_HOME/include" |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
385 | TEMP_LDFLAGS="$TEMP_LDFLAGS $TOOLKIT_HOME/lib/libuitk.a" |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
386 | print_check_msg "$dep_checked_toolkit" "yes\n" |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
387 | dep_checked_toolkit=1 |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
388 | return 1 |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
389 | done |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
390 | |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
391 | print_check_msg "$dep_checked_toolkit" "no\n" |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
392 | dep_checked_toolkit=1 |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
393 | return 0 |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
394 | } |
| 0 | 395 | dependency_error_glew() |
| 396 | { | |
|
76
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
397 | print_check_msg "$dep_checked_glew" "checking for glew... " |
| 0 | 398 | # dependency glew |
| 399 | while true | |
| 400 | do | |
| 401 | if [ -z "$PKG_CONFIG" ]; then | |
| 402 | break | |
| 403 | fi | |
| 404 | if test_pkg_config "glew" "" "" "" ; then | |
| 405 | TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags glew`" | |
| 406 | TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs glew`" | |
| 407 | else | |
| 408 | break | |
| 409 | fi | |
|
76
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
410 | print_check_msg "$dep_checked_glew" "yes\n" |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
411 | dep_checked_glew=1 |
| 0 | 412 | return 1 |
| 413 | done | |
| 414 | ||
|
76
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
415 | print_check_msg "$dep_checked_glew" "no\n" |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
416 | dep_checked_glew=1 |
| 0 | 417 | return 0 |
| 418 | } | |
| 253 | 419 | dependency_error_sdl3_image() |
| 420 | { | |
| 421 | print_check_msg "$dep_checked_sdl3_image" "checking for sdl3_image... " | |
| 422 | # dependency sdl3_image | |
| 423 | while true | |
| 424 | do | |
| 425 | if [ -z "$PKG_CONFIG" ]; then | |
| 426 | break | |
| 427 | fi | |
| 428 | if test_pkg_config "sdl3-image" "" "" "" ; then | |
| 429 | TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags sdl3-image`" | |
| 430 | TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs sdl3-image`" | |
| 431 | else | |
| 432 | break | |
| 433 | fi | |
| 434 | print_check_msg "$dep_checked_sdl3_image" "yes\n" | |
| 435 | dep_checked_sdl3_image=1 | |
| 436 | return 1 | |
| 437 | done | |
| 438 | ||
| 439 | print_check_msg "$dep_checked_sdl3_image" "no\n" | |
| 440 | dep_checked_sdl3_image=1 | |
| 441 | return 0 | |
| 442 | } | |
| 0 | 443 | dependency_error_ucx() |
| 444 | { | |
|
76
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
445 | print_check_msg "$dep_checked_ucx" "checking for ucx... " |
| 0 | 446 | # dependency ucx |
| 447 | while true | |
| 448 | do | |
|
283
a53a04d1da97
update to newest UCX 3.2 snapshot
Mike Becker <universe@uap-core.de>
parents:
282
diff
changeset
|
449 | if [ -z "$PKG_CONFIG" ]; then |
|
a53a04d1da97
update to newest UCX 3.2 snapshot
Mike Becker <universe@uap-core.de>
parents:
282
diff
changeset
|
450 | break |
|
a53a04d1da97
update to newest UCX 3.2 snapshot
Mike Becker <universe@uap-core.de>
parents:
282
diff
changeset
|
451 | fi |
|
284
22ff758b9fab
add version requirement for UCX
Mike Becker <universe@uap-core.de>
parents:
283
diff
changeset
|
452 | if test_pkg_config "ucx" "3.2" "" "" ; then |
|
283
a53a04d1da97
update to newest UCX 3.2 snapshot
Mike Becker <universe@uap-core.de>
parents:
282
diff
changeset
|
453 | TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags ucx`" |
|
a53a04d1da97
update to newest UCX 3.2 snapshot
Mike Becker <universe@uap-core.de>
parents:
282
diff
changeset
|
454 | TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs ucx`" |
| 0 | 455 | else |
| 456 | break | |
| 457 | fi | |
|
76
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
458 | print_check_msg "$dep_checked_ucx" "yes\n" |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
459 | dep_checked_ucx=1 |
| 0 | 460 | return 1 |
| 461 | done | |
| 462 | ||
|
76
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
463 | print_check_msg "$dep_checked_ucx" "no\n" |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
464 | dep_checked_ucx=1 |
| 0 | 465 | return 0 |
| 466 | } | |
| 253 | 467 | dependency_error_sdl3() |
| 468 | { | |
| 469 | print_check_msg "$dep_checked_sdl3" "checking for sdl3... " | |
| 470 | # dependency sdl3 | |
| 471 | while true | |
| 472 | do | |
| 473 | if [ -z "$PKG_CONFIG" ]; then | |
| 474 | break | |
| 475 | fi | |
| 476 | if test_pkg_config "sdl3" "" "" "" ; then | |
| 477 | TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags sdl3`" | |
| 478 | TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs sdl3`" | |
| 479 | else | |
| 480 | break | |
| 481 | fi | |
| 482 | print_check_msg "$dep_checked_sdl3" "yes\n" | |
| 483 | dep_checked_sdl3=1 | |
| 484 | return 1 | |
| 485 | done | |
| 486 | ||
| 487 | print_check_msg "$dep_checked_sdl3" "no\n" | |
| 488 | dep_checked_sdl3=1 | |
| 489 | return 0 | |
| 490 | } | |
| 0 | 491 | |
| 492 | # start collecting dependency information | |
| 493 | echo > "$TEMP_DIR/flags.mk" | |
| 494 | ||
| 495 | DEPENDENCIES_FAILED= | |
| 496 | ERROR=0 | |
| 497 | # unnamed dependencies | |
|
76
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
498 | TEMP_CFLAGS="$CFLAGS" |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
499 | TEMP_CXXFLAGS="$CXXFLAGS" |
|
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
500 | TEMP_LDFLAGS="$LDFLAGS" |
| 0 | 501 | while true |
| 502 | do | |
| 503 | while true | |
| 504 | do | |
| 505 | if [ -z "$lang_c" ] ; then | |
| 506 | ERROR=1 | |
| 507 | break | |
| 508 | fi | |
| 509 | ||
| 128 | 510 | TEMP_LDFLAGS="$TEMP_LDFLAGS -lm" |
| 0 | 511 | break |
| 512 | done | |
| 513 | break | |
| 514 | done | |
| 515 | ||
| 103 | 516 | # build type |
| 517 | if [ "$BUILD_TYPE" = "debug" ]; then | |
| 285 | 518 | TEMP_CFLAGS="\${DEBUG_CFLAGS} $TEMP_CFLAGS" |
| 519 | TEMP_CXXFLAGS="\${DEBUG_CXXFLAGS} $TEMP_CXXFLAGS" | |
| 103 | 520 | fi |
| 521 | if [ "$BUILD_TYPE" = "release" ]; then | |
| 285 | 522 | TEMP_CFLAGS="\${RELEASE_CFLAGS} $TEMP_CFLAGS" |
| 523 | TEMP_CXXFLAGS="\${RELEASE_CXXFLAGS} $TEMP_CXXFLAGS" | |
| 103 | 524 | fi |
| 525 | ||
| 0 | 526 | # add general dependency flags to flags.mk |
| 527 | echo "# general flags" >> "$TEMP_DIR/flags.mk" | |
|
76
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
528 | if [ -n "${TEMP_CFLAGS}" ] && [ -n "$lang_c" ]; then |
| 0 | 529 | echo "CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk" |
| 530 | fi | |
|
76
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
531 | if [ -n "${TEMP_CXXFLAGS}" ] && [ -n "$lang_cpp" ]; then |
| 0 | 532 | echo "CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk" |
| 533 | fi | |
| 534 | if [ -n "${TEMP_LDFLAGS}" ]; then | |
| 535 | echo "LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/flags.mk" | |
| 536 | fi | |
| 537 | ||
| 538 | # | |
| 539 | # OPTION VALUES | |
| 540 | # | |
| 541 | ||
| 542 | # | |
| 543 | # TARGETS | |
| 544 | # | |
| 545 | ||
| 546 | echo >> "$TEMP_DIR/flags.mk" | |
|
138
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
547 | echo "configuring global target" |
|
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
548 | echo "# flags for unnamed target" >> "$TEMP_DIR/flags.mk" |
| 0 | 549 | TEMP_CFLAGS= |
| 550 | TEMP_CXXFLAGS= | |
| 551 | TEMP_LDFLAGS= | |
| 552 | ||
|
138
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
553 | if dependency_error_ucx; then |
|
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
554 | DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED ucx " |
| 0 | 555 | ERROR=1 |
| 556 | fi | |
| 253 | 557 | if dependency_error_sdl3; then |
| 558 | DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED sdl3 " | |
| 0 | 559 | ERROR=1 |
| 560 | fi | |
| 253 | 561 | if dependency_error_sdl3_ttf; then |
| 562 | DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED sdl3_ttf " | |
|
138
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
563 | ERROR=1 |
|
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
564 | fi |
| 253 | 565 | if dependency_error_sdl3_image; then |
| 566 | DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED sdl3_image " | |
|
88
6234b7ea48f3
add support for 2d textures in sprite shader - fixes #386
Mike Becker <universe@uap-core.de>
parents:
84
diff
changeset
|
567 | ERROR=1 |
|
6234b7ea48f3
add support for 2d textures in sprite shader - fixes #386
Mike Becker <universe@uap-core.de>
parents:
84
diff
changeset
|
568 | fi |
| 0 | 569 | if dependency_error_glew; then |
| 570 | DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED glew " | |
| 571 | ERROR=1 | |
| 572 | fi | |
| 573 | ||
| 574 | # Features | |
|
138
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
575 | if [ -n "$FEATURE_ASAN" ]; then |
|
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
576 | # check dependency |
|
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
577 | if dependency_error_asan ; then |
|
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
578 | # "auto" features can fail and are just disabled in this case |
|
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
579 | if [ "$FEATURE_ASAN" = "auto" ]; then |
|
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
580 | DISABLE_FEATURE_ASAN=1 |
|
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
581 | else |
|
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
582 | DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED asan " |
|
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
583 | ERROR=1 |
|
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
584 | fi |
|
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
585 | fi |
|
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
586 | if [ -n "$DISABLE_FEATURE_ASAN" ]; then |
|
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
587 | unset FEATURE_ASAN |
|
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
588 | fi |
|
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
589 | fi |
|
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
590 | if [ -n "$FEATURE_ASAN" ]; then |
|
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
591 | : |
|
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
592 | else |
|
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
593 | : |
|
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
594 | fi |
| 0 | 595 | |
| 596 | ||
|
76
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
597 | if [ -n "${TEMP_CFLAGS}" ] && [ -n "$lang_c" ]; then |
| 0 | 598 | echo "CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk" |
| 599 | fi | |
|
76
eb16be99b0ad
update to newest versions of uwproj and ucx
Mike Becker <universe@uap-core.de>
parents:
1
diff
changeset
|
600 | if [ -n "${TEMP_CXXFLAGS}" ] && [ -n "$lang_cpp" ]; then |
| 0 | 601 | echo "CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk" |
| 602 | fi | |
| 603 | if [ -n "${TEMP_LDFLAGS}" ]; then | |
| 604 | echo "LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/flags.mk" | |
| 605 | fi | |
| 606 | ||
|
280
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
607 | echo >> "$TEMP_DIR/flags.mk" |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
608 | echo "configuring target: tools" |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
609 | echo "# flags for target tools" >> "$TEMP_DIR/flags.mk" |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
610 | TEMP_CFLAGS= |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
611 | TEMP_CXXFLAGS= |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
612 | TEMP_LDFLAGS= |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
613 | |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
614 | |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
615 | # Features |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
616 | if [ -n "$FEATURE_TOOLS" ]; then |
|
282
8c5540b31087
fix that dependencies for tools are always checked
Mike Becker <universe@uap-core.de>
parents:
281
diff
changeset
|
617 | # check dependency |
|
8c5540b31087
fix that dependencies for tools are always checked
Mike Becker <universe@uap-core.de>
parents:
281
diff
changeset
|
618 | if dependency_error_toolkit ; then |
|
8c5540b31087
fix that dependencies for tools are always checked
Mike Becker <universe@uap-core.de>
parents:
281
diff
changeset
|
619 | # "auto" features can fail and are just disabled in this case |
|
8c5540b31087
fix that dependencies for tools are always checked
Mike Becker <universe@uap-core.de>
parents:
281
diff
changeset
|
620 | if [ "$FEATURE_TOOLS" = "auto" ]; then |
|
8c5540b31087
fix that dependencies for tools are always checked
Mike Becker <universe@uap-core.de>
parents:
281
diff
changeset
|
621 | DISABLE_FEATURE_TOOLS=1 |
|
8c5540b31087
fix that dependencies for tools are always checked
Mike Becker <universe@uap-core.de>
parents:
281
diff
changeset
|
622 | else |
|
8c5540b31087
fix that dependencies for tools are always checked
Mike Becker <universe@uap-core.de>
parents:
281
diff
changeset
|
623 | DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED toolkit " |
|
8c5540b31087
fix that dependencies for tools are always checked
Mike Becker <universe@uap-core.de>
parents:
281
diff
changeset
|
624 | ERROR=1 |
|
8c5540b31087
fix that dependencies for tools are always checked
Mike Becker <universe@uap-core.de>
parents:
281
diff
changeset
|
625 | fi |
|
8c5540b31087
fix that dependencies for tools are always checked
Mike Becker <universe@uap-core.de>
parents:
281
diff
changeset
|
626 | fi |
|
8c5540b31087
fix that dependencies for tools are always checked
Mike Becker <universe@uap-core.de>
parents:
281
diff
changeset
|
627 | # check dependency |
|
8c5540b31087
fix that dependencies for tools are always checked
Mike Becker <universe@uap-core.de>
parents:
281
diff
changeset
|
628 | if dependency_error_gtk3 ; then |
|
8c5540b31087
fix that dependencies for tools are always checked
Mike Becker <universe@uap-core.de>
parents:
281
diff
changeset
|
629 | # "auto" features can fail and are just disabled in this case |
|
8c5540b31087
fix that dependencies for tools are always checked
Mike Becker <universe@uap-core.de>
parents:
281
diff
changeset
|
630 | if [ "$FEATURE_TOOLS" = "auto" ]; then |
|
8c5540b31087
fix that dependencies for tools are always checked
Mike Becker <universe@uap-core.de>
parents:
281
diff
changeset
|
631 | DISABLE_FEATURE_TOOLS=1 |
|
8c5540b31087
fix that dependencies for tools are always checked
Mike Becker <universe@uap-core.de>
parents:
281
diff
changeset
|
632 | else |
|
8c5540b31087
fix that dependencies for tools are always checked
Mike Becker <universe@uap-core.de>
parents:
281
diff
changeset
|
633 | DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED gtk3 " |
|
8c5540b31087
fix that dependencies for tools are always checked
Mike Becker <universe@uap-core.de>
parents:
281
diff
changeset
|
634 | ERROR=1 |
|
8c5540b31087
fix that dependencies for tools are always checked
Mike Becker <universe@uap-core.de>
parents:
281
diff
changeset
|
635 | fi |
|
8c5540b31087
fix that dependencies for tools are always checked
Mike Becker <universe@uap-core.de>
parents:
281
diff
changeset
|
636 | fi |
|
8c5540b31087
fix that dependencies for tools are always checked
Mike Becker <universe@uap-core.de>
parents:
281
diff
changeset
|
637 | # check dependency |
|
8c5540b31087
fix that dependencies for tools are always checked
Mike Becker <universe@uap-core.de>
parents:
281
diff
changeset
|
638 | if dependency_error_ucx ; then |
|
8c5540b31087
fix that dependencies for tools are always checked
Mike Becker <universe@uap-core.de>
parents:
281
diff
changeset
|
639 | # "auto" features can fail and are just disabled in this case |
|
8c5540b31087
fix that dependencies for tools are always checked
Mike Becker <universe@uap-core.de>
parents:
281
diff
changeset
|
640 | if [ "$FEATURE_TOOLS" = "auto" ]; then |
|
8c5540b31087
fix that dependencies for tools are always checked
Mike Becker <universe@uap-core.de>
parents:
281
diff
changeset
|
641 | DISABLE_FEATURE_TOOLS=1 |
|
8c5540b31087
fix that dependencies for tools are always checked
Mike Becker <universe@uap-core.de>
parents:
281
diff
changeset
|
642 | else |
|
8c5540b31087
fix that dependencies for tools are always checked
Mike Becker <universe@uap-core.de>
parents:
281
diff
changeset
|
643 | DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED ucx " |
|
8c5540b31087
fix that dependencies for tools are always checked
Mike Becker <universe@uap-core.de>
parents:
281
diff
changeset
|
644 | ERROR=1 |
|
8c5540b31087
fix that dependencies for tools are always checked
Mike Becker <universe@uap-core.de>
parents:
281
diff
changeset
|
645 | fi |
|
8c5540b31087
fix that dependencies for tools are always checked
Mike Becker <universe@uap-core.de>
parents:
281
diff
changeset
|
646 | fi |
|
280
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
647 | if [ -n "$DISABLE_FEATURE_TOOLS" ]; then |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
648 | unset FEATURE_TOOLS |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
649 | fi |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
650 | fi |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
651 | if [ -n "$FEATURE_TOOLS" ]; then |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
652 | : |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
653 | else |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
654 | : |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
655 | cat >> "$TEMP_DIR/make.mk" << __EOF__ |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
656 | NO_TOOLS=1 |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
657 | __EOF__ |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
658 | fi |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
659 | |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
660 | |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
661 | if [ -n "${TEMP_CFLAGS}" ] && [ -n "$lang_c" ]; then |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
662 | echo "TOOLS_CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk" |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
663 | fi |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
664 | if [ -n "${TEMP_CXXFLAGS}" ] && [ -n "$lang_cpp" ]; then |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
665 | echo "TOOLS_CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk" |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
666 | fi |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
667 | if [ -n "${TEMP_LDFLAGS}" ]; then |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
668 | echo "TOOLS_LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/flags.mk" |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
669 | fi |
|
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
670 | |
| 0 | 671 | |
| 672 | # final result | |
| 673 | if [ $ERROR -ne 0 ]; then | |
| 674 | echo | |
| 675 | echo "Error: Unresolved dependencies" | |
| 676 | echo "$DEPENDENCIES_FAILED" | |
| 677 | abort_configure | |
| 678 | fi | |
| 679 | ||
| 680 | echo "configure finished" | |
| 681 | echo | |
| 289 | 682 | echo "Toolchain:" |
| 103 | 683 | echo " name: $TOOLCHAIN_NAME" |
| 684 | if [ -n "$TOOLCHAIN_CC" ]; then | |
| 685 | echo " cc: $TOOLCHAIN_CC" | |
| 686 | fi | |
| 687 | if [ -n "$TOOLCHAIN_CXX" ]; then | |
| 688 | echo " cxx: $TOOLCHAIN_CXX" | |
| 689 | fi | |
| 690 | if [ -n "$TOOLCHAIN_WSIZE" ]; then | |
| 691 | echo " word size: $TOOLCHAIN_WSIZE bit" | |
| 692 | fi | |
| 693 | if [ -n "$TOOLCHAIN_CSTD" ]; then | |
| 694 | echo " default C std: $TOOLCHAIN_CSTD" | |
| 695 | fi | |
| 696 | echo | |
| 289 | 697 | echo "Config:" |
| 698 | printf ' %-16s' 'toolkit-home:' | |
| 699 | echo "$TOOLKIT_HOME" | |
| 0 | 700 | echo |
|
138
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
701 | echo "Features:" |
| 289 | 702 | printf ' %-16s' 'asan:' |
|
138
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
703 | if [ -n "$FEATURE_ASAN" ]; then |
| 289 | 704 | echo 'on' |
|
138
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
705 | else |
| 289 | 706 | echo 'off' |
|
138
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
707 | fi |
| 289 | 708 | printf ' %-16s' 'tools:' |
|
280
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
709 | if [ -n "$FEATURE_TOOLS" ]; then |
| 289 | 710 | echo 'on' |
|
280
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
711 | else |
| 289 | 712 | echo 'off' |
|
280
7845f5872bed
start a sub-project to implement a texture atlas editor
Mike Becker <universe@uap-core.de>
parents:
253
diff
changeset
|
713 | fi |
|
138
2ceb0368b02d
add option to enable ASan
Mike Becker <universe@uap-core.de>
parents:
128
diff
changeset
|
714 | echo |
| 0 | 715 | |
| 716 | # generate the config.mk file | |
| 103 | 717 | pwd=`pwd` |
| 0 | 718 | cat > "$TEMP_DIR/config.mk" << __EOF__ |
| 719 | # | |
| 103 | 720 | # config.mk generated by: |
| 721 | # pwd: $pwd | |
| 722 | # $0 $@ | |
| 0 | 723 | # |
| 724 | ||
| 725 | __EOF__ | |
| 726 | write_toolchain_defaults "$TEMP_DIR/toolchain.mk" | |
| 103 | 727 | cat "$TEMP_DIR/config.mk" "$TEMP_DIR/vars.mk" "$TEMP_DIR/toolchain.mk" "$TEMP_DIR/flags.mk" "$TEMP_DIR/make.mk" > config.mk |
| 0 | 728 | rm -Rf "$TEMP_DIR" |