~ubuntu-branches/ubuntu/lucid/openssl/lucid-proposed

« back to all changes in this revision

Viewing changes to util/pl/netware.pl

  • Committer: Bazaar Package Importer
  • Author(s): Kurt Roeckx
  • Date: 2009-06-13 18:15:46 UTC
  • mto: (11.1.5 squeeze)
  • mto: This revision was merged to the branch mainline in revision 34.
  • Revision ID: james.westby@ubuntu.com-20090613181546-vbfntai3b009dl1u
Tags: upstream-0.9.8k
ImportĀ upstreamĀ versionĀ 0.9.8k

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Metrowerks Codewarrior for NetWare
 
1
# Metrowerks Codewarrior or gcc / nlmconv for NetWare
2
2
#
3
3
 
 
4
$version_header = "crypto/opensslv.h";
 
5
open(IN, "$version_header") or die "Couldn't open $version_header: $!";
 
6
while (<IN>) {
 
7
  if (/^#define[\s\t]+OPENSSL_VERSION_NUMBER[\s\t]+0x(\d)(\d{2})(\d{2})(\d{2})/)
 
8
  {
 
9
    # die "OpenSSL version detected: $1.$2.$3.$4\n";
 
10
    #$nlmvernum = "$1,$2,$3";
 
11
    $nlmvernum = "$1,".($2*10+$3).",".($4*1);
 
12
    #$nlmverstr = "$1.".($2*1).".".($3*1).($4?(chr(96+$4)):"");
 
13
    break;
 
14
  }
 
15
}
 
16
close(IN) or die "Couldn't close $version_header: $!";
 
17
 
 
18
$readme_file = "README";
 
19
open(IN, $readme_file) or die "Couldn't open $readme_file: $!";
 
20
while (<IN>) {
 
21
  if (/^[\s\t]+OpenSSL[\s\t]+(\d)\.(\d{1,2})\.(\d{1,2})([a-z])(.*)/)
 
22
  {
 
23
    #$nlmvernum = "$1,$2,$3";
 
24
    #$nlmvernum = "$1,".($2*10+$3).",".($4*1);
 
25
    $nlmverstr = "$1.$2.$3$4$5";
 
26
  }
 
27
  elsif (/^[\s\t]+(Copyright \(c\) \d{4}\-\d{4} The OpenSSL Project)$/)
 
28
  {
 
29
    $nlmcpystr = $1;
 
30
  }
 
31
  break if ($nlmvernum && $nlmcpystr);
 
32
}
 
33
close(IN) or die "Couldn't close $readme_file: $!";
 
34
 
 
35
# Define stacksize here
 
36
$nlmstack = "32768";
 
37
 
 
38
# some default settings here in case we failed to find them in README
 
39
$nlmvernum = "1,0,0" if (!$nlmvernum);
 
40
$nlmverstr = "OpenSSL" if (!$nlmverstr);
 
41
$nlmcpystr = "Copyright (c) 1998-now The OpenSSL Project" if (!$nlmcpystr);
 
42
 
 
43
# die "OpenSSL copyright: $nlmcpystr\nOpenSSL verstring: $nlmverstr\nOpenSSL vernumber: $nlmvernum\n";
 
44
 
4
45
# The import files and other misc imports needed to link
5
 
@misc_imports = ("GetProcessSwitchCount", "RunningProcess",  
 
46
@misc_imports = ("GetProcessSwitchCount", "RunningProcess",
6
47
                 "GetSuperHighResolutionTimer");
7
48
if ($LIBC)
8
49
{
9
50
   @import_files = ("libc.imp");
10
51
   @module_files = ("libc");
 
52
   $libarch = "LIBC";
11
53
}
12
54
else
13
55
{
14
56
   # clib build
15
57
   @import_files = ("clib.imp");
 
58
   push(@import_files, "socklib.imp") if ($BSDSOCK);
16
59
   @module_files = ("clib");
17
 
   push(@misc_imports, "_rt_modu64%16", "_rt_divu64%16");
18
 
}
19
 
if (!$BSDSOCK)
20
 
{
 
60
   # push(@misc_imports, "_rt_modu64%16", "_rt_divu64%16");
 
61
   $libarch = "CLIB";
 
62
}
 
63
if ($BSDSOCK)
 
64
{
 
65
   $libarch .= "-BSD";
 
66
}
 
67
else
 
68
{
 
69
   $libarch .= "-WS2";
21
70
   push(@import_files, "ws2nlm.imp");
22
71
}
23
 
                 
24
72
 
25
73
# The "IMPORTS" environment variable must be set and point to the location
26
74
# where import files (*.imp) can be found.
33
81
# Example: set PRELUDE=c:\codewar\novell support\metrowerks support\libraries\runtime\nwpre.obj
34
82
$prelude = $ENV{"PRELUDE"} || die ("PRELUDE environment variable not set\n");
35
83
 
 
84
# The "INCLUDES" environment variable must be set and point to the location
 
85
# where import files (*.imp) can be found.
 
86
$include_path = $ENV{"INCLUDE"} || die ("INCLUDES environment variable not set\n");
 
87
$include_path =~ s/\\/\//g;
 
88
$include_path = join(" -I", split(/;/, $include_path));
 
89
 
 
90
# check for gcc compiler
 
91
$gnuc = $ENV{"GNUC"};
 
92
 
36
93
#$ssl=   "ssleay32";
37
94
#$crypto="libeay32";
38
95
 
39
 
$o='\\\\';
40
 
$cp='copy >nul:';
41
 
$rm='del';
42
 
 
43
 
# C compiler
44
 
$cc="mwccnlm";
45
 
 
46
 
# Linker
47
 
$link="mwldnlm";
48
 
 
49
 
# librarian
50
 
$mklib="mwldnlm";
51
 
 
52
 
# assembler 
53
 
if ($nw_nasm) 
54
 
{
55
 
   $asm="nasmw -s -f coff";
 
96
if ($gnuc)
 
97
{
 
98
   # C compiler
 
99
   $cc='gcc';
 
100
   # Linker
 
101
   $link='nlmconv';
 
102
   # librarian
 
103
   $mklib='ar';
 
104
   $o='/';
 
105
   # cp command
 
106
   $cp='cp -af';
 
107
   # rm command
 
108
   $rm='rm -f';
 
109
   # mv command
 
110
   $mv='mv -f';
 
111
   # mkdir command
 
112
   $mkdir='gmkdir';
 
113
   #$ranlib='ranlib';
 
114
}
 
115
else
 
116
{
 
117
   # C compiler
 
118
   $cc='mwccnlm';
 
119
   # Linker
 
120
   $link='mwldnlm';
 
121
   # librarian
 
122
   $mklib='mwldnlm';
 
123
   # Path separator
 
124
   $o='\\';
 
125
   # cp command
 
126
   $cp='copy >nul:';
 
127
   # rm command
 
128
   $rm='del /f /q';
 
129
}
 
130
 
 
131
# assembler
 
132
if ($nw_nasm)
 
133
{
 
134
   if ($gnuc)
 
135
   {
 
136
      $asm="nasmw -s -f elf";
 
137
   }
 
138
   else
 
139
   {
 
140
      $asm="nasmw -s -f coff";
 
141
   }
56
142
   $afile="-o ";
57
143
   $asm.=" -g" if $debug;
58
144
}
59
 
elsif ($nw_mwasm) 
 
145
elsif ($nw_mwasm)
60
146
{
61
147
   $asm="mwasmnlm -maxerrors 20";
62
148
   $afile="-o ";
64
150
}
65
151
elsif ($nw_masm)
66
152
{
67
 
# masm assembly settings - it should be possible to use masm but haven't 
 
153
# masm assembly settings - it should be possible to use masm but haven't
68
154
# got it working.
69
155
# $asm='ml /Cp /coff /c /Cx';
70
156
# $asm.=" /Zi" if $debug;
71
157
# $afile='/Fo';
72
158
   die("Support for masm assembler not yet functional\n");
73
159
}
74
 
else 
 
160
else
75
161
{
76
162
   $asm="";
77
163
   $afile="";
79
165
 
80
166
 
81
167
 
82
 
# compile flags
83
 
#
84
 
# NOTES: Several c files in the crypto subdirectory include headers from
85
 
#        their local directories.  Metrowerks wouldn't find these h files
86
 
#        without adding individual include directives as compile flags
87
 
#        or modifying the c files.  Instead of adding individual include
88
 
#        paths for each subdirectory a recursive include directive
89
 
#        is used ( -ir crypto ).
90
 
#
91
 
#        A similar issue exists for the engines and apps subdirectories.
92
 
#
93
 
#        Turned off the "possible" warnings ( -w nopossible ).  Metrowerks
94
 
#        complained a lot about various stuff.  May want to turn back
95
 
#        on for further development.
96
 
$cflags="-ir crypto -ir engines -ir apps -msgstyle gcc -align 4 -processor pentium \\
97
 
         -char unsigned -w on -w nolargeargs -w nopossible -w nounusedarg \\
98
 
         -w noimplicitconv -relax_pointers -nosyspath -DL_ENDIAN \\
99
 
         -DOPENSSL_SYSNAME_NETWARE -U_WIN32 -maxerrors 20 ";
100
 
 
101
 
# link flags
102
 
$lflags="-msgstyle gcc -zerobss -stacksize 32768 -nostdlib -sym internal ";
103
 
 
104
 
 
105
 
# additional flags based upon debug | non-debug
106
 
if ($debug)
 
168
if ($gnuc)
107
169
{
108
 
   $cflags.=" -opt off -g -sym internal -DDEBUG";
 
170
   # compile flags for GNUC
 
171
   # additional flags based upon debug | non-debug
 
172
   if ($debug)
 
173
   {
 
174
      $cflags="-g -DDEBUG";
 
175
   }
 
176
   else
 
177
   {
 
178
      $cflags="-O2";
 
179
   }
 
180
   $cflags.=" -nostdinc -I$include_path \\
 
181
         -fno-builtin -fpcc-struct-return -fno-strict-aliasing \\
 
182
         -funsigned-char -Wall -Wno-unused -Wno-uninitialized";
 
183
 
 
184
   # link flags
 
185
   $lflags="-T";
109
186
}
110
187
else
111
188
{
112
 
# CodeWarrior compiler has a problem with optimizations for floating
113
 
# points - no optimizations until further investigation
114
 
#   $cflags.=" -opt all";
 
189
   # compile flags for CodeWarrior
 
190
   # additional flags based upon debug | non-debug
 
191
   if ($debug)
 
192
   {
 
193
      $cflags="-opt off -g -sym internal -DDEBUG";
 
194
   }
 
195
   else
 
196
   {
 
197
   # CodeWarrior compiler has a problem with optimizations for floating
 
198
   # points - no optimizations until further investigation
 
199
   #      $cflags="-opt all";
 
200
   }
 
201
 
 
202
   # NOTES: Several c files in the crypto subdirectory include headers from
 
203
   #        their local directories.  Metrowerks wouldn't find these h files
 
204
   #        without adding individual include directives as compile flags
 
205
   #        or modifying the c files.  Instead of adding individual include
 
206
   #        paths for each subdirectory a recursive include directive
 
207
   #        is used ( -ir crypto ).
 
208
   #
 
209
   #        A similar issue exists for the engines and apps subdirectories.
 
210
   #
 
211
   #        Turned off the "possible" warnings ( -w nopossible ).  Metrowerks
 
212
   #        complained a lot about various stuff.  May want to turn back
 
213
   #        on for further development.
 
214
   $cflags.=" -nostdinc -ir crypto -ir engines -ir apps -I$include_path \\
 
215
         -msgstyle gcc -align 4 -processor pentium -char unsigned \\
 
216
         -w on -w nolargeargs -w nopossible -w nounusedarg -w nounusedexpr \\
 
217
         -w noimplicitconv -relax_pointers -nosyspath -maxerrors 20";
 
218
 
 
219
   # link flags
 
220
   $lflags="-msgstyle gcc -zerobss -nostdlib -sym internal -commandfile";
115
221
}
116
222
 
 
223
# common defines
 
224
$cflags.=" -DL_ENDIAN -DOPENSSL_SYSNAME_NETWARE -U_WIN32";
 
225
 
117
226
# If LibC build add in NKS_LIBC define and set the entry/exit
118
227
# routines - The default entry/exit routines are for CLib and don't exist
119
228
# in LibC
120
229
if ($LIBC)
121
230
{
122
231
   $cflags.=" -DNETWARE_LIBC";
123
 
   $lflags.=" -entry _LibCPrelude -exit _LibCPostlude -flags pseudopreemption";
 
232
   $nlmstart = "_LibCPrelude";
 
233
   $nlmexit = "_LibCPostlude";
 
234
   @nlm_flags = ("pseudopreemption", "flag_on 64");
124
235
}
125
236
else
126
237
{
127
238
   $cflags.=" -DNETWARE_CLIB";
128
 
   $lflags.=" -entry _Prelude -exit _Stop";
 
239
   $nlmstart = "_Prelude";
 
240
   $nlmexit = "_Stop";
129
241
}
130
242
 
131
243
# If BSD Socket support is requested, set a define for the compiler
132
244
if ($BSDSOCK)
133
245
{
134
246
   $cflags.=" -DNETWARE_BSDSOCK";
 
247
   if (!$LIBC)
 
248
   {
 
249
      $cflags.=" -DNETDB_USE_INTERNET";
 
250
   }
135
251
}
136
252
 
137
253
 
154
270
}
155
271
else
156
272
{
157
 
   $libp=".lib";
158
 
   $shlibp=".lib";
159
 
   $lib_flags="-nodefaults -type library";
 
273
   if ($gnuc) # GNUC Tools
 
274
   {
 
275
      $libp=".a";
 
276
      $shlibp=".a";
 
277
      $lib_flags="-cr";
 
278
   }
 
279
   else       # CodeWarrior
 
280
   {
 
281
      $libp=".lib";
 
282
      $shlibp=".lib";
 
283
      $lib_flags="-nodefaults -type library -o";
 
284
   }
160
285
   if ($LIBC)
161
286
   {
162
287
      $out_def.="_nw_libc";
163
288
      $tmp_def.="_nw_libc";
164
289
      $inc_def.="_nw_libc";
165
290
   }
166
 
   else  # NETWARE_CLIB 
 
291
   else  # NETWARE_CLIB
167
292
   {
168
293
      $out_def.="_nw_clib";
169
294
      $tmp_def.="_nw_clib";
172
297
}
173
298
 
174
299
# used by mk1mf.pl
175
 
$obj='.obj';
 
300
$obj='.o';
176
301
$ofile='-o ';
177
302
$efile='';
178
303
$exep='.nlm';
180
305
 
181
306
if (!$no_asm)
182
307
{
183
 
   $bn_asm_obj="crypto${o}bn${o}asm${o}bn-nw.obj";
 
308
   $bn_asm_obj="\$(OBJ_D)${o}bn-nw${obj}";
184
309
   $bn_asm_src="crypto${o}bn${o}asm${o}bn-nw.asm";
185
 
   $des_enc_obj="crypto${o}des${o}asm${o}d-nw.obj crypto${o}des${o}asm${o}y-nw.obj";
 
310
   $bnco_asm_obj="\$(OBJ_D)${o}co-nw${obj}";
 
311
   $bnco_asm_src="crypto${o}bn${o}asm${o}co-nw.asm";
 
312
   $aes_asm_obj="\$(OBJ_D)${o}a-nw${obj}";
 
313
   $aes_asm_src="crypto${o}aes${o}asm${o}a-nw.asm";
 
314
   $des_enc_obj="\$(OBJ_D)${o}d-nw${obj} \$(OBJ_D)${o}y-nw${obj}";
186
315
   $des_enc_src="crypto${o}des${o}asm${o}d-nw.asm crypto${o}des${o}asm${o}y-nw.asm";
187
 
   $bf_enc_obj="crypto${o}bf${o}asm${o}b-nw.obj";
 
316
   $bf_enc_obj="\$(OBJ_D)${o}b-nw${obj}";
188
317
   $bf_enc_src="crypto${o}bf${o}asm${o}b-nw.asm";
189
 
   $cast_enc_obj="crypto${o}cast${o}asm${o}c-nw.obj";
 
318
   $cast_enc_obj="\$(OBJ_D)${o}c-nw${obj}";
190
319
   $cast_enc_src="crypto${o}cast${o}asm${o}c-nw.asm";
191
 
   $rc4_enc_obj="crypto${o}rc4${o}asm${o}r4-nw.obj";
 
320
   $rc4_enc_obj="\$(OBJ_D)${o}r4-nw${obj}";
192
321
   $rc4_enc_src="crypto${o}rc4${o}asm${o}r4-nw.asm";
193
 
   $rc5_enc_obj="crypto${o}rc5${o}asm${o}r5-nw.obj";
 
322
   $rc5_enc_obj="\$(OBJ_D)${o}r5-nw${obj}";
194
323
   $rc5_enc_src="crypto${o}rc5${o}asm${o}r5-nw.asm";
195
 
   $md5_asm_obj="crypto${o}md5${o}asm${o}m5-nw.obj";
 
324
   $md5_asm_obj="\$(OBJ_D)${o}m5-nw${obj}";
196
325
   $md5_asm_src="crypto${o}md5${o}asm${o}m5-nw.asm";
197
 
   $sha1_asm_obj="crypto${o}sha${o}asm${o}s1-nw.obj";
 
326
   $sha1_asm_obj="\$(OBJ_D)${o}s1-nw${obj}";
198
327
   $sha1_asm_src="crypto${o}sha${o}asm${o}s1-nw.asm";
199
 
   $rmd160_asm_obj="crypto${o}ripemd${o}asm${o}rm-nw.obj";
 
328
   $rmd160_asm_obj="\$(OBJ_D)${o}rm-nw${obj}";
200
329
   $rmd160_asm_src="crypto${o}ripemd${o}asm${o}rm-nw.asm";
201
 
   $cflags.=" -DBN_ASM -DMD5_ASM -DSHA1_ASM -DRMD160_ASM";
 
330
   $cpuid_asm_obj="\$(OBJ_D)${o}x86cpuid-nw${obj}";
 
331
   $cpuid_asm_src="crypto${o}x86cpuid-nw.asm";
 
332
   $cflags.=" -DOPENSSL_CPUID_OBJ -DBN_ASM -DOPENSSL_BN_ASM_PART_WORDS -DMD5_ASM -DSHA1_ASM";
 
333
   $cflags.=" -DAES_ASM -DRMD160_ASM";
202
334
}
203
335
else
204
336
{
205
337
   $bn_asm_obj='';
206
338
   $bn_asm_src='';
 
339
   $bnco_asm_obj='';
 
340
   $bnco_asm_src='';
 
341
   $aes_asm_obj='';
 
342
   $aes_asm_src='';
207
343
   $des_enc_obj='';
208
344
   $des_enc_src='';
209
345
   $bf_enc_obj='';
220
356
   $sha1_asm_src='';
221
357
   $rmd160_asm_obj='';
222
358
   $rmd160_asm_src='';
 
359
   $cpuid_asm_obj='';
 
360
   $cpuid_asm_src='';
223
361
}
224
362
 
225
363
# create the *.def linker command files in \openssl\netware\ directory
226
364
sub do_def_file
227
365
{
228
366
   # strip off the leading path
229
 
   my($target) = bname(@_);
230
 
   my($def_file);
231
 
   my($mod_file);
 
367
   my($target) = bname(shift);
232
368
   my($i);
233
369
 
234
370
   if ($target =~ /(.*).nlm/)
239
375
   # special case for openssl - the mk1mf.pl defines E_EXE = openssl
240
376
   if ($target =~ /E_EXE/)
241
377
   {
242
 
      $target = "openssl";
 
378
      $target =~ s/\$\(E_EXE\)/openssl/;
243
379
   }
244
380
 
245
381
   # Note: originally tried to use full path ( \openssl\netware\$target.def )
246
382
   # Metrowerks linker choked on this with an assertion failure. bug???
247
383
   #
248
 
   $def_file = "netware\\$target.def";
 
384
   my($def_file) = "netware${o}$target.def";
249
385
 
250
386
   open(DEF_OUT, ">$def_file") || die("unable to open file $def_file\n");
251
387
 
252
 
   print( DEF_OUT "# command file generated by netware.pl for Metrowerks build\n" );
 
388
   print( DEF_OUT "# command file generated by netware.pl for NLM target.\n" );
 
389
   print( DEF_OUT "# do not edit this file - all your changes will be lost!!\n" );
253
390
   print( DEF_OUT "#\n");
254
 
   print( DEF_OUT "DESCRIPTION \"$target\"\n");
255
 
   
 
391
   print( DEF_OUT "DESCRIPTION \"$target ($libarch) - OpenSSL $nlmverstr\"\n");
 
392
   print( DEF_OUT "COPYRIGHT \"$nlmcpystr\"\n");
 
393
   print( DEF_OUT "VERSION $nlmvernum\n");
 
394
   print( DEF_OUT "STACK $nlmstack\n");
 
395
   print( DEF_OUT "START $nlmstart\n");
 
396
   print( DEF_OUT "EXIT $nlmexit\n");
 
397
 
 
398
   # special case for openssl
 
399
   if ($target eq "openssl")
 
400
   {
 
401
      print( DEF_OUT "SCREENNAME \"OpenSSL $nlmverstr\"\n");
 
402
   }
 
403
   else
 
404
   {
 
405
      print( DEF_OUT "SCREENNAME \"DEFAULT\"\n");
 
406
   }
 
407
 
256
408
   foreach $i (@misc_imports)
257
409
   {
258
410
      print( DEF_OUT "IMPORT $i\n");
259
411
   }
260
 
   
 
412
 
261
413
   foreach $i (@import_files)
262
414
   {
263
 
      print( DEF_OUT "IMPORT \@$import_path\\$i\n");
 
415
      print( DEF_OUT "IMPORT \@$import_path${o}$i\n");
264
416
   }
265
 
   
 
417
 
266
418
   foreach $i (@module_files)
267
419
   {
268
420
      print( DEF_OUT "MODULE $i\n");
269
421
   }
270
422
 
 
423
   foreach $i (@nlm_flags)
 
424
   {
 
425
      print( DEF_OUT "$i\n");
 
426
   }
 
427
 
 
428
   if ($gnuc)
 
429
   {
 
430
      if ($target =~ /openssl/)
 
431
      {
 
432
         print( DEF_OUT "INPUT ${tmp_def}${o}openssl${obj}\n");
 
433
         print( DEF_OUT "INPUT ${tmp_def}${o}openssl${libp}\n");
 
434
      }
 
435
      else
 
436
      {
 
437
         print( DEF_OUT "INPUT ${tmp_def}${o}${target}${obj}\n");
 
438
      }
 
439
      print( DEF_OUT "INPUT $prelude\n");
 
440
      print( DEF_OUT "INPUT ${out_def}${o}${ssl}${libp} ${out_def}${o}${crypto}${libp}\n");
 
441
      print( DEF_OUT "OUTPUT $target.nlm\n");
 
442
   }
 
443
 
271
444
   close(DEF_OUT);
272
445
   return($def_file);
273
446
}
281
454
   if (!$shlib)
282
455
   {
283
456
      $ret.="\t\@echo Building Lib: $name\n";
284
 
      $ret.="\t\$(MKLIB) $lib_flags -o $target $objs\n";
 
457
      $ret.="\t\$(MKLIB) $lib_flags $target $objs\n";
285
458
      $ret.="\t\@echo .\n"
286
459
   }
287
460
   else
297
470
{
298
471
   my($target,$files,$dep_libs,$libs)=@_;
299
472
   my($ret);
300
 
   my($def_file);
301
 
 
302
 
   $def_file = do_def_file($target);
303
 
 
304
 
   # special case for openssl - the mk1mf.pl defines E_EXE = openssl
 
473
   my($def_file) = do_def_file($target);
 
474
 
 
475
   $ret.="$target: $files $dep_libs\n";
305
476
 
306
477
   # NOTE:  When building the test nlms no screen name is given
307
478
   #  which causes the console screen to be used.  By using the console
308
479
   #  screen there is no "<press any key to continue>" message which
309
 
   #  requires user interaction.  The test script ( tests.pl ) needs to be
310
 
   #  able to run the tests without requiring user interaction.
 
480
   #  requires user interaction.  The test script ( do_tests.pl ) needs
 
481
   #  to be able to run the tests without requiring user interaction.
311
482
   #
312
483
   #  However, the sample program "openssl.nlm" is used by the tests and is
313
484
   #  a interactive sample so a screen is desired when not be run by the
315
486
   #    openssl2 - no screen used by tests
316
487
   #    openssl - default screen - use for normal interactive modes
317
488
   #
 
489
 
 
490
   # special case for openssl - the mk1mf.pl defines E_EXE = openssl
318
491
   if ($target =~ /E_EXE/)
319
492
   {
320
493
      my($target2) = $target;
321
494
 
322
495
      $target2 =~ s/\(E_EXE\)/\(E_EXE\)2/;
323
496
 
324
 
      $ret.="$target: $files $dep_libs\n";
 
497
      # openssl2
 
498
      my($def_file2) = do_def_file($target2);
325
499
 
326
 
         # openssl
327
 
      $ret.="\t\$(LINK) \$(LFLAGS) -screenname openssl -commandfile $def_file $files \"$prelude\" $libs -o $target\n";
328
 
         # openssl2
329
 
      $ret.="\t\$(LINK) \$(LFLAGS) -commandfile $def_file $files \"$prelude\" $libs -o $target2\n";
 
500
      if ($gnuc)
 
501
      {
 
502
         $ret.="\t\$(MKLIB) $lib_flags \$(TMP_D)${o}\$(E_EXE).a \$(filter-out \$(TMP_D)${o}\$(E_EXE)${obj},$files)\n";
 
503
         $ret.="\t\$(LINK) \$(LFLAGS) $def_file2\n";
 
504
         $ret.="\t\@$mv \$(E_EXE)2.nlm \$(TEST_D)\n";
 
505
      }
 
506
      else
 
507
      {
 
508
         $ret.="\t\$(LINK) \$(LFLAGS) $def_file2 $files \"$prelude\" $libs -o $target2\n";
 
509
      }
 
510
   }
 
511
   if ($gnuc)
 
512
   {
 
513
      $ret.="\t\$(LINK) \$(LFLAGS) $def_file\n";
 
514
      $ret.="\t\@$mv \$(\@F) \$(TEST_D)\n";
330
515
   }
331
516
   else
332
517
   {
333
 
      $ret.="$target: $files $dep_libs\n";
334
 
      $ret.="\t\$(LINK) \$(LFLAGS) -commandfile $def_file $files \"$prelude\" $libs -o $target\n";
 
518
      $ret.="\t\$(LINK) \$(LFLAGS) $def_file $files \"$prelude\" $libs -o $target\n";
335
519
   }
336
520
 
337
521
   $ret.="\n";
338
522
   return($ret);
 
523
 
339
524
}
340
525
 
341
526
1;