]> git.ipfire.org Git - thirdparty/openssl.git/blame - Netware/build.bat
return correct NID for undefined object
[thirdparty/openssl.git] / Netware / build.bat
CommitLineData
4d8743f4
RL
1@echo off
2
3rem ========================================================================
4rem Batch file to automate building OpenSSL for NetWare.
5rem
6rem usage:
7rem build [target] [debug opts] [assembly opts] [configure opts]
8rem
cbcbd07d 9rem target - "netware-clib" - CLib NetWare build (WinSock Sockets)
3b0e61a8
DSH
10rem - "netware-clib-bsdsock" - CLib NetWare build (BSD Sockets)
11rem - "netware-libc" - LibC NetWare build (WinSock Sockets)
12rem - "netware-libc-bsdsock" - LibC NetWare build (BSD Sockets)
4d8743f4
RL
13rem
14rem debug opts - "debug" - build debug
15rem
16rem assembly opts - "nw-mwasm" - use Metrowerks assembler
cbcbd07d
RL
17rem - "nw-nasm" - use NASM assembler
18rem - "no-asm" - don't use assembly
4d8743f4
RL
19rem
20rem configure opts- all unrecognized arguments are passed to the
21rem perl configure script
22rem
23rem If no arguments are specified the default is to build non-debug with
24rem no assembly. NOTE: there is no default BLD_TARGET.
25rem
26
27
28
29rem No assembly is the default - Uncomment section below to change
30rem the assembler default
31set ASM_MODE=
32set ASSEMBLER=
33set NO_ASM=no-asm
34
35rem Uncomment to default to the Metrowerks assembler
36rem set ASM_MODE=nw-mwasm
37rem set ASSEMBLER=Metrowerks
38rem set NO_ASM=
39
40rem Uncomment to default to the NASM assembler
41rem set ASM_MODE=nw-nasm
42rem set ASSEMBLER=NASM
43rem set NO_ASM=
44
45rem No default Bld target
46set BLD_TARGET=no_target
47rem set BLD_TARGET=netware-clib
48rem set BLD_TARGET=netware-libc
49
50
51rem Default to build non-debug
52set DEBUG=
53
54rem Uncomment to default to debug build
55rem set DEBUG=debug
56
57
58set CONFIG_OPTS=
59set ARG_PROCESSED=NO
60
61
62rem Process command line args
63:opts
64if "a%1" == "a" goto endopt
65if "%1" == "no-asm" set NO_ASM=no-asm
66if "%1" == "no-asm" set ARG_PROCESSED=YES
67if "%1" == "debug" set DEBUG=debug
68if "%1" == "debug" set ARG_PROCESSED=YES
69if "%1" == "nw-nasm" set ASM_MODE=nw-nasm
70if "%1" == "nw-nasm" set ASSEMBLER=NASM
71if "%1" == "nw-nasm" set NO_ASM=
72if "%1" == "nw-nasm" set ARG_PROCESSED=YES
73if "%1" == "nw-mwasm" set ASM_MODE=nw-mwasm
74if "%1" == "nw-mwasm" set ASSEMBLER=Metrowerks
3b0e61a8 75if "%1" == "nw-mwasm" set NO_ASM=
4d8743f4
RL
76if "%1" == "nw-mwasm" set ARG_PROCESSED=YES
77if "%1" == "netware-clib" set BLD_TARGET=netware-clib
78if "%1" == "netware-clib" set ARG_PROCESSED=YES
3b0e61a8
DSH
79if "%1" == "netware-clib-bsdsock" set BLD_TARGET=netware-clib-bsdsock
80if "%1" == "netware-clib-bsdsock" set ARG_PROCESSED=YES
4d8743f4
RL
81if "%1" == "netware-libc" set BLD_TARGET=netware-libc
82if "%1" == "netware-libc" set ARG_PROCESSED=YES
cbcbd07d
RL
83if "%1" == "netware-libc-bsdsock" set BLD_TARGET=netware-libc-bsdsock
84if "%1" == "netware-libc-bsdsock" set ARG_PROCESSED=YES
4d8743f4
RL
85
86rem If we didn't recognize the argument, consider it an option for config
87if "%ARG_PROCESSED%" == "NO" set CONFIG_OPTS=%CONFIG_OPTS% %1
88if "%ARG_PROCESSED%" == "YES" set ARG_PROCESSED=NO
89
90shift
91goto opts
92:endopt
93
94rem make sure a valid BLD_TARGET was specified
95if "%BLD_TARGET%" == "no_target" goto no_target
96
97rem build the nlm make file name which includes target and debug info
98set NLM_MAKE=
99if "%BLD_TARGET%" == "netware-clib" set NLM_MAKE=netware\nlm_clib
3b0e61a8 100if "%BLD_TARGET%" == "netware-clib-bsdsock" set NLM_MAKE=netware\nlm_clib_bsdsock
4d8743f4 101if "%BLD_TARGET%" == "netware-libc" set NLM_MAKE=netware\nlm_libc
cbcbd07d 102if "%BLD_TARGET%" == "netware-libc-bsdsock" set NLM_MAKE=netware\nlm_libc_bsdsock
4d8743f4
RL
103if "%DEBUG%" == "" set NLM_MAKE=%NLM_MAKE%.mak
104if "%DEBUG%" == "debug" set NLM_MAKE=%NLM_MAKE%_dbg.mak
105
106if "%NO_ASM%" == "no-asm" set ASM_MODE=
107if "%NO_ASM%" == "no-asm" set ASSEMBLER=
108if "%NO_ASM%" == "no-asm" set CONFIG_OPTS=%CONFIG_OPTS% no-asm
109if "%NO_ASM%" == "no-asm" goto do_config
110
111
112rem ==================================================
113echo Generating x86 for %ASSEMBLER% assembler
114
115echo Bignum
116cd crypto\bn\asm
3b0e61a8
DSH
117rem perl x86.pl %ASM_MODE% > bn-nw.asm
118perl bn-586.pl %ASM_MODE% > bn-nw.asm
119perl co-586.pl %ASM_MODE% > co-nw.asm
120cd ..\..\..
121
122echo AES
123cd crypto\aes\asm
124perl aes-586.pl %ASM_MODE% > a-nw.asm
4d8743f4
RL
125cd ..\..\..
126
127echo DES
128cd crypto\des\asm
129perl des-586.pl %ASM_MODE% > d-nw.asm
130cd ..\..\..
131
132echo "crypt(3)"
133
134cd crypto\des\asm
135perl crypt586.pl %ASM_MODE% > y-nw.asm
136cd ..\..\..
137
138echo Blowfish
139
140cd crypto\bf\asm
141perl bf-586.pl %ASM_MODE% > b-nw.asm
142cd ..\..\..
143
144echo CAST5
145cd crypto\cast\asm
146perl cast-586.pl %ASM_MODE% > c-nw.asm
147cd ..\..\..
148
149echo RC4
150cd crypto\rc4\asm
151perl rc4-586.pl %ASM_MODE% > r4-nw.asm
152cd ..\..\..
153
154echo MD5
155cd crypto\md5\asm
156perl md5-586.pl %ASM_MODE% > m5-nw.asm
157cd ..\..\..
158
159echo SHA1
160cd crypto\sha\asm
161perl sha1-586.pl %ASM_MODE% > s1-nw.asm
162cd ..\..\..
163
164echo RIPEMD160
165cd crypto\ripemd\asm
166perl rmd-586.pl %ASM_MODE% > rm-nw.asm
167cd ..\..\..
168
169echo RC5\32
170cd crypto\rc5\asm
171perl rc5-586.pl %ASM_MODE% > r5-nw.asm
172cd ..\..\..
173
3b0e61a8
DSH
174echo CPUID
175cd crypto
176perl x86cpuid.pl %ASM_MODE% > x86cpuid-nw.asm
177cd ..\
178
4d8743f4
RL
179rem ===============================================================
180rem
181:do_config
182
183echo .
184echo configure options: %CONFIG_OPTS% %BLD_TARGET%
185echo .
186perl configure %CONFIG_OPTS% %BLD_TARGET%
187
188perl util\mkfiles.pl >MINFO
189
190echo .
191echo mk1mf.pl options: %DEBUG% %ASM_MODE% %CONFIG_OPTS% %BLD_TARGET%
192echo .
193perl util\mk1mf.pl %DEBUG% %ASM_MODE% %CONFIG_OPTS% %BLD_TARGET% >%NLM_MAKE%
194
3b0e61a8
DSH
195make -f %NLM_MAKE% vclean
196echo .
4d8743f4 197echo The makefile "%NLM_MAKE%" has been created use your maketool to
3b0e61a8 198echo build (ex: make -f %NLM_MAKE%)
4d8743f4
RL
199goto end
200
201rem ===============================================================
202rem
203:no_target
204echo .
205echo . No build target specified!!!
206echo .
207echo . usage: build [target] [debug opts] [assembly opts] [configure opts]
208echo .
cbcbd07d 209echo . target - "netware-clib" - CLib NetWare build (WinSock Sockets)
3b0e61a8
DSH
210echo . - "netware-clib-bsdsock" - CLib NetWare build (BSD Sockets)
211echo . - "netware-libc" - LibC NetWare build (WinSock Sockets)
212echo . - "netware-libc-bsdsock" - LibC NetWare build (BSD Sockets)
4d8743f4
RL
213echo .
214echo . debug opts - "debug" - build debug
215echo .
216echo . assembly opts - "nw-mwasm" - use Metrowerks assembler
217echo . "nw-nasm" - use NASM assembler
218echo . "no-asm" - don't use assembly
219echo .
220echo . configure opts- all unrecognized arguments are passed to the
221echo . perl configure script
222echo .
223echo . If no debug or assembly opts are specified the default is to build
224echo . non-debug without assembly
225echo .
226
227
228:end