+
+##-- X/GTK/Unix makefile
+open OUT, ">unix/Makefile.gtk"; select OUT;
+print
+"# Makefile for PuTTY under X/GTK and Unix.\n".
+"#\n# This file was created by `mkfiles.pl' from the `Recipe' file.\n".
+"# DO NOT EDIT THIS FILE DIRECTLY; edit Recipe or mkfiles.pl instead.\n";
+# gcc command line option is -D not /D
+($_ = $help) =~ s/=\/D/=-D/gs;
+print $_;
+print
+"\n".
+"# You can define this path to point at your tools if you need to\n".
+"# TOOLPATH = /opt/gcc/bin\n".
+"CC = \$(TOOLPATH)cc\n".
+"\n".
+&splitline("CFLAGS = -Wall -g -I. -I.. `gtk-config --cflags`")."\n".
+"LDFLAGS = `gtk-config --libs`\n".
+"\n".
+".SUFFIXES:\n".
+"\n".
+"%.o:\n".
+"\t\$(CC) \$(COMPAT) \$(FWHACK) \$(XFLAGS) \$(CFLAGS) -c \$<\n".
+"\n";
+print &splitline("all:" . join "", map { " $_" } &prognames("X"));
+print "\n\n";
+foreach $p (&prognames("X")) {
+ $objstr = &objects($p, "X.o", undef, undef);
+ print &splitline($p . ": " . $objstr), "\n";
+ $libstr = &objects($p, undef, undef, "-lX");
+ print &splitline("\t\$(CC)" . $mw . " \$(LDFLAGS) -o \$@ " .
+ $objstr . " $libstr", 69), "\n\n";
+}
+&deps("X.o", undef, "../", "/");
+print
+"\n".
+"version.o: FORCE;\n".
+"# Hack to force version.o to be rebuilt always\n".
+"FORCE:\n".
+"\t\$(CC) \$(COMPAT) \$(FWHACK) \$(XFLAGS) \$(CFLAGS) \$(VER) -c version.c\n".
+"clean:\n".
+"\trm -f *.o". (join "", map { " $_" } &prognames("X")) . "\n".
+"\n";
+select STDOUT; close OUT;