summaryrefslogtreecommitdiff
path: root/source4/build/smb_build/output.pm
diff options
context:
space:
mode:
Diffstat (limited to 'source4/build/smb_build/output.pm')
-rw-r--r--source4/build/smb_build/output.pm23
1 files changed, 19 insertions, 4 deletions
diff --git a/source4/build/smb_build/output.pm b/source4/build/smb_build/output.pm
index b863d7e8dc..0b7be94dfc 100644
--- a/source4/build/smb_build/output.pm
+++ b/source4/build/smb_build/output.pm
@@ -10,6 +10,13 @@
package output;
use strict;
+sub generate_mergedobj($)
+{
+ my $subsys = shift;
+
+ $subsys->{OUTPUT} = $subsys->{TARGET} = "bin/$subsys->{TYPE}_$subsys->{NAME}.o";
+}
+
sub generate_objlist($)
{
my $subsys = shift;
@@ -85,15 +92,23 @@ sub create_output($)
next if $part->{NAME} eq "ALL_OBJS";
next if not defined($part->{OUTPUT_TYPE});
+ # Combine object lists
+ push(@{$part->{OBJ_LIST}}, @{$part->{INIT_OBJ_FILES}}) if defined($part->{INIT_OBJ_FILES});
+ push(@{$part->{OBJ_LIST}}, @{$part->{ADD_OBJ_FILES}}) if defined($part->{ADD_OBJ_FILES});
+ push(@{$part->{OBJ_LIST}}, @{$part->{OBJ_FILES}}) if defined($part->{OBJ_FILES});
+
+ if ((not defined($part->{OBJ_LIST}) or
+ scalar(@{$part->{OBJ_LIST}}) == 0) and
+ $part->{OUTPUT_TYPE} eq "MERGEDOBJ") {
+ $part->{OUTPUT_TYPE} = "OBJLIST";
+ }
+
generate_binary($part) if $part->{OUTPUT_TYPE} eq "BINARY";
+ generate_mergedobj($part) if $part->{OUTPUT_TYPE} eq "MERGEDOBJ";
generate_objlist($part) if $part->{OUTPUT_TYPE} eq "OBJLIST";
generate_shared_library($part) if $part->{OUTPUT_TYPE} eq "SHARED_LIBRARY";
generate_static_library($part) if $part->{OUTPUT_TYPE} eq "STATIC_LIBRARY";
- # Combine object lists
- push(@{$part->{OBJ_LIST}}, @{$part->{INIT_OBJ_FILES}}) if defined($part->{INIT_OBJ_FILES});
- push(@{$part->{OBJ_LIST}}, @{$part->{ADD_OBJ_FILES}}) if defined($part->{ADD_OBJ_FILES});
- push(@{$part->{OBJ_LIST}}, @{$part->{OBJ_FILES}}) if defined($part->{OBJ_FILES});
push(@{$depend->{ALL_OBJS}->{OBJ_LIST}}, @{$part->{OBJ_LIST}}) if (defined(@{$part->{OBJ_LIST}}));