diff options
author | Ben Laurie <ben@links.org> | 2013-02-27 22:07:26 +0000 |
---|---|---|
committer | Ben Laurie <ben@links.org> | 2013-03-04 14:31:18 +0000 |
commit | 3c76bcded0f0ecdea81c5296a68aeecc873a673c (patch) | |
tree | e28f1e98db052ce12cd887705e0b7054657174f1 /util/mk1mf.pl | |
parent | ea5003bd1eecc79e2b3e9fad302d5c4ab326e2ad (diff) |
Inherit CFLAGS when plaform is "auto".
Diffstat (limited to 'util/mk1mf.pl')
-rwxr-xr-x | util/mk1mf.pl | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/util/mk1mf.pl b/util/mk1mf.pl index 1198684e7a..1771e5a4ce 100755 --- a/util/mk1mf.pl +++ b/util/mk1mf.pl @@ -196,6 +196,7 @@ $NT=0; push(@INC,"util/pl","pl"); if ($platform eq "auto") { + $orig_platform = $platform; $platform = $mf_platform; print STDERR "Imported platform $mf_platform\n"; } @@ -321,6 +322,9 @@ else ##else { $cflags="$c_flags$cflags" if ($c_flags ne ""); } +print STDERR "platform = $orig_platform\n"; +$cflags = $mf_cflag if $orig_platform eq 'auto'; + $ex_libs="$l_flags$ex_libs" if ($l_flags ne ""); @@ -1245,7 +1249,8 @@ sub cc_compile_target $ex_flags.=" -DMK1MF_BUILD -D$platform_cpp_symbol" if ($source =~ /cversion/); $target =~ s/\//$o/g if $o ne "/"; $source =~ s/\//$o/g if $o ne "/"; - $ret ="$target: \$(SRC_D)$o$source\n\t"; +# FIXME: do dependencies instead of all headers. + $ret ="$target: \$(SRC_D)$o$source \$(HEADER) \$(EXHEADER)\n\t"; $ret.="\$(CC) ${ofile}$target $ex_flags -c \$(SRC_D)$o$source\n\n"; return($ret); } |