summaryrefslogtreecommitdiff
path: root/source4/build
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2006-04-27 21:46:44 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:05:07 -0500
commitb00c2369069c41880598ff430776cc26e8f7b916 (patch)
treefe483e7721681d6f5ffc0271a15366a615e260c9 /source4/build
parentab8fd44603c6ac140e6d0c29fd6a1a1065f616a3 (diff)
downloadsamba-b00c2369069c41880598ff430776cc26e8f7b916.tar.gz
samba-b00c2369069c41880598ff430776cc26e8f7b916.tar.bz2
samba-b00c2369069c41880598ff430776cc26e8f7b916.zip
r15301: Use static libraries internally. This required a few hacks in the build
system - these should be removed later on. (This used to be commit 06547391669e064d2b92f5841b7df5f101a34cb9)
Diffstat (limited to 'source4/build')
-rw-r--r--source4/build/m4/rewrite.m44
-rw-r--r--source4/build/smb_build/config_mk.pm2
-rw-r--r--source4/build/smb_build/header.pm1
-rw-r--r--source4/build/smb_build/input.pm4
-rw-r--r--source4/build/smb_build/main.pl10
-rw-r--r--source4/build/smb_build/makefile.pm36
-rw-r--r--source4/build/smb_build/output.pm23
7 files changed, 7 insertions, 73 deletions
diff --git a/source4/build/m4/rewrite.m4 b/source4/build/m4/rewrite.m4
index 545e933940..2002bae353 100644
--- a/source4/build/m4/rewrite.m4
+++ b/source4/build/m4/rewrite.m4
@@ -99,10 +99,8 @@ AC_CHECK_FUNCS(setgroups sysconf getpwanam srandom random srand rand usleep)
AC_CHECK_FUNCS(backtrace setbuffer)
AC_SUBST(BLDSHARED)
-AC_SUBST(BLDMERGED)
# Assume non-shared by default and override below
BLDSHARED="false"
-BLDMERGED="true"
# these are the defaults, good for lots of systems
HOST_OS="$host_os"
@@ -245,13 +243,11 @@ case "$host_os" in
AC_DEFINE(STAT_ST_BLOCKSIZE,512)
;;
*-vms)
- BLDMERGED="false"
BLDSHARED="false"
LDSHFLAGS=""
;;
*vos*) AC_DEFINE(STAT_ST_BLOCKSIZE,4096)
BLDSHARED="false"
- BLDMERGED="false"
LDSHFLAGS=""
;;
*)
diff --git a/source4/build/smb_build/config_mk.pm b/source4/build/smb_build/config_mk.pm
index 7250735b53..7880745538 100644
--- a/source4/build/smb_build/config_mk.pm
+++ b/source4/build/smb_build/config_mk.pm
@@ -35,6 +35,7 @@ my $section_types = {
"PUBLIC_HEADERS" => "list",
"CFLAGS" => "string",
+ "LDFLAGS" => "list",
"STANDARD_VISIBILITY" => "string"
},
"MODULE" => {
@@ -97,6 +98,7 @@ my $section_types = {
"PRIVATE_PROTO_HEADER" => "string",
"CFLAGS" => "string",
+ "LDFLAGS" => "list",
"STANDARD_VISIBILITY" => "string"
}
};
diff --git a/source4/build/smb_build/header.pm b/source4/build/smb_build/header.pm
index af835e9dae..b2a71969af 100644
--- a/source4/build/smb_build/header.pm
+++ b/source4/build/smb_build/header.pm
@@ -30,6 +30,7 @@ sub _prepare_build_h($)
foreach my $key (values %{$depend}) {
my $DEFINE = ();
next if ($key->{TYPE} ne "LIBRARY" and
+ $key->{TYPE} ne "MODULE" and
$key->{TYPE} ne "SUBSYSTEM" and
$key->{TYPE} ne "BINARY");
next unless defined($key->{INIT_FUNCTIONS});
diff --git a/source4/build/smb_build/input.pm b/source4/build/smb_build/input.pm
index 887677243d..3084381661 100644
--- a/source4/build/smb_build/input.pm
+++ b/source4/build/smb_build/input.pm
@@ -124,7 +124,7 @@ sub import_integrated($$)
next if($mod->{SUBSYSTEM} ne $lib->{NAME});
next if($mod->{ENABLE} ne "YES");
- push (@{$lib->{FULL_OBJ_LIST}}, "\$($mod->{TYPE}_$mod->{NAME}_OBJ_LIST)");
+ push (@{$lib->{FULL_OBJ_LIST}}, "\$($mod->{TYPE}_$mod->{NAME}_FULL_OBJ_LIST)");
push (@{$lib->{LINK_FLAGS}}, "\$($mod->{TYPE}_$mod->{NAME}_LINK_FLAGS)");
push (@{$lib->{PRIVATE_DEPENDENCIES}}, @{$mod->{PUBLIC_DEPENDENCIES}}) if defined($mod->{PUBLIC_DEPENDENCIES});
push (@{$lib->{PRIVATE_DEPENDENCIES}}, @{$mod->{PRIVATE_DEPENDENCIES}}) if defined($mod->{PRIVATE_DEPENDENCIES});
@@ -146,8 +146,6 @@ sub calc_unique_deps($$$$$$)
if (defined ($dep->{OUTPUT_TYPE}) &&
($withlibs or
- ($dep->{OUTPUT_TYPE} eq "OBJ_LIST") or
- ($dep->{OUTPUT_TYPE} eq "MERGEDOBJ") or
($dep->{OUTPUT_TYPE} eq "INTEGRATED") or
($dep->{OUTPUT_TYPE} eq "STATIC_LIBRARY"))) {
push (@$busy, $dep->{NAME});
diff --git a/source4/build/smb_build/main.pl b/source4/build/smb_build/main.pl
index ec4ad0995e..61c9214086 100644
--- a/source4/build/smb_build/main.pl
+++ b/source4/build/smb_build/main.pl
@@ -23,10 +23,8 @@ my $subsystem_output_type;
if (defined($ENV{"SUBSYSTEM_OUTPUT_TYPE"})) {
$subsystem_output_type = $ENV{SUBSYSTEM_OUTPUT_TYPE};
-} elsif ($config::config{BLDMERGED} eq "true") {
- $subsystem_output_type = "MERGEDOBJ";
} else {
- $subsystem_output_type = "OBJ_LIST";
+ $subsystem_output_type = "STATIC_LIBRARY";
}
my $library_output_type;
@@ -34,10 +32,8 @@ if (defined($ENV{"LIBRARY_OUTPUT_TYPE"})) {
$library_output_type = $ENV{LIBRARY_OUTPUT_TYPE};
} elsif ($config::config{BLDSHARED} eq "true") {
$library_output_type = "SHARED_LIBRARY";
-} elsif ($config::config{BLDMERGED} eq "true") {
- $library_output_type = "MERGEDOBJ";
} else {
- $library_output_type = "OBJ_LIST";
+ $library_output_type = "STATIC_LIBRARY";
}
my $module_output_type;
@@ -67,8 +63,6 @@ foreach my $key (values %$OUTPUT) {
foreach my $key (values %$OUTPUT) {
next unless defined $key->{OUTPUT_TYPE};
- $mkenv->MergedObj($key) if $key->{OUTPUT_TYPE} eq "MERGEDOBJ";
- $mkenv->ObjList($key) if $key->{OUTPUT_TYPE} eq "OBJLIST";
$mkenv->StaticLibrary($key) if $key->{OUTPUT_TYPE} eq "STATIC_LIBRARY";
$mkenv->PkgConfig($key) if ($key->{OUTPUT_TYPE} eq "SHARED_LIBRARY") and
defined($key->{VERSION});
diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm
index 83a1f28b0c..3f0f29f208 100644
--- a/source4/build/smb_build/makefile.pm
+++ b/source4/build/smb_build/makefile.pm
@@ -202,6 +202,7 @@ sub Integrated($$)
my ($self,$ctx) = @_;
$self->_prepare_list($ctx, "OBJ_LIST");
+ $self->_prepare_list($ctx, "FULL_OBJ_LIST");
$self->_prepare_list($ctx, "LINK_FLAGS");
}
@@ -316,41 +317,6 @@ __EOD__
);
}
-sub MergedObj($$)
-{
- my ($self,$ctx) = @_;
-
- $self->_prepare_list($ctx, "OBJ_LIST");
- $self->_prepare_list($ctx, "FULL_OBJ_LIST");
- $self->_prepare_list($ctx, "DEPEND_LIST");
-
- return unless $ctx->{TARGET};
-
- push(@{$self->{all_objs}}, "\$($ctx->{TYPE}_$ctx->{NAME}_FULL_OBJ_LIST)");
-
- $self->output("$ctx->{TARGET}: \$($ctx->{TYPE}_$ctx->{NAME}_FULL_OBJ_LIST)\n");
-
- $self->output("\t\@echo \"Pre-Linking $ctx->{TYPE} $ctx->{NAME}\"\n");
- $self->output("\t@\$(LD) -r \$($ctx->{TYPE}_$ctx->{NAME}_FULL_OBJ_LIST) -o $ctx->{TARGET}\n");
- $self->output("\n");
-}
-
-sub ObjList($$)
-{
- my ($self,$ctx) = @_;
-
- return unless $ctx->{TARGET};
-
- push(@{$self->{all_objs}}, "\$($ctx->{TYPE}_$ctx->{NAME}_FULL_OBJ_LIST)");
-
- $self->_prepare_list($ctx, "OBJ_LIST");
- $self->_prepare_list($ctx, "FULL_OBJ_LIST");
- $self->_prepare_list($ctx, "DEPEND_LIST");
- $self->output("$ctx->{TARGET}: ");
- $self->output("\$($ctx->{TYPE}_$ctx->{NAME}_DEPEND_LIST) \$($ctx->{TYPE}_$ctx->{NAME}_FULL_OBJ_LIST)\n");
- $self->output("\t\@touch $ctx->{TARGET}\n");
-}
-
sub StaticLibrary($$)
{
my ($self,$ctx) = @_;
diff --git a/source4/build/smb_build/output.pm b/source4/build/smb_build/output.pm
index ba8359a72b..0f66ef91fe 100644
--- a/source4/build/smb_build/output.pm
+++ b/source4/build/smb_build/output.pm
@@ -26,21 +26,6 @@ sub add_dir($$)
return @ret;
}
-sub generate_mergedobj($)
-{
- my $subsys = shift;
-
- $subsys->{OUTPUT} = $subsys->{TARGET} = "bin/subsystems/$subsys->{TYPE}_$subsys->{NAME}.o";
-}
-
-sub generate_objlist($)
-{
- my $subsys = shift;
-
- $subsys->{TARGET} = "bin/.$subsys->{TYPE}_$subsys->{NAME}";
- $subsys->{OUTPUT} = "\$($subsys->{TYPE}_$subsys->{NAME}_OBJ_LIST)";
-}
-
sub generate_shared_library($)
{
my $lib = shift;
@@ -129,15 +114,7 @@ sub create_output($$)
# Combine object lists
push(@{$part->{OBJ_LIST}}, add_dir($part->{BASEDIR}, $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";