configure

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
-rwxr-xr-x

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
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
dc13730ff1ec update uwproj
Mike Becker <universe@uap-core.de>
parents: 284
diff changeset
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
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
88 echo 'Configuration:'
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
89 if true \
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
90 ; then
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
91 :
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
92 if test -z "$TOOLKIT_HOME__described__"; then
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
93 TOOLKIT_HOME__described__=1
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
94 cat << '__EOF__'
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
95 --toolkit-home location of the toolkit installation (default: /usr)
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
96 __EOF__
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
97 fi
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
98 fi
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
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
d9549dd8e9a9 update uwproj
Mike Becker <universe@uap-core.de>
parents: 88
diff changeset
102 --debug add extra compile flags for debug builds
d9549dd8e9a9 update uwproj
Mike Becker <universe@uap-core.de>
parents: 88
diff changeset
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
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
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
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
113 # create temporary directory
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
114 TEMP_DIR=".tmp-`uname -n`"
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
115 rm -Rf "$TEMP_DIR"
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
116 if mkdir -p "$TEMP_DIR"; then
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
117 :
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
118 else
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
119 echo "Cannot create tmp dir $TEMP_DIR"
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
120 echo "Abort"
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
121 exit 1
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
122 fi
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
123 touch "$TEMP_DIR/options"
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
124 touch "$TEMP_DIR/features"
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
125
289
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
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
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
129 :
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
130 if test -z "$srcdir__initialized__"; then
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
131 srcdir__initialized__=1
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
132 srcdir=`pwd`
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
133 fi
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
134 if test -z "$TOOLKIT_HOME__initialized__"; then
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
135 TOOLKIT_HOME__initialized__=1
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
136 TOOLKIT_HOME='/usr'
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
137 fi
84
e4116b4b5774 put snake test program into separate directory
Mike Becker <universe@uap-core.de>
parents: 76
diff changeset
138 fi
0
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
139
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
140 # features
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
141
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
142 #
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
143 # parse arguments
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
144 #
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
145 BUILD_TYPE="default"
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
146 for ARG in "$@"
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
147 do
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
148 case "$ARG" in
289
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
149 "--toolkit-home="*) TOOLKIT_HOME=${ARG#--toolkit-home=} ;;
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
150 "--help"*) printhelp ;;
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
151 "--debug") BUILD_TYPE="debug" ;;
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
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
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
157 "-"*) echo "unknown option: $ARG"; abort_configure ;;
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
158 esac
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
289
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
161 # toolchain detection utilities
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
162 . make/toolchain.sh
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
163
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
164 # check languages
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
165 lang_c=
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
166 lang_cpp=
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
167 if detect_c_compiler ; then
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
168 lang_c=1
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
169 fi
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
170
0
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
171
1
e3113d4e2fc0 update uwproj files
Mike Becker <universe@uap-core.de>
parents: 0
diff changeset
172
e3113d4e2fc0 update uwproj files
Mike Becker <universe@uap-core.de>
parents: 0
diff changeset
173 # set defaults for dir variables
e3113d4e2fc0 update uwproj files
Mike Becker <universe@uap-core.de>
parents: 0
diff changeset
174 : ${exec_prefix:="$prefix"}
e3113d4e2fc0 update uwproj files
Mike Becker <universe@uap-core.de>
parents: 0
diff changeset
175 : ${bindir:='${exec_prefix}/bin'}
e3113d4e2fc0 update uwproj files
Mike Becker <universe@uap-core.de>
parents: 0
diff changeset
176 : ${sbindir:='${exec_prefix}/sbin'}
e3113d4e2fc0 update uwproj files
Mike Becker <universe@uap-core.de>
parents: 0
diff changeset
177 : ${libdir:='${exec_prefix}/lib'}
e3113d4e2fc0 update uwproj files
Mike Becker <universe@uap-core.de>
parents: 0
diff changeset
178 : ${libexecdir:='${exec_prefix}/libexec'}
e3113d4e2fc0 update uwproj files
Mike Becker <universe@uap-core.de>
parents: 0
diff changeset
179 : ${datarootdir:='${prefix}/share'}
e3113d4e2fc0 update uwproj files
Mike Becker <universe@uap-core.de>
parents: 0
diff changeset
180 : ${datadir:='${datarootdir}'}
e3113d4e2fc0 update uwproj files
Mike Becker <universe@uap-core.de>
parents: 0
diff changeset
181 : ${sharedstatedir:='${prefix}/com'}
285
dc13730ff1ec update uwproj
Mike Becker <universe@uap-core.de>
parents: 284
diff changeset
182 if [ -z "$sysconfdir" ]; then
dc13730ff1ec update uwproj
Mike Becker <universe@uap-core.de>
parents: 284
diff changeset
183 if [ "$prefix" = '/usr' ]; then
dc13730ff1ec update uwproj
Mike Becker <universe@uap-core.de>
parents: 284
diff changeset
184 sysconfdir='/etc'
dc13730ff1ec update uwproj
Mike Becker <universe@uap-core.de>
parents: 284
diff changeset
185 else
dc13730ff1ec update uwproj
Mike Becker <universe@uap-core.de>
parents: 284
diff changeset
186 sysconfdir='${prefix}/etc'
dc13730ff1ec update uwproj
Mike Becker <universe@uap-core.de>
parents: 284
diff changeset
187 fi
dc13730ff1ec update uwproj
Mike Becker <universe@uap-core.de>
parents: 284
diff changeset
188 fi
dc13730ff1ec update uwproj
Mike Becker <universe@uap-core.de>
parents: 284
diff changeset
189 if [ -z "$localstatedir" ]; then
dc13730ff1ec update uwproj
Mike Becker <universe@uap-core.de>
parents: 284
diff changeset
190 if [ "$prefix" = '/usr' ]; then
dc13730ff1ec update uwproj
Mike Becker <universe@uap-core.de>
parents: 284
diff changeset
191 localstatedir='/var'
dc13730ff1ec update uwproj
Mike Becker <universe@uap-core.de>
parents: 284
diff changeset
192 else
dc13730ff1ec update uwproj
Mike Becker <universe@uap-core.de>
parents: 284
diff changeset
193 localstatedir='${prefix}/var'
dc13730ff1ec update uwproj
Mike Becker <universe@uap-core.de>
parents: 284
diff changeset
194 fi
dc13730ff1ec update uwproj
Mike Becker <universe@uap-core.de>
parents: 284
diff changeset
195 fi
dc13730ff1ec update uwproj
Mike Becker <universe@uap-core.de>
parents: 284
diff changeset
196 if [ -z "$runstatedir" ]; then
dc13730ff1ec update uwproj
Mike Becker <universe@uap-core.de>
parents: 284
diff changeset
197 if [ "$prefix" = '/usr' ]; then
dc13730ff1ec update uwproj
Mike Becker <universe@uap-core.de>
parents: 284
diff changeset
198 runstatedir='/var/run'
dc13730ff1ec update uwproj
Mike Becker <universe@uap-core.de>
parents: 284
diff changeset
199 else
dc13730ff1ec update uwproj
Mike Becker <universe@uap-core.de>
parents: 284
diff changeset
200 runstatedir='${prefix}/var'
dc13730ff1ec update uwproj
Mike Becker <universe@uap-core.de>
parents: 284
diff changeset
201 fi
dc13730ff1ec update uwproj
Mike Becker <universe@uap-core.de>
parents: 284
diff changeset
202 fi
1
e3113d4e2fc0 update uwproj files
Mike Becker <universe@uap-core.de>
parents: 0
diff changeset
203 : ${includedir:='${prefix}/include'}
e3113d4e2fc0 update uwproj files
Mike Becker <universe@uap-core.de>
parents: 0
diff changeset
204 : ${infodir:='${datarootdir}/info'}
e3113d4e2fc0 update uwproj files
Mike Becker <universe@uap-core.de>
parents: 0
diff changeset
205 : ${mandir:='${datarootdir}/man'}
e3113d4e2fc0 update uwproj files
Mike Becker <universe@uap-core.de>
parents: 0
diff changeset
206 : ${localedir:='${datarootdir}/locale'}
e3113d4e2fc0 update uwproj files
Mike Becker <universe@uap-core.de>
parents: 0
diff changeset
207
103
d9549dd8e9a9 update uwproj
Mike Becker <universe@uap-core.de>
parents: 88
diff changeset
208
1
e3113d4e2fc0 update uwproj files
Mike Becker <universe@uap-core.de>
parents: 0
diff changeset
209 # check if a config.site exists and load it
289
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
210 CONFIG_SITE_OK=0
1
e3113d4e2fc0 update uwproj files
Mike Becker <universe@uap-core.de>
parents: 0
diff changeset
211 if [ -n "$CONFIG_SITE" ]; then
e3113d4e2fc0 update uwproj files
Mike Becker <universe@uap-core.de>
parents: 0
diff changeset
212 # CONFIG_SITE may contain space separated file names
e3113d4e2fc0 update uwproj files
Mike Becker <universe@uap-core.de>
parents: 0
diff changeset
213 for cs in $CONFIG_SITE; do
e3113d4e2fc0 update uwproj files
Mike Becker <universe@uap-core.de>
parents: 0
diff changeset
214 printf "loading defaults from $cs... "
289
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
215 if [ -f "$cs" ]; then
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
216 . "$cs"
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
217 echo ok
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
218 CONFIG_SITE_OK=1
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
219 break
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
220 else
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
221 echo "not found"
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
222 fi
1
e3113d4e2fc0 update uwproj files
Mike Becker <universe@uap-core.de>
parents: 0
diff changeset
223 done
e3113d4e2fc0 update uwproj files
Mike Becker <universe@uap-core.de>
parents: 0
diff changeset
224 elif [ -f "$prefix/share/config.site" ]; then
e3113d4e2fc0 update uwproj files
Mike Becker <universe@uap-core.de>
parents: 0
diff changeset
225 printf "loading site defaults... "
e3113d4e2fc0 update uwproj files
Mike Becker <universe@uap-core.de>
parents: 0
diff changeset
226 . "$prefix/share/config.site"
e3113d4e2fc0 update uwproj files
Mike Becker <universe@uap-core.de>
parents: 0
diff changeset
227 echo ok
289
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
228 CONFIG_SITE_OK=1
1
e3113d4e2fc0 update uwproj files
Mike Becker <universe@uap-core.de>
parents: 0
diff changeset
229 elif [ -f "$prefix/etc/config.site" ]; then
e3113d4e2fc0 update uwproj files
Mike Becker <universe@uap-core.de>
parents: 0
diff changeset
230 printf "loading site defaults... "
e3113d4e2fc0 update uwproj files
Mike Becker <universe@uap-core.de>
parents: 0
diff changeset
231 . "$prefix/etc/config.site"
e3113d4e2fc0 update uwproj files
Mike Becker <universe@uap-core.de>
parents: 0
diff changeset
232 echo ok
289
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
233 CONFIG_SITE_OK=1
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
234 fi
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
235
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
236 if [ $CONFIG_SITE_OK -eq 0 ]; then
285
dc13730ff1ec update uwproj
Mike Becker <universe@uap-core.de>
parents: 284
diff changeset
237 # try to detect the correct libdir on our own, except it was changed by the user
289
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
238 if [ "$libdir" = '${exec_prefix}/lib' ] ; then
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
239 if [ "$TOOLCHAIN_WSIZE" = "64" ] ; then
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
240 if [ "$OS" = "SunOS" ]; then
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
241 [ -d "${exec_prefix}/lib/64" ] && libdir='${exec_prefix}/lib/64'
285
dc13730ff1ec update uwproj
Mike Becker <universe@uap-core.de>
parents: 284
diff changeset
242 else
289
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
243 [ -d "${exec_prefix}/lib64" ] && libdir='${exec_prefix}/lib64'
285
dc13730ff1ec update uwproj
Mike Becker <universe@uap-core.de>
parents: 284
diff changeset
244 fi
289
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
245 elif [ "$TOOLCHAIN_WSIZE" = "32" ] ; then
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
246 if [ "$OS" = "SunOS" ]; then
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
247 [ -d "${exec_prefix}/lib/32" ] && libdir='${exec_prefix}/lib/32'
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
248 else
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
249 [ -d "${exec_prefix}/lib32" ] && libdir='${exec_prefix}/lib32'
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
250 fi
285
dc13730ff1ec update uwproj
Mike Becker <universe@uap-core.de>
parents: 284
diff changeset
251 fi
dc13730ff1ec update uwproj
Mike Becker <universe@uap-core.de>
parents: 284
diff changeset
252 fi
1
e3113d4e2fc0 update uwproj files
Mike Becker <universe@uap-core.de>
parents: 0
diff changeset
253 fi
0
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
254
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
255
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
256 # generate vars.mk
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
257 cat > "$TEMP_DIR/vars.mk" << __EOF__
289
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
258 srcdir=$srcdir
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
259 TOOLKIT_HOME=$TOOLKIT_HOME
0
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
260 __EOF__
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
261
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
262
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
263 #
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
264 # DEPENDENCIES
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
265 #
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
266
289
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
267
0
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
268
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
269 # create buffer for make variables required by dependencies
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
270 echo > "$TEMP_DIR/make.mk"
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
271
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
272 test_pkg_config()
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
273 {
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
274 if "$PKG_CONFIG" --exists "$1" ; then :
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
275 else return 1 ; fi
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
276 if [ -z "$2" ] || "$PKG_CONFIG" --atleast-version="$2" "$1" ; then :
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
277 else return 1 ; fi
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
278 if [ -z "$3" ] || "$PKG_CONFIG" --exact-version="$3" "$1" ; then :
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
279 else return 1 ; fi
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
280 if [ -z "$4" ] || "$PKG_CONFIG" --max-version="$4" "$1" ; then :
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
281 else return 1 ; fi
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
282 return 0
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
283 }
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
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
6ab35fcb8676 upgrade to SDL 3
Mike Becker <universe@uap-core.de>
parents: 138
diff changeset
313 dependency_error_sdl3_ttf()
0
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
314 {
253
6ab35fcb8676 upgrade to SDL 3
Mike Becker <universe@uap-core.de>
parents: 138
diff changeset
315 print_check_msg "$dep_checked_sdl3_ttf" "checking for sdl3_ttf... "
6ab35fcb8676 upgrade to SDL 3
Mike Becker <universe@uap-core.de>
parents: 138
diff changeset
316 # dependency sdl3_ttf
0
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
317 while true
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
318 do
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
319 if [ -z "$PKG_CONFIG" ]; then
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
320 break
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
321 fi
253
6ab35fcb8676 upgrade to SDL 3
Mike Becker <universe@uap-core.de>
parents: 138
diff changeset
322 if test_pkg_config "sdl3-ttf" "" "" "" ; then
6ab35fcb8676 upgrade to SDL 3
Mike Becker <universe@uap-core.de>
parents: 138
diff changeset
323 TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags sdl3-ttf`"
6ab35fcb8676 upgrade to SDL 3
Mike Becker <universe@uap-core.de>
parents: 138
diff changeset
324 TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs sdl3-ttf`"
0
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
325 else
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
326 break
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
327 fi
253
6ab35fcb8676 upgrade to SDL 3
Mike Becker <universe@uap-core.de>
parents: 138
diff changeset
328 print_check_msg "$dep_checked_sdl3_ttf" "yes\n"
6ab35fcb8676 upgrade to SDL 3
Mike Becker <universe@uap-core.de>
parents: 138
diff changeset
329 dep_checked_sdl3_ttf=1
0
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
330 return 1
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
331 done
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
332
253
6ab35fcb8676 upgrade to SDL 3
Mike Becker <universe@uap-core.de>
parents: 138
diff changeset
333 print_check_msg "$dep_checked_sdl3_ttf" "no\n"
6ab35fcb8676 upgrade to SDL 3
Mike Becker <universe@uap-core.de>
parents: 138
diff changeset
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
dc13730ff1ec update uwproj
Mike Becker <universe@uap-core.de>
parents: 284
diff changeset
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
dc13730ff1ec update uwproj
Mike Becker <universe@uap-core.de>
parents: 284
diff changeset
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
dc13730ff1ec update uwproj
Mike Becker <universe@uap-core.de>
parents: 284
diff changeset
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
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
395 dependency_error_glew()
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
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
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
398 # dependency glew
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
399 while true
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
400 do
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
401 if [ -z "$PKG_CONFIG" ]; then
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
402 break
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
403 fi
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
404 if test_pkg_config "glew" "" "" "" ; then
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
405 TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags glew`"
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
406 TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs glew`"
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
407 else
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
408 break
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
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
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
412 return 1
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
413 done
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
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
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
417 return 0
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
418 }
253
6ab35fcb8676 upgrade to SDL 3
Mike Becker <universe@uap-core.de>
parents: 138
diff changeset
419 dependency_error_sdl3_image()
6ab35fcb8676 upgrade to SDL 3
Mike Becker <universe@uap-core.de>
parents: 138
diff changeset
420 {
6ab35fcb8676 upgrade to SDL 3
Mike Becker <universe@uap-core.de>
parents: 138
diff changeset
421 print_check_msg "$dep_checked_sdl3_image" "checking for sdl3_image... "
6ab35fcb8676 upgrade to SDL 3
Mike Becker <universe@uap-core.de>
parents: 138
diff changeset
422 # dependency sdl3_image
6ab35fcb8676 upgrade to SDL 3
Mike Becker <universe@uap-core.de>
parents: 138
diff changeset
423 while true
6ab35fcb8676 upgrade to SDL 3
Mike Becker <universe@uap-core.de>
parents: 138
diff changeset
424 do
6ab35fcb8676 upgrade to SDL 3
Mike Becker <universe@uap-core.de>
parents: 138
diff changeset
425 if [ -z "$PKG_CONFIG" ]; then
6ab35fcb8676 upgrade to SDL 3
Mike Becker <universe@uap-core.de>
parents: 138
diff changeset
426 break
6ab35fcb8676 upgrade to SDL 3
Mike Becker <universe@uap-core.de>
parents: 138
diff changeset
427 fi
6ab35fcb8676 upgrade to SDL 3
Mike Becker <universe@uap-core.de>
parents: 138
diff changeset
428 if test_pkg_config "sdl3-image" "" "" "" ; then
6ab35fcb8676 upgrade to SDL 3
Mike Becker <universe@uap-core.de>
parents: 138
diff changeset
429 TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags sdl3-image`"
6ab35fcb8676 upgrade to SDL 3
Mike Becker <universe@uap-core.de>
parents: 138
diff changeset
430 TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs sdl3-image`"
6ab35fcb8676 upgrade to SDL 3
Mike Becker <universe@uap-core.de>
parents: 138
diff changeset
431 else
6ab35fcb8676 upgrade to SDL 3
Mike Becker <universe@uap-core.de>
parents: 138
diff changeset
432 break
6ab35fcb8676 upgrade to SDL 3
Mike Becker <universe@uap-core.de>
parents: 138
diff changeset
433 fi
6ab35fcb8676 upgrade to SDL 3
Mike Becker <universe@uap-core.de>
parents: 138
diff changeset
434 print_check_msg "$dep_checked_sdl3_image" "yes\n"
6ab35fcb8676 upgrade to SDL 3
Mike Becker <universe@uap-core.de>
parents: 138
diff changeset
435 dep_checked_sdl3_image=1
6ab35fcb8676 upgrade to SDL 3
Mike Becker <universe@uap-core.de>
parents: 138
diff changeset
436 return 1
6ab35fcb8676 upgrade to SDL 3
Mike Becker <universe@uap-core.de>
parents: 138
diff changeset
437 done
6ab35fcb8676 upgrade to SDL 3
Mike Becker <universe@uap-core.de>
parents: 138
diff changeset
438
6ab35fcb8676 upgrade to SDL 3
Mike Becker <universe@uap-core.de>
parents: 138
diff changeset
439 print_check_msg "$dep_checked_sdl3_image" "no\n"
6ab35fcb8676 upgrade to SDL 3
Mike Becker <universe@uap-core.de>
parents: 138
diff changeset
440 dep_checked_sdl3_image=1
6ab35fcb8676 upgrade to SDL 3
Mike Becker <universe@uap-core.de>
parents: 138
diff changeset
441 return 0
6ab35fcb8676 upgrade to SDL 3
Mike Becker <universe@uap-core.de>
parents: 138
diff changeset
442 }
0
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
443 dependency_error_ucx()
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
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
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
446 # dependency ucx
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
447 while true
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
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
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
455 else
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
456 break
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
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
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
460 return 1
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
461 done
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
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
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
465 return 0
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
466 }
253
6ab35fcb8676 upgrade to SDL 3
Mike Becker <universe@uap-core.de>
parents: 138
diff changeset
467 dependency_error_sdl3()
6ab35fcb8676 upgrade to SDL 3
Mike Becker <universe@uap-core.de>
parents: 138
diff changeset
468 {
6ab35fcb8676 upgrade to SDL 3
Mike Becker <universe@uap-core.de>
parents: 138
diff changeset
469 print_check_msg "$dep_checked_sdl3" "checking for sdl3... "
6ab35fcb8676 upgrade to SDL 3
Mike Becker <universe@uap-core.de>
parents: 138
diff changeset
470 # dependency sdl3
6ab35fcb8676 upgrade to SDL 3
Mike Becker <universe@uap-core.de>
parents: 138
diff changeset
471 while true
6ab35fcb8676 upgrade to SDL 3
Mike Becker <universe@uap-core.de>
parents: 138
diff changeset
472 do
6ab35fcb8676 upgrade to SDL 3
Mike Becker <universe@uap-core.de>
parents: 138
diff changeset
473 if [ -z "$PKG_CONFIG" ]; then
6ab35fcb8676 upgrade to SDL 3
Mike Becker <universe@uap-core.de>
parents: 138
diff changeset
474 break
6ab35fcb8676 upgrade to SDL 3
Mike Becker <universe@uap-core.de>
parents: 138
diff changeset
475 fi
6ab35fcb8676 upgrade to SDL 3
Mike Becker <universe@uap-core.de>
parents: 138
diff changeset
476 if test_pkg_config "sdl3" "" "" "" ; then
6ab35fcb8676 upgrade to SDL 3
Mike Becker <universe@uap-core.de>
parents: 138
diff changeset
477 TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags sdl3`"
6ab35fcb8676 upgrade to SDL 3
Mike Becker <universe@uap-core.de>
parents: 138
diff changeset
478 TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs sdl3`"
6ab35fcb8676 upgrade to SDL 3
Mike Becker <universe@uap-core.de>
parents: 138
diff changeset
479 else
6ab35fcb8676 upgrade to SDL 3
Mike Becker <universe@uap-core.de>
parents: 138
diff changeset
480 break
6ab35fcb8676 upgrade to SDL 3
Mike Becker <universe@uap-core.de>
parents: 138
diff changeset
481 fi
6ab35fcb8676 upgrade to SDL 3
Mike Becker <universe@uap-core.de>
parents: 138
diff changeset
482 print_check_msg "$dep_checked_sdl3" "yes\n"
6ab35fcb8676 upgrade to SDL 3
Mike Becker <universe@uap-core.de>
parents: 138
diff changeset
483 dep_checked_sdl3=1
6ab35fcb8676 upgrade to SDL 3
Mike Becker <universe@uap-core.de>
parents: 138
diff changeset
484 return 1
6ab35fcb8676 upgrade to SDL 3
Mike Becker <universe@uap-core.de>
parents: 138
diff changeset
485 done
6ab35fcb8676 upgrade to SDL 3
Mike Becker <universe@uap-core.de>
parents: 138
diff changeset
486
6ab35fcb8676 upgrade to SDL 3
Mike Becker <universe@uap-core.de>
parents: 138
diff changeset
487 print_check_msg "$dep_checked_sdl3" "no\n"
6ab35fcb8676 upgrade to SDL 3
Mike Becker <universe@uap-core.de>
parents: 138
diff changeset
488 dep_checked_sdl3=1
6ab35fcb8676 upgrade to SDL 3
Mike Becker <universe@uap-core.de>
parents: 138
diff changeset
489 return 0
6ab35fcb8676 upgrade to SDL 3
Mike Becker <universe@uap-core.de>
parents: 138
diff changeset
490 }
0
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
491
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
492 # start collecting dependency information
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
493 echo > "$TEMP_DIR/flags.mk"
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
494
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
495 DEPENDENCIES_FAILED=
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
496 ERROR=0
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
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
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
501 while true
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
502 do
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
503 while true
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
504 do
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
505 if [ -z "$lang_c" ] ; then
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
506 ERROR=1
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
507 break
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
508 fi
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
509
128
c36170c76a2b add UI scaling
Mike Becker <universe@uap-core.de>
parents: 103
diff changeset
510 TEMP_LDFLAGS="$TEMP_LDFLAGS -lm"
0
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
511 break
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
512 done
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
513 break
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
514 done
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
515
103
d9549dd8e9a9 update uwproj
Mike Becker <universe@uap-core.de>
parents: 88
diff changeset
516 # build type
d9549dd8e9a9 update uwproj
Mike Becker <universe@uap-core.de>
parents: 88
diff changeset
517 if [ "$BUILD_TYPE" = "debug" ]; then
285
dc13730ff1ec update uwproj
Mike Becker <universe@uap-core.de>
parents: 284
diff changeset
518 TEMP_CFLAGS="\${DEBUG_CFLAGS} $TEMP_CFLAGS"
dc13730ff1ec update uwproj
Mike Becker <universe@uap-core.de>
parents: 284
diff changeset
519 TEMP_CXXFLAGS="\${DEBUG_CXXFLAGS} $TEMP_CXXFLAGS"
103
d9549dd8e9a9 update uwproj
Mike Becker <universe@uap-core.de>
parents: 88
diff changeset
520 fi
d9549dd8e9a9 update uwproj
Mike Becker <universe@uap-core.de>
parents: 88
diff changeset
521 if [ "$BUILD_TYPE" = "release" ]; then
285
dc13730ff1ec update uwproj
Mike Becker <universe@uap-core.de>
parents: 284
diff changeset
522 TEMP_CFLAGS="\${RELEASE_CFLAGS} $TEMP_CFLAGS"
dc13730ff1ec update uwproj
Mike Becker <universe@uap-core.de>
parents: 284
diff changeset
523 TEMP_CXXFLAGS="\${RELEASE_CXXFLAGS} $TEMP_CXXFLAGS"
103
d9549dd8e9a9 update uwproj
Mike Becker <universe@uap-core.de>
parents: 88
diff changeset
524 fi
d9549dd8e9a9 update uwproj
Mike Becker <universe@uap-core.de>
parents: 88
diff changeset
525
0
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
526 # add general dependency flags to flags.mk
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
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
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
529 echo "CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk"
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
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
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
532 echo "CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk"
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
533 fi
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
534 if [ -n "${TEMP_LDFLAGS}" ]; then
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
535 echo "LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/flags.mk"
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
536 fi
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
537
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
538 #
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
539 # OPTION VALUES
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
540 #
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
541
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
542 #
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
543 # TARGETS
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
544 #
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
545
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
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
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
549 TEMP_CFLAGS=
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
550 TEMP_CXXFLAGS=
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
551 TEMP_LDFLAGS=
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
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
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
555 ERROR=1
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
556 fi
253
6ab35fcb8676 upgrade to SDL 3
Mike Becker <universe@uap-core.de>
parents: 138
diff changeset
557 if dependency_error_sdl3; then
6ab35fcb8676 upgrade to SDL 3
Mike Becker <universe@uap-core.de>
parents: 138
diff changeset
558 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED sdl3 "
0
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
559 ERROR=1
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
560 fi
253
6ab35fcb8676 upgrade to SDL 3
Mike Becker <universe@uap-core.de>
parents: 138
diff changeset
561 if dependency_error_sdl3_ttf; then
6ab35fcb8676 upgrade to SDL 3
Mike Becker <universe@uap-core.de>
parents: 138
diff changeset
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
6ab35fcb8676 upgrade to SDL 3
Mike Becker <universe@uap-core.de>
parents: 138
diff changeset
565 if dependency_error_sdl3_image; then
6ab35fcb8676 upgrade to SDL 3
Mike Becker <universe@uap-core.de>
parents: 138
diff changeset
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
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
569 if dependency_error_glew; then
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
570 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED glew "
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
571 ERROR=1
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
572 fi
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
573
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
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
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
595
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
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
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
598 echo "CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk"
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
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
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
601 echo "CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk"
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
602 fi
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
603 if [ -n "${TEMP_LDFLAGS}" ]; then
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
604 echo "LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/flags.mk"
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
605 fi
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
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
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
671
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
672 # final result
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
673 if [ $ERROR -ne 0 ]; then
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
674 echo
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
675 echo "Error: Unresolved dependencies"
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
676 echo "$DEPENDENCIES_FAILED"
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
677 abort_configure
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
678 fi
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
679
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
680 echo "configure finished"
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
681 echo
289
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
682 echo "Toolchain:"
103
d9549dd8e9a9 update uwproj
Mike Becker <universe@uap-core.de>
parents: 88
diff changeset
683 echo " name: $TOOLCHAIN_NAME"
d9549dd8e9a9 update uwproj
Mike Becker <universe@uap-core.de>
parents: 88
diff changeset
684 if [ -n "$TOOLCHAIN_CC" ]; then
d9549dd8e9a9 update uwproj
Mike Becker <universe@uap-core.de>
parents: 88
diff changeset
685 echo " cc: $TOOLCHAIN_CC"
d9549dd8e9a9 update uwproj
Mike Becker <universe@uap-core.de>
parents: 88
diff changeset
686 fi
d9549dd8e9a9 update uwproj
Mike Becker <universe@uap-core.de>
parents: 88
diff changeset
687 if [ -n "$TOOLCHAIN_CXX" ]; then
d9549dd8e9a9 update uwproj
Mike Becker <universe@uap-core.de>
parents: 88
diff changeset
688 echo " cxx: $TOOLCHAIN_CXX"
d9549dd8e9a9 update uwproj
Mike Becker <universe@uap-core.de>
parents: 88
diff changeset
689 fi
d9549dd8e9a9 update uwproj
Mike Becker <universe@uap-core.de>
parents: 88
diff changeset
690 if [ -n "$TOOLCHAIN_WSIZE" ]; then
d9549dd8e9a9 update uwproj
Mike Becker <universe@uap-core.de>
parents: 88
diff changeset
691 echo " word size: $TOOLCHAIN_WSIZE bit"
d9549dd8e9a9 update uwproj
Mike Becker <universe@uap-core.de>
parents: 88
diff changeset
692 fi
d9549dd8e9a9 update uwproj
Mike Becker <universe@uap-core.de>
parents: 88
diff changeset
693 if [ -n "$TOOLCHAIN_CSTD" ]; then
d9549dd8e9a9 update uwproj
Mike Becker <universe@uap-core.de>
parents: 88
diff changeset
694 echo " default C std: $TOOLCHAIN_CSTD"
d9549dd8e9a9 update uwproj
Mike Becker <universe@uap-core.de>
parents: 88
diff changeset
695 fi
d9549dd8e9a9 update uwproj
Mike Becker <universe@uap-core.de>
parents: 88
diff changeset
696 echo
289
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
697 echo "Config:"
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
698 printf ' %-16s' 'toolkit-home:'
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
699 echo "$TOOLKIT_HOME"
0
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
700 echo
138
2ceb0368b02d add option to enable ASan
Mike Becker <universe@uap-core.de>
parents: 128
diff changeset
701 echo "Features:"
289
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
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
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
704 echo 'on'
138
2ceb0368b02d add option to enable ASan
Mike Becker <universe@uap-core.de>
parents: 128
diff changeset
705 else
289
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
706 echo 'off'
138
2ceb0368b02d add option to enable ASan
Mike Becker <universe@uap-core.de>
parents: 128
diff changeset
707 fi
289
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
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
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
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
237cb9038109 update uwproj
Mike Becker <universe@uap-core.de>
parents: 285
diff changeset
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
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
715
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
716 # generate the config.mk file
103
d9549dd8e9a9 update uwproj
Mike Becker <universe@uap-core.de>
parents: 88
diff changeset
717 pwd=`pwd`
0
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
718 cat > "$TEMP_DIR/config.mk" << __EOF__
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
719 #
103
d9549dd8e9a9 update uwproj
Mike Becker <universe@uap-core.de>
parents: 88
diff changeset
720 # config.mk generated by:
d9549dd8e9a9 update uwproj
Mike Becker <universe@uap-core.de>
parents: 88
diff changeset
721 # pwd: $pwd
d9549dd8e9a9 update uwproj
Mike Becker <universe@uap-core.de>
parents: 88
diff changeset
722 # $0 $@
0
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
723 #
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
724
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
725 __EOF__
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
726 write_toolchain_defaults "$TEMP_DIR/toolchain.mk"
103
d9549dd8e9a9 update uwproj
Mike Becker <universe@uap-core.de>
parents: 88
diff changeset
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
593b60458157 initial commit
Mike Becker <universe@uap-core.de>
parents:
diff changeset
728 rm -Rf "$TEMP_DIR"

mercurial