mirror of
https://git.openafs.org/openafs.git
synced 2025-01-18 06:50:12 +00:00
69f26ece3c
Add support for using libtool to the Unix build system to build both pthreaded and lwp libraries. For purely pthread libraries, this just provides convenience macros to invoke the standard GNU libtool from the OpenAFS build system. For libraries that have lwp variants, we provide an initial wrapper script - lwptool, which handles building a non-PIC LWP object before asking libtool to build the pthread variants. For a given source example.c, example.o is the non-PIC pthread object, .libs/example.o is the PIC pthread object, and .lwp/example.o is the LWP object. To use libtool for a particular library directory, add the line include @TOP_OBJDIR@/src/config/Makefile.libtool to the file's preamble. Makefile.pthread, or Makefile.lwp should be included as normal to indicate whether the libraries in this Makefile are pthread only, or should be built for both pthread and LWP objects. The variables LT_current, LT_revision and LT_age may be used to control the version of the shared objects produced. They have the same meaning as that documented in the Versioning section of the libtool manual. The LT_objs variable should be set to a space separated list of the .lo objects included in the library. Note that there should _never_ be a dependency on the .o form of these objects in the Makefile, as this breaks parallel builds. LT_deps is a list of the libtool dependencies of the library, and LT_libs is a list of the external (non-OpenAFS) library dependencies. A file called <libraryname>.sym should be created which contains a newline seperated list of all of the symbols exported from this library. LWP library names remain the same as always. To distinguish the pthreaded static and shared libraries these LWP libraries should be linked using libexample.a: $(LT_objs) $(LTLWP_LDLIB) $(LT_objs) Shared libraries should be linked using libexample.la: $(LT_objs) $(LT_deps) (note that the pattern rules in the included Makefile take care of the build rule here) If necessary, static convenience libraries can be produced using: libconvenience.a: $(LT_objs) $(LTLWP_LDLIB_static) $(LT_objs) PIC convenience libaries can be linked using: libconvenience_pic.a: $(LT_objs) $(LTLWP_LDLIB_pic) $(LT_objs) Libtool libraries should be installed using the $(LT_INSTALL_DATA) macro Binaries linking agains libtool libraries should be linked using the $(LT_LDRULE) or $(LT_LRDULE_static) options, with library paths in the built locations relative to the top of the tree. For example example_test: example_test.o $(top_builddir)/src/example/libexample.la $(LT_LDRULE) example_test.o \ $(top_builddir)/src/example/libexample.la Change-Id: I32b162e8443119e8115febc532c5b5a0ec8fed32 Reviewed-on: http://gerrit.openafs.org/8033 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Derrick Brashear <shadow@dementix.org>
97 lines
1.3 KiB
Plaintext
97 lines
1.3 KiB
Plaintext
#
|
|
# This is the root .gitignore for OpenAFS.
|
|
#
|
|
# Please don't add files that are generated in specific subdirectories
|
|
# here. This file should only contain rules for the entire tree,
|
|
# and entries specific to the top level directory.
|
|
#
|
|
# After changing this file, please run
|
|
# git ls-files -i --exclude-standard
|
|
# to check that you haven't inadvertently ignored any tracked files.
|
|
|
|
# General rules
|
|
|
|
.*
|
|
*.orig
|
|
*.rej
|
|
*.o
|
|
*.lo
|
|
*.a
|
|
*.la
|
|
*.so
|
|
*.sl
|
|
*.so.*
|
|
*.dylib.*
|
|
*.dSYM
|
|
*.xdr.c
|
|
*.cs.c
|
|
*.ss.c
|
|
*~
|
|
lex.yy.c
|
|
y.tab.c
|
|
y.tab.h
|
|
Makefile
|
|
RX_component_version_number.c
|
|
AFS_component_version_number.c
|
|
AFS_component_version_number.h
|
|
vc*.pdb
|
|
rs_state.ini
|
|
config.log
|
|
|
|
!.gitignore
|
|
!.cvsignore
|
|
!.splintrc
|
|
|
|
# Top level files
|
|
/aclocal.m4
|
|
/config.cache
|
|
/config.status
|
|
/configure
|
|
/configure-libafs
|
|
/cscope.out
|
|
/include
|
|
/lib
|
|
/libtool
|
|
/autom4te.cache
|
|
/ID
|
|
/TAGS
|
|
/NTLang.bat
|
|
/golast.bat
|
|
/.version
|
|
|
|
# Destination build directories
|
|
/alpha_nbsd*
|
|
/alpha_dux*
|
|
/amd64_linux*
|
|
/amd64_fsbd*
|
|
/amd64_nbsd*
|
|
/dest
|
|
/hp_ux*
|
|
/i386_dfbsd*
|
|
/i386_fbsd*
|
|
/i386_nbsd*
|
|
/i386_obsd*
|
|
/i386_linux*
|
|
/i386_umlinux*
|
|
/ia64_hpux*
|
|
/ia64_linux*
|
|
/obj
|
|
/packages
|
|
/parisc_linux*
|
|
/ppc_darwin*
|
|
/ppc_nbsd*
|
|
/ppc64_linux*
|
|
/rs_aix*
|
|
/s390_linux*
|
|
/s390x_linux*
|
|
/sgi_65
|
|
/sparc64_obsd*
|
|
/sparc64_linux*
|
|
/sun4_*
|
|
/sun4x_*
|
|
/sunx86_*
|
|
/x86_darwin*
|
|
|
|
# Result of make libafs_tree
|
|
/libafs_tree
|