1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-01 19:42:48 -05:00

Update Makefile generation and ensure everything works with Borland 5.5

[originally from svn r684]
This commit is contained in:
Simon Tatham
2000-10-06 15:54:04 +00:00
parent b584238186
commit 942d7f0533
3 changed files with 16 additions and 8 deletions

View File

@ -88,7 +88,7 @@ LRESRC = plink.$(RES)
# pageant # pageant
##-- console-apps ##-- console-apps
# pscp # pscp
# plink # plink ws2_32
##-- ##--
LIBS1 = advapi32.lib user32.lib gdi32.lib LIBS1 = advapi32.lib user32.lib gdi32.lib

View File

@ -29,12 +29,18 @@ close IN;
foreach $i (split '\n',$store{'gui-apps'}) { foreach $i (split '\n',$store{'gui-apps'}) {
$i =~ s/^# //; $i =~ s/^# //;
$speciallibs = [split ' ', $i];
$i = shift @$speciallibs; # take off project name
$gui{$i} = 1; $gui{$i} = 1;
$libs{$i} = $speciallibs;
} }
foreach $i (split '\n',$store{'console-apps'}) { foreach $i (split '\n',$store{'console-apps'}) {
$i =~ s/^# //; $i =~ s/^# //;
$gui{$i} = -0; $speciallibs = [split ' ', $i];
$i = shift @$speciallibs; # take off project name
$gui{$i} = 0;
$libs{$i} = $speciallibs;
} }
sub project { sub project {
@ -91,7 +97,9 @@ print
foreach $p (@projects) { foreach $p (@projects) {
print $p, ".exe: ", &project($p), "\n"; print $p, ".exe: ", &project($p), "\n";
my $mw = $gui{$p} ? " -mwindows" : ""; my $mw = $gui{$p} ? " -mwindows" : "";
print "\t\$(CC)" . $mw . " \$(LDFLAGS) -o \$@ " . &project($p), " \$(LIBS)\n\n"; $libstr = "";
foreach $lib (@{$libs{$p}}) { $libstr .= " -l$lib"; }
print "\t\$(CC)" . $mw . " \$(LDFLAGS) -o \$@ " . &project($p), " \$(LIBS)$libstr\n\n";
} }
print $store{"dependencies"}; print $store{"dependencies"};
print print
@ -118,9 +126,6 @@ print
"# so that the .rsp files still depend on the correct makefile.\n". "# so that the .rsp files still depend on the correct makefile.\n".
"MAKEFILE = Makefile.bor\n". "MAKEFILE = Makefile.bor\n".
"\n". "\n".
"# Stop windows.h including winsock2.h which would conflict with winsock 1\n".
"CFLAGS = -DWIN32_LEAN_AND_MEAN\n".
"\n".
"# Get include directory for resource compiler\n". "# Get include directory for resource compiler\n".
"!if !\$d(BCB)\n". "!if !\$d(BCB)\n".
"BCB = \$(MAKEDIR)\\..\n". "BCB = \$(MAKEDIR)\\..\n".
@ -155,7 +160,10 @@ foreach $p (@projects) {
print "\techo \$($objlines[$i])$plus >> $p.rsp\n"; print "\techo \$($objlines[$i])$plus >> $p.rsp\n";
} }
print "\techo $p.exe >> $p.rsp\n"; print "\techo $p.exe >> $p.rsp\n";
print "\techo nul,cw32 import32, >> $p.rsp\n"; @libs = @{$libs{$p}};
unshift @libs, "cw32", "import32";
$libstr = join ' ', @libs;
print "\techo nul,$libstr, >> $p.rsp\n";
print "\techo " . (join " ", &project("resources.$p")) . " >> $p.rsp\n"; print "\techo " . (join " ", &project("resources.$p")) . " >> $p.rsp\n";
print "\n"; print "\n";
} }

View File

@ -177,7 +177,7 @@ static int get_password(const char *prompt, char *str, int maxlen)
return 1; return 1;
} }
static int WINAPI stdin_read_thread(void *param) { static DWORD WINAPI stdin_read_thread(void *param) {
struct input_data *idata = (struct input_data *)param; struct input_data *idata = (struct input_data *)param;
HANDLE inhandle; HANDLE inhandle;