summaryrefslogtreecommitdiff
path: root/source4/build
diff options
context:
space:
mode:
Diffstat (limited to 'source4/build')
-rw-r--r--source4/build/smb_build/main.pl4
-rw-r--r--source4/build/smb_build/makefile.pm24
-rw-r--r--source4/build/smb_build/output.pm18
3 files changed, 22 insertions, 24 deletions
diff --git a/source4/build/smb_build/main.pl b/source4/build/smb_build/main.pl
index ba25035ea5..46a092d69f 100644
--- a/source4/build/smb_build/main.pl
+++ b/source4/build/smb_build/main.pl
@@ -20,8 +20,8 @@ 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 = ["MERGED_OBJ"];
-#$subsys_output_type = ["STATIC_LIBRARY"];
+#$subsys_output_type = ["MERGED_OBJ"];
+$subsys_output_type = ["STATIC_LIBRARY"];
my $library_output_type;
if ($config::config{USESHARED} eq "true") {
diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm
index b84caa12d7..dc9e1e9911 100644
--- a/source4/build/smb_build/makefile.pm
+++ b/source4/build/smb_build/makefile.pm
@@ -230,7 +230,7 @@ sub SharedLibrary($$)
{
my ($self,$ctx) = @_;
- push (@{$self->{shared_libs}}, "$ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME}") if (defined($ctx->{SO_VERSION}));
+ push (@{$self->{shared_libs}}, $ctx->{RESULT_SHARED_LIBRARY}) if (defined($ctx->{SO_VERSION}));
$self->_prepare_list($ctx, "DEPEND_LIST");
$self->_prepare_list($ctx, "LINK_FLAGS");
@@ -252,8 +252,7 @@ sub SharedLibrary($$)
$self->output(<< "__EOD__"
#
-
-$ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME}: \$($ctx->{NAME}_DEPEND_LIST) \$($ctx->{NAME}_FULL_OBJ_LIST)
+$ctx->{RESULT_SHARED_LIBRARY}: \$($ctx->{NAME}_DEPEND_LIST) \$($ctx->{NAME}_FULL_OBJ_LIST)
\@echo Linking \$\@
\@mkdir -p $ctx->{SHAREDDIR}
\@\$(SHLD) \$(SHLD_FLAGS) \$(INTERN_LDFLAGS) -o \$\@ \$(INSTALL_LINK_FLAGS) \\
@@ -275,7 +274,7 @@ sub MergedObj($$)
push(@{$self->{all_objs}}, "\$($ctx->{NAME}_FULL_OBJ_LIST)");
$self->output(<< "__EOD__"
#
-$ctx->{TARGET_MERGED_OBJ}: \$($ctx->{NAME}_FULL_OBJ_LIST)
+$ctx->{RESULT_MERGED_OBJ}: \$($ctx->{NAME}_FULL_OBJ_LIST)
\@echo Partially linking \$@
\@mkdir -p bin/mergedobj
\$(PARTLINK) -o \$@ \$($ctx->{NAME}_FULL_OBJ_LIST)
@@ -290,7 +289,7 @@ sub StaticLibrary($$)
return unless (defined($ctx->{OBJ_FILES}));
- push (@{$self->{static_libs}}, $ctx->{TARGET_STATIC_LIBRARY}) if ($ctx->{TYPE} eq "LIBRARY");
+ push (@{$self->{static_libs}}, $ctx->{RESULT_STATIC_LIBRARY}) if ($ctx->{TYPE} eq "LIBRARY");
$self->output("$ctx->{NAME}_OUTPUT = $ctx->{OUTPUT}\n");
$self->_prepare_list($ctx, "OBJ_LIST");
@@ -300,7 +299,7 @@ sub StaticLibrary($$)
$self->output(<< "__EOD__"
#
-$ctx->{TARGET_STATIC_LIBRARY}: \$($ctx->{NAME}_FULL_OBJ_LIST)
+$ctx->{RESULT_STATIC_LIBRARY}: \$($ctx->{NAME}_FULL_OBJ_LIST)
\@echo Linking \$@
\@rm -f \$@
\@mkdir -p $ctx->{STATICDIR}
@@ -323,23 +322,18 @@ sub Binary($$)
{
my ($self,$ctx) = @_;
- my $installdir;
my $extradir = "";
- my $localdir = "bin$extradir";
-
- $installdir = "bin$extradir";
-
push(@{$self->{all_objs}}, "\$($ctx->{NAME}_FULL_OBJ_LIST)");
unless (defined($ctx->{INSTALLDIR})) {
} elsif ($ctx->{INSTALLDIR} eq "SBINDIR") {
- push (@{$self->{sbin_progs}}, "$installdir/$ctx->{BINARY}");
+ push (@{$self->{sbin_progs}}, $ctx->{RESULT_BINARY});
} elsif ($ctx->{INSTALLDIR} eq "BINDIR") {
- push (@{$self->{bin_progs}}, "$installdir/$ctx->{BINARY}");
+ push (@{$self->{bin_progs}}, $ctx->{RESULT_BINARY});
}
- $self->output("binaries:: $localdir/$ctx->{BINARY}\n");
+ $self->output("binaries:: $ctx->{TARGET_BINARY}\n");
$self->_prepare_list($ctx, "OBJ_LIST");
$self->_prepare_list($ctx, "FULL_OBJ_LIST");
@@ -347,7 +341,7 @@ sub Binary($$)
$self->_prepare_list($ctx, "LINK_FLAGS");
$self->output(<< "__EOD__"
-$installdir/$ctx->{BINARY}: \$($ctx->{NAME}_DEPEND_LIST) \$($ctx->{NAME}_FULL_OBJ_LIST)
+$ctx->{RESULT_BINARY}: \$($ctx->{NAME}_DEPEND_LIST) \$($ctx->{NAME}_FULL_OBJ_LIST)
\@echo Linking \$\@
__EOD__
);
diff --git a/source4/build/smb_build/output.pm b/source4/build/smb_build/output.pm
index 0ddb9e4efb..586ea121cb 100644
--- a/source4/build/smb_build/output.pm
+++ b/source4/build/smb_build/output.pm
@@ -85,8 +85,9 @@ sub generate_shared_library($)
$lib->{LIBRARY_REALNAME} = "$lib->{LIBRARY_REALNAME}.\$($lib->{NAME}_VERSION)";
}
- $lib->{TARGET_SHARED_LIBRARY} = "$lib->{SHAREDDIR}/$lib->{LIBRARY_REALNAME}";
- $lib->{OUTPUT_SHARED_LIBRARY} = $lib->{TARGET_SHARED_LIBRARY};
+ $lib->{RESULT_SHARED_LIBRARY} = "$lib->{SHAREDDIR}/$lib->{LIBRARY_REALNAME}";
+ $lib->{OUTPUT_SHARED_LIBRARY} = "-l$link_name";
+ $lib->{TARGET_SHARED_LIBRARY} = $lib->{RESULT_SHARED_LIBRARY};
}
sub generate_merged_obj($)
@@ -97,7 +98,8 @@ sub generate_merged_obj($)
$link_name =~ s/^LIB//;
$lib->{MERGED_OBJNAME} = lc($link_name).".o";
- $lib->{TARGET_MERGED_OBJ} = $lib->{OUTPUT_MERGED_OBJ} = "bin/mergedobj/$lib->{MERGED_OBJNAME}";
+ $lib->{RESULT_MERGED_OBJ} = $lib->{OUTPUT_MERGED_OBJ} = "bin/mergedobj/$lib->{MERGED_OBJNAME}";
+ $lib->{TARGET_MERGED_OBJ} = $lib->{RESULT_MERGED_OBJ};
}
sub generate_static_library($)
@@ -113,11 +115,12 @@ sub generate_static_library($)
$lib->{LIBRARY_NAME} = "lib".lc($link_name).".a";
if (defined($lib->{OBJ_FILES})) {
- $lib->{TARGET_STATIC_LIBRARY} = "bin/static/$lib->{LIBRARY_NAME}";
+ $lib->{RESULT_STATIC_LIBRARY} = "bin/static/$lib->{LIBRARY_NAME}";
+ $lib->{TARGET_STATIC_LIBRARY} = $lib->{RESULT_STATIC_LIBRARY};
$lib->{STATICDIR} = 'bin/static';
$lib->{OUTPUT_STATIC_LIBRARY} = "-l".lc($link_name);
} else {
- $lib->{TARGET_STATIC_LIBRARY} = "";
+ $lib->{RESULT_STATIC_LIBRARY} = "";
$lib->{OUTPUT_STATIC_LIBRARY} = "";
}
}
@@ -129,8 +132,9 @@ sub generate_binary($)
$bin->{DEPEND_LIST} = [];
push(@{$bin->{LINK_FLAGS}}, "\$($bin->{NAME}\_OBJ_LIST)");
- $bin->{DEBUGDIR} = "bin/";
- $bin->{TARGET_BINARY} = $bin->{OUTPUT_BINARY} = "$bin->{DEBUGDIR}/$bin->{NAME}";
+ $bin->{DEBUGDIR} = "bin";
+ $bin->{RESULT_BINARY} = $bin->{OUTPUT_BINARY} = "$bin->{DEBUGDIR}/$bin->{NAME}";
+ $bin->{TARGET_BINARY} = $bin->{RESULT_BINARY};
$bin->{BINARY} = $bin->{NAME};
}