diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-02-16 17:34:50 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-02-16 17:34:50 +0100 |
commit | c74937009018fe229fa59d65468211f456d999f4 (patch) | |
tree | 2264b25bfeb52f32c08055f597ce5fc802ed5afe /source4/build/smb_build/makefile.pm | |
parent | cf3a45f06e9f143fff724b3c0938f7167e8da87b (diff) | |
download | samba-c74937009018fe229fa59d65468211f456d999f4.tar.gz samba-c74937009018fe229fa59d65468211f456d999f4.tar.bz2 samba-c74937009018fe229fa59d65468211f456d999f4.zip |
Use make list concatenation support to create list of object files for subsystems/libraries.
(This used to be commit 6d3c45889fd20dba5f77466f1e4452a47b442ae4)
Diffstat (limited to 'source4/build/smb_build/makefile.pm')
-rw-r--r-- | source4/build/smb_build/makefile.pm | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm index 986c237e8c..4498d9f019 100644 --- a/source4/build/smb_build/makefile.pm +++ b/source4/build/smb_build/makefile.pm @@ -115,6 +115,7 @@ sub Integrated($$) my ($self,$ctx) = @_; $self->_prepare_list($ctx, "OBJ_LIST"); + $self->output("$ctx->{SUBSYSTEM}_OBJ_LIST += \$($ctx->{NAME}_OBJ_LIST)\n"); } sub SharedModulePrimitives($$) @@ -216,7 +217,6 @@ sub SharedLibraryPrimitives($$) if (not grep(/STATIC_LIBRARY/, @{$ctx->{OUTPUT_TYPE}})) { $self->output("$ctx->{NAME}_OUTPUT = $ctx->{OUTPUT}\n"); $self->_prepare_list($ctx, "OBJ_LIST"); - $self->_prepare_list($ctx, "FULL_OBJ_LIST"); } } @@ -228,7 +228,6 @@ sub SharedLibrary($$) $self->_prepare_list($ctx, "DEPEND_LIST"); $self->_prepare_list($ctx, "LINK_FLAGS"); -# $self->_prepare_list_ex($ctx, "LINK_FLAGS", "-Wl,--whole-archive", "-Wl,--no-whole-archive"); my $soarg = ""; my $lns = ""; @@ -246,11 +245,11 @@ sub SharedLibrary($$) $self->output(<< "__EOD__" # -$ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME}: \$($ctx->{NAME}_DEPEND_LIST) \$($ctx->{NAME}_FULL_OBJ_LIST) +$ctx->{SHAREDDIR}/$ctx->{LIBRARY_REALNAME}: \$($ctx->{NAME}_DEPEND_LIST) \$($ctx->{NAME}_OBJ_LIST) \@echo Linking \$\@ \@mkdir -p $ctx->{SHAREDDIR} \@\$(SHLD) \$(SHLD_FLAGS) \$(INTERN_LDFLAGS) -o \$\@ \$(INSTALL_LINK_FLAGS) \\ - \$($ctx->{NAME}\_FULL_OBJ_LIST) \\ + \$($ctx->{NAME}\_OBJ_LIST) \\ \$($ctx->{NAME}_LINK_FLAGS) \\ $soarg$lns __EOD__ @@ -258,24 +257,24 @@ __EOD__ $self->output("\n"); } -sub StaticLibrary($$) +sub StaticLibraryPrimitives($$) { my ($self,$ctx) = @_; return unless (defined($ctx->{OBJ_FILES})); - $self->output("STATIC_LIBS += $ctx->{TARGET_STATIC_LIBRARY}\n") if ($ctx->{TYPE} eq "LIBRARY"); - - $self->output("$ctx->{NAME}_OUTPUT = $ctx->{OUTPUT}\n"); $self->_prepare_list($ctx, "OBJ_LIST"); - $self->_prepare_list($ctx, "FULL_OBJ_LIST"); +} - $self->output(<< "__EOD__" -# -$ctx->{TARGET_STATIC_LIBRARY}: \$($ctx->{NAME}_FULL_OBJ_LIST) +sub StaticLibrary($$) +{ + my ($self,$ctx) = @_; -__EOD__ -); + return unless (defined($ctx->{OBJ_FILES})); + + $self->output("STATIC_LIBS += $ctx->{TARGET_STATIC_LIBRARY}\n") if ($ctx->{TYPE} eq "LIBRARY"); + $self->output("$ctx->{NAME}_OUTPUT = $ctx->{OUTPUT}\n"); + $self->output("$ctx->{TARGET_STATIC_LIBRARY}: \$($ctx->{NAME}_OBJ_LIST)\n"); } sub Header($$) |