1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-03-22 14:39:24 -05:00

Introduce program category U, for non-GTK-requiring Unix apps. Plink

doesn't need to be linked with libgtk, libgdk, libX11 etc!

[originally from svn r2179]
This commit is contained in:
Simon Tatham 2002-11-01 18:51:55 +00:00
parent f7d23ae746
commit 0e6c1fffd9
2 changed files with 12 additions and 10 deletions

4
Recipe
View File

@ -119,7 +119,7 @@ LIBS2 = LIBS ws2_32.lib
# Definitions of actual programs. The program name, followed by a # Definitions of actual programs. The program name, followed by a
# colon, followed by a list of objects. Also in the list may be the # colon, followed by a list of objects. Also in the list may be the
# keywords [G] for Windows GUI app, [C] for Console app, [X] for # keywords [G] for Windows GUI app, [C] for Console app, [X] for
# X/GTK Unix app. # X/GTK Unix app, [U] for command-line Unix app.
putty : [G] GUITERM NONSSH WINSSH be_all WINMISC win_res.res LIBS1 putty : [G] GUITERM NONSSH WINSSH be_all WINMISC win_res.res LIBS1
puttytel : [G] GUITERM NONSSH be_nossh WINMISC win_res.res LIBS1 puttytel : [G] GUITERM NONSSH be_nossh WINMISC win_res.res LIBS1
@ -139,4 +139,4 @@ puttygen : [G] puttygen sshrsag sshdssg sshprime sshdes sshbn sshmd5 version
pterm : [X] pterm terminal wcwidth uxucs uxmisc tree234 misc ldisc ldiscucs pterm : [X] pterm terminal wcwidth uxucs uxmisc tree234 misc ldisc ldiscucs
+ logging uxprint settings pty be_none uxstore + logging uxprint settings pty be_none uxstore
plink : [X] uxplink uxcons NONSSH UXSSH be_all logging UXMISC plink : [U] uxplink uxcons NONSSH UXSSH be_all logging UXMISC

View File

@ -57,7 +57,8 @@ while (<IN>) {
$i = shift @objs; $i = shift @objs;
if ($groups{$i}) { if ($groups{$i}) {
foreach $j (@{$groups{$i}}) { unshift @objs, $j; } foreach $j (@{$groups{$i}}) { unshift @objs, $j; }
} elsif (($i eq "[G]" or $i eq "[C]" or $i eq "[X]") and defined $prog) { } elsif (($i eq "[G]" or $i eq "[C]" or
$i eq "[X]" or $i eq "[U]") and defined $prog) {
$type = substr($i,1,1); $type = substr($i,1,1);
} else { } else {
push @$listref, $i; push @$listref, $i;
@ -513,7 +514,8 @@ print
"CC = \$(TOOLPATH)cc\n". "CC = \$(TOOLPATH)cc\n".
"\n". "\n".
&splitline("CFLAGS = -Wall -g -I. -I.. `gtk-config --cflags`")."\n". &splitline("CFLAGS = -Wall -g -I. -I.. `gtk-config --cflags`")."\n".
"LDFLAGS = `gtk-config --libs`\n". "XLDFLAGS = `gtk-config --libs`\n".
"ULDFLAGS =#\n".
"INSTALL=install\n", "INSTALL=install\n",
"INSTALL_PROGRAM=\$(INSTALL)\n", "INSTALL_PROGRAM=\$(INSTALL)\n",
"INSTALL_DATA=\$(INSTALL)\n", "INSTALL_DATA=\$(INSTALL)\n",
@ -528,14 +530,14 @@ print
"%.o:\n". "%.o:\n".
"\t\$(CC) \$(COMPAT) \$(FWHACK) \$(XFLAGS) \$(CFLAGS) -c \$<\n". "\t\$(CC) \$(COMPAT) \$(FWHACK) \$(XFLAGS) \$(CFLAGS) -c \$<\n".
"\n"; "\n";
print &splitline("all:" . join "", map { " $_" } &progrealnames("X")); print &splitline("all:" . join "", map { " $_" } &progrealnames("XU"));
print "\n\n"; print "\n\n";
foreach $p (&prognames("X")) { foreach $p (&prognames("XU")) {
($prog, $type) = split ",", $p; ($prog, $type) = split ",", $p;
$objstr = &objects($p, "X.o", undef, undef); $objstr = &objects($p, "X.o", undef, undef);
print &splitline($prog . ": " . $objstr), "\n"; print &splitline($prog . ": " . $objstr), "\n";
$libstr = &objects($p, undef, undef, "-lX"); $libstr = &objects($p, undef, undef, "-lX");
print &splitline("\t\$(CC)" . $mw . " \$(LDFLAGS) -o \$@ " . print &splitline("\t\$(CC)" . $mw . " \$(${type}LDFLAGS) -o \$@ " .
$objstr . " $libstr", 69), "\n\n"; $objstr . " $libstr", 69), "\n\n";
} }
&deps("X.o", undef, "../", "/"); &deps("X.o", undef, "../", "/");
@ -546,11 +548,11 @@ print
"FORCE:\n". "FORCE:\n".
"\t\$(CC) \$(COMPAT) \$(FWHACK) \$(XFLAGS) \$(CFLAGS) \$(VER) -c ../version.c\n". "\t\$(CC) \$(COMPAT) \$(FWHACK) \$(XFLAGS) \$(CFLAGS) \$(VER) -c ../version.c\n".
"clean:\n". "clean:\n".
"\trm -f *.o". (join "", map { " $_" } &progrealnames("X")) . "\n". "\trm -f *.o". (join "", map { " $_" } &progrealnames("XU")) . "\n".
"\n", "\n",
"install:\n", "install:\n",
map("\t\$(INSTALL_PROGRAM) -m 755 $_ \$(bindir)/$_\n", &progrealnames("X")), map("\t\$(INSTALL_PROGRAM) -m 755 $_ \$(bindir)/$_\n", &progrealnames("XU")),
map("\t\$(INSTALL_DATA) -m 644 $_ \$(man1dir)/$_\n", &manpages("X", "1")), map("\t\$(INSTALL_DATA) -m 644 $_ \$(man1dir)/$_\n", &manpages("XU", "1")),
"\n", "\n",
"install-strip:\n", "install-strip:\n",
"\t\$(MAKE) install INSTALL_PROGRAM=\"\$(INSTALL_PROGRAM) -s\"\n", "\t\$(MAKE) install INSTALL_PROGRAM=\"\$(INSTALL_PROGRAM) -s\"\n",