Get the Mingw32 makefiles right.

This commit is contained in:
Ulf Möller 1999-05-07 17:51:29 +00:00
parent 5b640028cb
commit 12d7d32f24
4 changed files with 166 additions and 84 deletions

View file

@ -86,11 +86,11 @@
> perl util\mkfiles.pl >MINFO
> perl util\mk1mf.pl Mingw32 >ms\mingw32.mak
* If you don't have the GNU file utilities (cp, rm, etc.) installed,
an additional step is required:
* This step can be skipped if you have the GNU file utitilities (cp, rm, ...)
installed:
> perl util\mk1mf.pl VC-WIN32 no-asm >ms\nt.mak
> make -f ms/nt.mak
> perl util\mk1mf.pl Mingw32-files >ms\mingw32f.mak
> make -f ms/mingw32f.mak
This will end with an error message. If you don't like that, install
the file utilities. :)

View file

@ -19,6 +19,7 @@ $infile="MINFO";
"VC-W31-32", "Microsoft Visual C++ 1.52 - Windows 3.1 - 386+",
"VC-MSDOS","Microsoft Visual C++ 1.52 - MSDOS",
"Mingw32", "GNU C++ - Windows NT or 9x",
"Mingw32-files", "Create files with DOS copy ...",
"BC-NT", "Borland C++ 4.5 - Windows NT",
"BC-W31", "Borland C++ 4.5 - Windows 3.1 - PROBABLY NOT WORKING",
"BC-MSDOS","Borland C++ 4.5 - MSDOS",
@ -117,6 +118,7 @@ $out_def="out";
$inc_def="outinc";
$tmp_def="tmp";
$mkdir="mkdir";
($ssl,$crypto)=("ssl","crypto");
$RSAglue="RSAglue";
@ -158,6 +160,10 @@ elsif ($platform eq "Mingw32")
{
require 'Mingw32.pl';
}
elsif ($platform eq "Mingw32-files")
{
require 'Mingw32f.pl';
}
elsif ($platform eq "BC-NT")
{
$bc=1;
@ -317,7 +323,7 @@ INCO_D=$inc_dir${o}openssl
CP=$cp
RM=$rm
RANLIB=$ranlib
MKDIR=mkdir
MKDIR=$mkdir
MKLIB=$bin_dir$mklib
MLFLAGS=$mlflags
ASM=$bin_dir$asm

View file

@ -1,79 +1,81 @@
#!/usr/local/bin/perl
#
# unix.pl - the standard unix makefile stuff.
#
# Need the Cygwin32 file utilities
$o='/';
$cp='cp';
$rm='rm';
# gcc wouldn't accept backslashes in paths
#$o='\\';
#$cp='copy';
#$rm='del';
# C compiler stuff
$cc='gcc';
if ($debug)
{ $cflags="-g2 -ggdb"; }
else
{ $cflags="-O3 -fomit-frame-pointer"; }
$dcflags='n' # Make can't handle -DCFLAGS definition
$obj='.o';
$ofile='-o ';
# EXE linking stuff
$link='${CC}';
$lflags='${CFLAGS}';
$efile='-o ';
$exep='';
$ex_libs="-lwsock32 -lgdi32";
# static library stuff
$mklib='ar r';
$mlflags='';
$ranlib='ranlib';
$plib='lib';
$libp=".a";
$shlibp=".a";
$lfile='';
$asm='as';
$afile='-o ';
$bn_asm_obj="";
$bn_asm_src="";
$des_enc_obj="";
$des_enc_src="";
$bf_enc_obj="";
$bf_enc_src="";
sub do_lib_rule
{
local($obj,$target,$name,$shlib)=@_;
local($ret,$_,$Name);
$target =~ s/\//$o/g if $o ne '/';
$target="$target";
($Name=$name) =~ tr/a-z/A-Z/;
$ret.="$target: \$(${Name}OBJ)\n";
$ret.="\t\$(RM) $target\n";
$ret.="\t\$(MKLIB) $target \$(${Name}OBJ)\n";
$ret.="\t\$(RANLIB) $target\n\n";
}
sub do_link_rule
{
local($target,$files,$dep_libs,$libs)=@_;
local($ret,$_);
$file =~ s/\//$o/g if $o ne '/';
$n=&bname($target);
$ret.="$target: $files $dep_libs\n";
$ret.="\t\$(LINK) ${efile}$target \$(LFLAGS) $files $libs\n\n";
return($ret);
}
1;
#!/usr/local/bin/perl
#
# unix.pl - the standard unix makefile stuff.
#
# Need the Cygwin32 file utilities
$o='/';
$cp='cp';
$rm='rm';
$mkdir='gmkdir';
# gcc wouldn't accept backslashes in paths
#$o='\\';
#$cp='copy';
#$rm='del';
# C compiler stuff
$cc='gcc';
if ($debug)
{ $cflags="-g2 -ggdb"; }
else
{ $cflags="-O3 -fomit-frame-pointer"; }
$dcflags='n'; # Make can't handle -DCFLAGS definition
$obj='.o';
$ofile='-o ';
# EXE linking stuff
$link='${CC}';
$lflags='${CFLAGS}';
$efile='-o ';
$exep='';
$ex_libs="-lwsock32 -lgdi32";
# static library stuff
$mklib='ar r';
$mlflags='';
$ranlib='ranlib';
$plib='lib';
$libp=".a";
$shlibp=".a";
$lfile='';
$asm='as';
$afile='-o ';
$bn_asm_obj="";
$bn_asm_src="";
$des_enc_obj="";
$des_enc_src="";
$bf_enc_obj="";
$bf_enc_src="";
sub do_lib_rule
{
local($obj,$target,$name,$shlib)=@_;
local($ret,$_,$Name);
$target =~ s/\//$o/g if $o ne '/';
$target="$target";
($Name=$name) =~ tr/a-z/A-Z/;
$ret.="$target: \$(${Name}OBJ)\n";
$ret.="\t\$(RM) $target\n";
$ret.="\t\$(MKLIB) $target \$(${Name}OBJ)\n";
$ret.="\t\$(RANLIB) $target\n\n";
}
sub do_link_rule
{
local($target,$files,$dep_libs,$libs)=@_;
local($ret,$_);
$file =~ s/\//$o/g if $o ne '/';
$n=&bname($target);
$ret.="$target: $files $dep_libs\n";
$ret.="\t\$(LINK) ${efile}$target \$(LFLAGS) $files $libs\n\n";
return($ret);
}
1;

74
util/pl/Mingw32f.pl Normal file
View file

@ -0,0 +1,74 @@
#!/usr/local/bin/perl
#
# unix.pl - the standard unix makefile stuff.
#
$o='\\';
$cp='copy';
$rm='del';
# C compiler stuff
$cc='gcc';
if ($debug)
{ $cflags="-g2 -ggdb"; }
else
{ $cflags="-O3 -fomit-frame-pointer"; }
$dcflags='n'; # Make can't handle -DCFLAGS definition
$obj='.o';
$ofile='-o ';
# EXE linking stuff
$link='${CC}';
$lflags='${CFLAGS}';
$efile='-o ';
$exep='';
$ex_libs="-lwsock32 -lgdi32";
# static library stuff
$mklib='ar r';
$mlflags='';
$ranlib='ranlib';
$plib='lib';
$libp=".a";
$shlibp=".a";
$lfile='';
$asm='as';
$afile='-o ';
$bn_asm_obj="";
$bn_asm_src="";
$des_enc_obj="";
$des_enc_src="";
$bf_enc_obj="";
$bf_enc_src="";
sub do_lib_rule
{
local($obj,$target,$name,$shlib)=@_;
local($ret,$_,$Name);
$target =~ s/\//$o/g if $o ne '/';
$target="$target";
($Name=$name) =~ tr/a-z/A-Z/;
$ret.="$target: \$(${Name}OBJ)\n";
$ret.="\t\$(RM) $target\n";
$ret.="\t\$(MKLIB) $target \$(${Name}OBJ)\n";
$ret.="\t\$(RANLIB) $target\n\n";
}
sub do_link_rule
{
local($target,$files,$dep_libs,$libs)=@_;
local($ret,$_);
$file =~ s/\//$o/g if $o ne '/';
$n=&bname($target);
$ret.="$target: $files $dep_libs\n";
$ret.="\t\$(LINK) ${efile}$target \$(LFLAGS) $files $libs\n\n";
return($ret);
}
1;