annotate configure.bat @ 63:e4764587cf8b

Added tag r0.9 for changeset 8b3f468f1bf9
author cslag
date Thu, 31 Dec 2015 00:23:19 +0100
parents 3e629dc19168
children f5e9f7f8a932
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
1 @ECHO OFF
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
2 REM ///////////////////////////////////////////////////////////////////////////
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
3 REM
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
4 REM Copyright (c) 2007-2009 Daniel Adler <dadler@uni-goettingen.de>,
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
5 REM Tassilo Philipp <tphilipp@potion-studios.com>
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
6 REM
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
7 REM Permission to use, copy, modify, and distribute this software for any
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
8 REM purpose with or without fee is hereby granted, provided that the above
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
9 REM copyright notice and this permission notice appear in all copies.
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
10 REM
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
11 REM THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
12 REM WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
13 REM MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
14 REM ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
15 REM WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
16 REM ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
17 REM OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
18 REM
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
19 REM ///////////////////////////////////////////////////////////////////////////
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
20
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
21
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
22 SETLOCAL
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
23
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
24 REM Set default values.
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
25 SET PACKAGE=dyncall
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
26 SET CONFIG_HOST=windows
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
27 SET CONFIG_OS=windows
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
28 SET CONFIG_TOOL=msvc
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
29 SET CONFIG_ASM=ml
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
30 SET CONFIG_CONFIG=release
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
31 IF [%PROCESSOR_ARCHITECTURE%] == [AMD64] (
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
32 SET CONFIG_ARCH=x64
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
33 ) ELSE IF [%PROCESSOR_ARCHITEW6432%] == [AMD64] (
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
34 SET CONFIG_ARCH=x64
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
35 ) ELSE (
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
36 SET CONFIG_ARCH=x86
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
37 )
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
38
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
39 REM Scan arguments.
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
40 :MAIN_LOOP
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
41
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
42
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
43 REM Help.
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
44 IF [%1]==[] (
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
45 GOTO DONE
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
46 ) ELSE IF [%1]==[/?] (
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
47 ECHO.
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
48 ECHO.dyncall configuration shell-script
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
49 ECHO.Usage:
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
50 ECHO. configure.bat [ options ]
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
51 ECHO.
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
52 ECHO.Options:
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
53 ECHO. /? print this page
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
54 ECHO.
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
55 ECHO. /prefix PATH set installation prefix ^(GNU make only^)
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
56 ECHO. /prefix-bd PATH set build directory prefix ^(GNU make only^)
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
57 ECHO. ^(only for use with gmake^)
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
58 ECHO.
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
59 ECHO. /target-x86 build for x86 architecture ^(default^)
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
60 ECHO. /target-x64 build for x64 architecture
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
61 ECHO. /target-psp build for PlayStation Portable ^(homebrew SDK^)
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
62 ECHO. /target-nds-arm build for Nintendo DS ^(devkitPro, ARM mode^)
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
63 ECHO. /target-nds-thumb build for Nintendo DS ^(devkitPro, THUMB mode^)
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
64 ECHO.
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
65 ECHO. /tool-msvc use Microsoft Visual C++ compiler ^(default^)
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
66 ECHO. /tool-gcc use GNU Compiler Collection
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
67 ECHO.
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
68 ECHO. /asm-ml use Microsoft Macro Assembler ^(default^)
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
69 ECHO. /asm-as use the GNU Assembler
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
70 ECHO. /asm-nasm use NASM Assembler
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
71 ECHO.
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
72 ECHO. /config-release build release version ^(default^)
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
73 ECHO. /config-debug build debug version
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
74 GOTO:EOF
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
75 ) ELSE IF [%1]==[/prefix] (
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
76 SET CONFIG_PREFIX=%2
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
77 SHIFT
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
78 ) ELSE IF [%1]==[/prefix-bd] (
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
79 SET CONFIG_BUILDPREFIX=%2
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
80 SHIFT
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
81 ) ELSE IF [%1]==[/target-x86] (
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
82 SET CONFIG_ARCH=x86
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
83 ) ELSE IF [%1]==[/target-x64] (
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
84 SET CONFIG_ARCH=x64
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
85 ) ELSE IF [%1]==[/target-psp] (
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
86 SET CONFIG_ARCH=mips32
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
87 SET CONFIG_OS=psp
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
88 ) ELSE IF [%1]==[/target-nds-arm] (
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
89 SET CONFIG_ARCH=arm32_arm
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
90 SET CONFIG_OS=nds
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
91 ) ELSE IF [%1]==[/target-nds-thumb] (
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
92 SET CONFIG_ARCH=arm32_thumb
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
93 SET CONFIG_OS=nds
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
94 ) ELSE IF [%1]==[/tool-gcc] (
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
95 SET CONFIG_TOOL=gcc
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
96 SET CONFIG_ASM=as
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
97 ) ELSE IF [%1]==[/tool-msvc] (
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
98 SET CONFIG_TOOL=msvc
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
99 SET CONFIG_ASM=ml
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
100 ) ELSE IF [%1]==[/asm-as] (
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
101 SET CONFIG_ASM=as
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
102 ) ELSE IF [%1]==[/asm-nasm] (
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
103 SET CONFIG_ASM=nasm
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
104 ) ELSE IF [%1]==[/asm-ml] (
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
105 SET CONFIG_ASM=ml
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
106 ) ELSE IF [%1]==[/config-release] (
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
107 SET CONFIG_CONFIG=release
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
108 ) ELSE IF [%1]==[/config-debug] (
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
109 SET CONFIG_CONFIG=debug
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
110 ) ELSE (
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
111 ECHO Unknown parameter '%1'.
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
112 GOTO DONE
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
113 )
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
114
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
115 SHIFT
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
116 GOTO MAIN_LOOP
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
117 :DONE
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
118
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
119 IF [%CONFIG_PREFIX%]==[] (
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
120 SET CONFIG_PREFIX=%CD%\install_%CONFIG_OS%_%CONFIG_ARCH%_%CONFIG_TOOL%_%CONFIG_CONFIG%
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
121 )
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
122 IF [%CONFIG_BUILDPREFIX%]==[] (
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
123 SET CONFIG_BUILDPREFIX=%CD%\build_out\%CONFIG_OS%_%CONFIG_ARCH%_%CONFIG_TOOL%_%CONFIG_CONFIG%
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
124 )
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
125
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
126 ECHO # auto-generated by configure.bat >ConfigVars
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
127 ECHO CONFIG_PACKAGE=%PACKAGE%#>>ConfigVars
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
128 ECHO CONFIG_HOST=%CONFIG_HOST%#>>ConfigVars
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
129 ECHO CONFIG_OS=%CONFIG_OS%#>>ConfigVars
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
130 ECHO CONFIG_ARCH=%CONFIG_ARCH%#>>ConfigVars
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
131 ECHO CONFIG_TOOL=%CONFIG_TOOL%#>>ConfigVars
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
132 ECHO CONFIG_ASM=%CONFIG_ASM%#>>ConfigVars
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
133 ECHO CONFIG_CONFIG=%CONFIG_CONFIG%#>>ConfigVars
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
134 ECHO CONFIG_PREFIX=%CONFIG_PREFIX%#>>ConfigVars
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
135 ECHO CONFIG_BUILDPREFIX=%CONFIG_BUILDPREFIX%#>>ConfigVars
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
136
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
137 ECHO Writing following configuration to ConfigVars:
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
138 ECHO.
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
139 ECHO Host OS: %CONFIG_HOST%
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
140 ECHO Target OS: %CONFIG_OS%
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
141 ECHO Target Architecture: %CONFIG_ARCH%
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
142 ECHO Compiler: %CONFIG_TOOL%
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
143 ECHO Assembler: %CONFIG_ASM%
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
144 ECHO Build configuration: %CONFIG_CONFIG%
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
145 ECHO Install prefix: %CONFIG_PREFIX%
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
146 ECHO Build prefix: %CONFIG_BUILDPREFIX%
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
147
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
148
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
149 REM We have to transform some pathes for the nds/devkitPro build.
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
150 IF [%CONFIG_OS%]==[nds] (
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
151 REM Check if DEVKITPRO is set.
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
152 IF [%DEVKITPRO%]==[] (
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
153 ECHO ERROR: Environment variable DEVKITPRO must be set to absolute devkitPro path.
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
154 ) ELSE (
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
155 buildsys\scripts\conf-nds.bat
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
156 )
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
157 )