diff options
author | Stefan Metzmacher <metze@samba.org> | 2004-05-13 16:15:46 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:53:42 -0500 |
commit | d5ba19d0088f65e308443a32dd39c11d6ba8983d (patch) | |
tree | 9bc4462909f0cfd73d572c801115a357ad859aa2 /source4/build/smb_build/makefile.pl | |
parent | 3f564db67d9ffca599b1885ad2c6379830cd0aaf (diff) | |
download | samba-d5ba19d0088f65e308443a32dd39c11d6ba8983d.tar.gz samba-d5ba19d0088f65e308443a32dd39c11d6ba8983d.tar.bz2 samba-d5ba19d0088f65e308443a32dd39c11d6ba8983d.zip |
r690: - ignore source/tags
- add support for shared libraries
- enable libldb shared lib when --enable-experimental
metze
(This used to be commit dcef69dc54a2575e7f57d67d1983482b4ff57bdb)
Diffstat (limited to 'source4/build/smb_build/makefile.pl')
-rw-r--r-- | source4/build/smb_build/makefile.pl | 47 |
1 files changed, 34 insertions, 13 deletions
diff --git a/source4/build/smb_build/makefile.pl b/source4/build/smb_build/makefile.pl index e3cfc17bd7..6f4c20af69 100644 --- a/source4/build/smb_build/makefile.pl +++ b/source4/build/smb_build/makefile.pl @@ -383,13 +383,18 @@ sub _prepare_library_obj_list($) # # $library_ctx - the library context # -# $library_ctx->{LIBRARY} - the library name -# $library_ctx->{STATIC_LIBRARY} - the static library name -# $library_ctx->{SHARED_LIBRARY} - the shared library name +# $library_ctx->{NAME} - the library name +# # $library_ctx->{DEPEND_LIST} - the list of rules on which this library depends +# +# $library_ctx->{STATIC_LIBRARY_NAME} - the static library name # $library_ctx->{STATIC_LINK_LIST} - the list of objectfiles which sould be linked # to this static library # $library_ctx->{STATIC_LINK_FLAGS} - linker flags used by this static library +# +# $library_ctx->{SHARED_LIBRARY_NAME} - the shared library name +# $library_ctx->{SHARED_LIBRARY_REALNAME} - the shared library real name +# $library_ctx->{SHARED_LIBRARY_SONAME} - the shared library soname # $library_ctx->{SHARED_LINK_LIST} - the list of objectfiles and external libraries # which sould be linked to this shared library # $library_ctx->{SHARED_LINK_FLAGS} - linker flags used by this shared library @@ -403,6 +408,7 @@ sub _prepare_library_rule($) my $tmpstflag; my $tmpshlink; my $tmpshflag; + my $tmprules; my $output; $tmpdepend = array2oneperline($ctx->{DEPEND_LIST}); @@ -413,9 +419,11 @@ sub _prepare_library_rule($) $tmpshlink = array2oneperline($ctx->{SHARED_LINK_LIST}); $tmpshflag = array2oneperline($ctx->{SHARED_LINK_FLAGS}); + $tmprules = "bin/$ctx->{STATIC_LIBRARY_NAME}"; + $output = " ################################### -# Start Library $ctx->{LIBRARY} +# Start Library $ctx->{NAME} # LIBRARY_$ctx->{NAME}_DEPEND_LIST =$tmpdepend # @@ -425,24 +433,37 @@ LIBRARY_$ctx->{NAME}_STATIC_LINK_FLAGS =$tmpstflag LIBRARY_$ctx->{NAME}_SHARED_LINK_LIST =$tmpshlink LIBRARY_$ctx->{NAME}_SHARED_LINK_FLAGS =$tmpshflag # -# Static $ctx->{STATIC_LIBRARY} -bin/$ctx->{STATIC_LIBRARY}: \$(LIBRARY_$ctx->{NAME}_DEPEND_LIST) bin/.dummy +# Static $ctx->{STATIC_LIBRARY_NAME} +bin/$ctx->{STATIC_LIBRARY_NAME}: \$(LIBRARY_$ctx->{NAME}_DEPEND_LIST) bin/.dummy \@echo Linking \$\@ \@\$(STLD) \$(STLD_FLAGS) \$\@ \\ \$(LIBRARY_$ctx->{NAME}_STATIC_LINK_FLAGS) \\ - \$(LIBRARY_$ctx->{NAME}_STATIC_LINK_LIST)"; + \$(LIBRARY_$ctx->{NAME}_STATIC_LINK_LIST) +"; - if (defined($ctx->{SHARED_LIBRARY})) { + if (defined($ctx->{SHARED_LIBRARY_NAME})) { $output .= " -# Shared $ctx->{SHARED_LIBRARY} -bin/$ctx->{SHARED_LIBRARY}: \$(LIBRARY_$ctx->{NAME}_DEPEND_LIST) bin/.dummy +# Shared $ctx->{SHARED_LIBRARY_REALNAME} +bin/$ctx->{SHARED_LIBRARY_REALNAME}: \$(LIBRARY_$ctx->{NAME}_DEPEND_LIST) bin/.dummy \@echo Linking \$\@ \@\$(SHLD) \$(SHLD_FLAGS) -o \$\@ \\ \$(LIBRARY_$ctx->{NAME}_SHARED_LINK_FLAGS) \\ - \$(LIBRARY_$ctx->{NAME}_SHARED_LINK_LIST)"; + \$(LIBRARY_$ctx->{NAME}_SHARED_LINK_LIST) +# Symlink $ctx->{SHARED_LIBRARY_SONAME} +bin/$ctx->{SHARED_LIBRARY_SONAME}: bin/$ctx->{SHARED_LIBRARY_REALNAME} bin/.dummy + \@echo Symlink \$\@ + \@ln -sf $ctx->{SHARED_LIBRARY_REALNAME} \$\@ +# Symlink $ctx->{SHARED_LIBRARY_NAME} +bin/$ctx->{SHARED_LIBRARY_NAME}: bin/$ctx->{SHARED_LIBRARY_SONAME} bin/.dummy + \@echo Symlink \$\@ + \@ln -sf $ctx->{SHARED_LIBRARY_SONAME} \$\@ +"; + $tmprules .= " bin/$ctx->{SHARED_LIBRARY_NAME}" } -$output .= " -# End Library $ctx->{LIBRARY} + + $output .= " +$ctx->{NAME}: $tmprules +# End Library $ctx->{NAME} ################################### "; |