X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/fa8ebf26d01c3e4e5320f1a961a4eca12e1b7659..f5dd8adbec0c362f609e2f115ff5859ce4969d09:/mkfiles.pl diff --git a/mkfiles.pl b/mkfiles.pl index f2c660b1..422b8b0e 100755 --- a/mkfiles.pl +++ b/mkfiles.pl @@ -9,7 +9,13 @@ use FileHandle; -open IN, "Recipe" or die "unable to open Recipe file\n"; +open IN, "Recipe" or do { + # We want to deal correctly with being run from one of the + # subdirs in the source tree. So if we can't find Recipe here, + # try one level up. + chdir ".."; + open IN, "Recipe" or die "unable to open Recipe file\n"; +}; # HACK: One of the source files in `charset' is auto-generated by # sbcsgen.pl. We need to generate that _now_, before attempting @@ -539,7 +545,7 @@ print "# TOOLPATH = /opt/gcc/bin\n". "CC = \$(TOOLPATH)cc\n". "\n". -&splitline("CFLAGS = -Wall -Werror -g -I. -I.. -I../charset `gtk-config --cflags`")."\n". +&splitline("CFLAGS = -O2 -Wall -Werror -g -I. -I.. -I../charset `gtk-config --cflags`")."\n". "XLDFLAGS = `gtk-config --libs`\n". "ULDFLAGS =#\n". "INSTALL=install\n",