From 6fdba3084b1213e729b889cb5e7eb989a6bd0da3 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 18 May 2004 13:14:53 +0000 Subject: 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) --- source4/build/smb_build/makefile.pl | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'source4/build') 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); -- cgit