summaryrefslogtreecommitdiff
path: root/source4/build
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2004-05-18 13:14:53 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:53:49 -0500
commit6fdba3084b1213e729b889cb5e7eb989a6bd0da3 (patch)
treed0cb29b39fe12a1af077be4aa5fa346291833607 /source4/build
parentcfc2f3c5ab426d31cc11e47ff4c308cb72209db8 (diff)
downloadsamba-6fdba3084b1213e729b889cb5e7eb989a6bd0da3.tar.gz
samba-6fdba3084b1213e729b889cb5e7eb989a6bd0da3.tar.bz2
samba-6fdba3084b1213e729b889cb5e7eb989a6bd0da3.zip
r767: add a $flags argument to the std_CC make rule generater
we may need this for compiling with -fPIC metze (This used to be commit e65b38b7cade96e577a5065d08679ba70b074151)
Diffstat (limited to 'source4/build')
-rw-r--r--source4/build/smb_build/makefile.pl14
1 files changed, 9 insertions, 5 deletions
diff --git a/source4/build/smb_build/makefile.pl b/source4/build/smb_build/makefile.pl
index 97ae7eb211..ab5539e61c 100644
--- a/source4/build/smb_build/makefile.pl
+++ b/source4/build/smb_build/makefile.pl
@@ -173,23 +173,27 @@ dynconfig.o: dynconfig.c Makefile
###########################################################
# This function creates a standard make rule which is using $(CC)
#
-# $output = _prepare_std_CC_rule($srcext,$destext,$message,$comment)
+# $output = _prepare_std_CC_rule($srcext,$destext,$flags,$message,$comment)
#
# $srcext - sourcefile extension
#
# $destext - destinationfile extension
#
+# $flags - additional compiler flags
+#
# $message - logmessage which is echoed while running this rule
#
# $comment - just a comment what this rule should do
#
# $output - the resulting output buffer
-sub _prepare_std_CC_rule($$$$)
+sub _prepare_std_CC_rule($$$$$)
{
my $src = shift;
my $dst = shift;
+ my $flags = shift;
my $message = shift;
my $comment = shift;
+ my $flagsstr = "";
my $output;
$output = "
@@ -199,7 +203,7 @@ sub _prepare_std_CC_rule($$$$)
\@if (: >> \$\@ || : > \$\@) >/dev/null 2>&1; then rm -f \$\@; else \\
dir=`echo \$\@ | sed 's,/[^/]*\$\$,,;s,^\$\$,.,'` \$(MAKEDIR); fi
\@echo $message \$*.$src
- \@\$(CC) \$(CC_FLAGS) -c \$< -o \$\@
+ \@\$(CC) \$(CC_FLAGS) $flags -c \$< -o \$\@
\@BROKEN_CC\@ -mv `echo \$\@ | sed 's%^.*/%%g'` \$\@
#End $comment
###################################
@@ -848,8 +852,8 @@ sub _prepare_makefile_in($)
$output .= _prepare_dummy_MAKEDIR();
- $output .= _prepare_std_CC_rule("c","o","Compiling","Rule for std objectfiles");
- $output .= _prepare_std_CC_rule("h","h.gch","Precompiling","Rule for precompiled headerfiles");
+ $output .= _prepare_std_CC_rule("c","o","","Compiling","Rule for std objectfiles");
+ $output .= _prepare_std_CC_rule("h","h.gch","","Precompiling","Rule for precompiled headerfiles");
$output .= _prepare_obj_lists($CTX);