diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2006-03-06 15:34:29 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:52:18 -0500 |
commit | f6457b3d5408d5afe9a4de96d7623f1aa9ec39c4 (patch) | |
tree | daa5b29b3c2eececc2cfd83e79fce2640b81d3b4 /source4/build/smb_build/cflags.pm | |
parent | 354a61fc915da99a16732337b62920909a591b58 (diff) | |
download | samba-f6457b3d5408d5afe9a4de96d7623f1aa9ec39c4.tar.gz samba-f6457b3d5408d5afe9a4de96d7623f1aa9ec39c4.tar.bz2 samba-f6457b3d5408d5afe9a4de96d7623f1aa9ec39c4.zip |
r13867: Wrap the cflags.sh hack in the build system. You can now simply
set subsystem-specific compiler flags in the .mk files.
(This used to be commit d512b147e8dda39016faf74a50a9d85bfc23a2eb)
Diffstat (limited to 'source4/build/smb_build/cflags.pm')
-rwxr-xr-x | source4/build/smb_build/cflags.pm | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/source4/build/smb_build/cflags.pm b/source4/build/smb_build/cflags.pm new file mode 100755 index 0000000000..a19c0efa7b --- /dev/null +++ b/source4/build/smb_build/cflags.pm @@ -0,0 +1,27 @@ +# SMB Build System +# +# Copyright (C) Jelmer Vernooij 2006 +# Released under the GNU GPL + +package cflags; +use strict; + +sub create_cflags($$) +{ + my ($CTX, $file) = @_; + + open(CFLAGS_TXT,">$file") || die ("Can't open `$file'\n"); + + foreach my $key (values %{$CTX}) { + next unless defined ($key->{OBJ_LIST}); + next unless defined ($key->{EXTRA_CFLAGS}); + + foreach (@{$key->{OBJ_LIST}}) { + print CFLAGS_TXT "$_: $key->{EXTRA_CFLAGS}\n"; + } + } + close(CFLAGS_TXT); + + print __FILE__.": creating $file\n"; +} +1; |