summaryrefslogtreecommitdiff
path: root/source4/build
diff options
context:
space:
mode:
Diffstat (limited to 'source4/build')
-rw-r--r--source4/build/smb_build/input.pm8
-rw-r--r--source4/build/smb_build/makefile.pm4
-rw-r--r--source4/build/smb_build/output.pm4
3 files changed, 8 insertions, 8 deletions
diff --git a/source4/build/smb_build/input.pm b/source4/build/smb_build/input.pm
index b94586d2c2..f50f8baaaf 100644
--- a/source4/build/smb_build/input.pm
+++ b/source4/build/smb_build/input.pm
@@ -10,6 +10,7 @@
use strict;
package input;
+my $subsystem_output_type = "OBJLIST";
our $srcdir = ".";
sub strtrim($)
@@ -52,8 +53,7 @@ sub check_subsystem($$)
printf("Subsystem: %s disabled!\n",$subsys->{NAME});
}
- # FIXME: Make this configurable (so it can be STATIC_LIBRARY, for example)
- $subsys->{OUTPUT_TYPE} = "OBJLIST";
+ $subsys->{OUTPUT_TYPE} = $subsystem_output_type;
}
sub check_module($$)
@@ -89,7 +89,7 @@ sub check_module($$)
$mod->{ENABLE} = "YES";
push (@{$CTX->{INPUT}{$mod->{SUBSYSTEM}}{REQUIRED_SUBSYSTEMS}}, $mod->{NAME});
printf("Module: %s...static\n",$mod->{NAME});
- $mod->{OUTPUT_TYPE} = "OBJLIST";
+ $mod->{OUTPUT_TYPE} = $subsystem_output_type;
} else {
$mod->{ENABLE} = "NO";
printf("Module: %s...not\n",$mod->{NAME});
@@ -151,6 +151,8 @@ sub check($)
{
my $CTX = shift;
+ ($subsystem_output_type = $ENV{SUBSYSTEM_OUTPUT_TYPE}) if (defined($ENV{"SUBSYSTEM_OUTPUT_TYPE"}));
+
foreach my $part (values %{$CTX->{INPUT}}) {
($part->{ENABLE} = "YES") if not defined($part->{ENABLE});
}
diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm
index bfc3aa7bf0..228c1d7e9b 100644
--- a/source4/build/smb_build/makefile.pm
+++ b/source4/build/smb_build/makefile.pm
@@ -425,13 +425,11 @@ sub _prepare_static_library_rule($)
LIBRARY_$ctx->{NAME}_DEPEND_LIST =$tmpdepend
#
LIBRARY_$ctx->{NAME}_STATIC_LINK_LIST =$tmpstlink
-LIBRARY_$ctx->{NAME}_STATIC_LINK_FLAGS =$tmpstflag
#
# Static $ctx->{LIBRARY_NAME}
-bin/$ctx->{LIBRARY_NAME}: \$(LIBRARY_$ctx->{NAME}_DEPEND_LIST) bin/.dummy
+$ctx->{OUTPUT}: \$(LIBRARY_$ctx->{NAME}_DEPEND_LIST) bin/.dummy
\@echo Linking \$\@
\@\$(STLD) \$(STLD_FLAGS) \$\@ \\
- \$(LIBRARY_$ctx->{NAME}_STATIC_LINK_FLAGS) \\
\$(LIBRARY_$ctx->{NAME}_STATIC_LINK_LIST)
library_$ctx->{NAME}: basics $tmprules
diff --git a/source4/build/smb_build/output.pm b/source4/build/smb_build/output.pm
index 7d310670f6..11e994407e 100644
--- a/source4/build/smb_build/output.pm
+++ b/source4/build/smb_build/output.pm
@@ -43,7 +43,7 @@ sub generate_static_library($)
@{$lib->{LINK_LIST}} = ("\$($lib->{TYPE}_$lib->{NAME}\_OBJS)");
@{$lib->{LINK_FLAGS}} = ();
- $lib->{OUTPUT} = $lib->{LIBRARY_NAME};
+ $lib->{OUTPUT} = "bin/$lib->{LIBRARY_NAME}";
}
sub generate_binary($)
@@ -95,7 +95,7 @@ sub create_output($)
push(@{$part->{CFLAGS}}, @{$elem->{CFLAGS}}) if defined(@{$elem->{CFLAGS}});
push(@{$part->{DEPEND_LIST}}, $elem->{OUTPUT}) if defined($elem->{OUTPUT});
push(@{$part->{LINK_LIST}}, $elem->{OUTPUT}) if defined($elem->{OUTPUT});
- push(@{$part->{LINK_LIST}}, @{$elem->{LIBS}}) if defined($elem->{LIBS});
+ push(@{$part->{LINK_FLAGS}}, @{$elem->{LIBS}}) if defined($elem->{LIBS});
push(@{$part->{LINK_FLAGS}},@{$elem->{LDFLAGS}}) if defined($elem->{LDFLAGS});
push(@{$part->{MODULE_INIT_FUNCTIONS}}, @{$elem->{INIT_FUNCTION}}) if