summaryrefslogtreecommitdiff
path: root/source4/build/smb_build/main.pl
diff options
context:
space:
mode:
Diffstat (limited to 'source4/build/smb_build/main.pl')
-rw-r--r--source4/build/smb_build/main.pl35
1 files changed, 20 insertions, 15 deletions
diff --git a/source4/build/smb_build/main.pl b/source4/build/smb_build/main.pl
index fb769103d0..3ed0327d6d 100644
--- a/source4/build/smb_build/main.pl
+++ b/source4/build/smb_build/main.pl
@@ -19,8 +19,7 @@ use strict;
my $INPUT = {};
my $mkfile = smb_build::config_mk::run_config_mk($INPUT, $config::config{srcdir}, $config::config{builddir}, "main.mk");
-my $subsys_output_type;
-$subsys_output_type = ["STATIC_LIBRARY"];
+my $subsys_output_type = ["MERGED_OBJ"];
my $library_output_type;
if ($config::config{USESHARED} eq "true") {
@@ -35,7 +34,7 @@ my $module_output_type;
if ($config::config{USESHARED} eq "true") {
$module_output_type = ["SHARED_LIBRARY"];
} else {
- $module_output_type = ["INTEGRATED"];
+ $module_output_type = ["MERGED_OBJ"];
}
my $DEPEND = smb_build::input::check($INPUT, \%config::enabled,
@@ -43,36 +42,31 @@ my $DEPEND = smb_build::input::check($INPUT, \%config::enabled,
$library_output_type,
$module_output_type);
my $OUTPUT = output::create_output($DEPEND, \%config::config);
-$config::config{SUBSYSTEM_OUTPUT_TYPE} = $subsys_output_type;
-$config::config{LIBRARY_OUTPUT_TYPE} = $library_output_type;
-$config::config{MODULE_OUTPUT_TYPE} = $module_output_type;
my $mkenv = new smb_build::makefile(\%config::config, $mkfile);
+my $shared_libs_used = 0;
foreach my $key (values %$OUTPUT) {
- next unless defined $key->{OUTPUT_TYPE};
-
- $mkenv->Integrated($key) if grep(/INTEGRATED/, @{$key->{OUTPUT_TYPE}});
+ $mkenv->_prepare_list($key, "OBJ_LIST");
+ push(@{$mkenv->{all_objs}}, "\$($key->{NAME}_OBJ_LIST)");
}
-my $shared_libs_used = 0;
-
foreach my $key (values %$OUTPUT) {
next unless defined $key->{OUTPUT_TYPE};
+ $mkenv->MergedObj($key) if grep(/MERGED_OBJ/, @{$key->{OUTPUT_TYPE}});
$mkenv->StaticLibrary($key) if grep(/STATIC_LIBRARY/, @{$key->{OUTPUT_TYPE}});
if (defined($key->{PC_FILE})) {
push(@{$mkenv->{pc_files}}, "$key->{BASEDIR}/$key->{PC_FILE}");
}
- $mkenv->SharedLibrary($key) if ($key->{TYPE} eq "LIBRARY") and
+ $mkenv->SharedLibraryPrimitives($key) if ($key->{TYPE} eq "LIBRARY") and
grep(/SHARED_LIBRARY/, @{$key->{OUTPUT_TYPE}});
if ($key->{TYPE} eq "LIBRARY" and
${$key->{OUTPUT_TYPE}}[0] eq "SHARED_LIBRARY") {
$shared_libs_used = 1;
}
- $mkenv->SharedModule($key) if ($key->{TYPE} eq "MODULE" or
+ $mkenv->SharedModulePrimitives($key) if ($key->{TYPE} eq "MODULE" or
$key->{TYPE} eq "PYTHON") and
grep(/SHARED_LIBRARY/, @{$key->{OUTPUT_TYPE}});
- $mkenv->Binary($key) if grep(/BINARY/, @{$key->{OUTPUT_TYPE}});
$mkenv->PythonFiles($key) if defined($key->{PYTHON_FILES});
$mkenv->Manpage($key) if defined($key->{MANPAGE});
$mkenv->Header($key) if defined($key->{PUBLIC_HEADERS});
@@ -80,7 +74,18 @@ foreach my $key (values %$OUTPUT) {
defined($key->{PUBLIC_PROTO_HEADER});
}
-$mkenv->write("Makefile");
+foreach my $key (values %$OUTPUT) {
+ next unless defined $key->{OUTPUT_TYPE};
+
+ $mkenv->SharedLibrary($key) if ($key->{TYPE} eq "LIBRARY") and
+ grep(/SHARED_LIBRARY/, @{$key->{OUTPUT_TYPE}});
+ $mkenv->SharedModule($key) if ($key->{TYPE} eq "MODULE" or
+ $key->{TYPE} eq "PYTHON") and
+ grep(/SHARED_LIBRARY/, @{$key->{OUTPUT_TYPE}});
+ $mkenv->Binary($key) if grep(/BINARY/, @{$key->{OUTPUT_TYPE}});
+}
+
+$mkenv->write("data.mk");
header::create_smb_build_h($OUTPUT, "include/build.h");
cflags::create_cflags($OUTPUT, $config::config{srcdir},