"Fossies" - the Fresh Open Source Software Archive

Member "libcdio-2.1.0/lib/driver/Makefile.am" (13 Apr 2019, 6564 Bytes) of package /linux/privat/libcdio-2.1.0.tar.bz2:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the last Fossies "Diffs" side-by-side code changes report for "Makefile.am": 0.94_vs_1.0.0.

    1 #   Copyright (C) 2003-2010, 2012-2013, 2017
    2 #   Rocky Bernstein <rocky@gnu.org>
    3 #
    4 #   This program is free software: you can redistribute it and/or modify
    5 #   it under the terms of the GNU General Public License as published by
    6 #   the Free Software Foundation, either version 3 of the License, or
    7 #   (at your option) any later version.
    8 #
    9 #   This program is distributed in the hope that it will be useful,
   10 #   but WITHOUT ANY WARRANTY; without even the implied warranty of
   11 #   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   12 #   GNU General Public License for more details.
   13 #
   14 #   You should have received a copy of the GNU General Public License
   15 #   along with this program.  If not, see <http://www.gnu.org/licenses/>.
   16 
   17 ########################################################
   18 # Things to make the libcdio library
   19 ########################################################
   20 #
   21 # From libtool documentation amended with guidance from N. Boullis:
   22 #
   23 #  1. Start with version information of `0:0:0' for each libtool library.
   24 #
   25 #  2. It is probably not a good idea to update the version information
   26 #     several times between public releases, but rather once per public
   27 #     release. (This seems to be more an aesthetic consideration than
   28 #     a hard technical one.)
   29 #
   30 #  3. If the library source code has changed at all since the last
   31 #     update, then increment REVISION (`C:R:A' becomes `C:R+1:A').
   32 #
   33 #  4. If any interfaces have been added, removed, or changed since the
   34 #     last update, increment CURRENT, and set REVISION to 0.
   35 #
   36 #  5. If any interfaces have been added since the last public release,
   37 #     then increment AGE.
   38 #
   39 #  6. If any interfaces have been removed or changed since the last
   40 #     public release, then set AGE to 0. A changed interface means an
   41 #     incompatibility with previous versions.
   42 
   43 libcdio_la_CURRENT = 19
   44 libcdio_la_REVISION = 0
   45 libcdio_la_AGE = 0
   46 
   47 EXTRA_DIST = image/Makefile \
   48 	mmc/Makefile \
   49 	FreeBSD/Makefile MSWindows/Makefile \
   50 	libcdio.sym
   51 
   52 noinst_HEADERS = cdio_assert.h cdio_private.h filemode.h portable.h
   53 
   54 libcdio_sources = \
   55 	_cdio_generic.c \
   56 	_cdio_stdio.c \
   57 	_cdio_stdio.h \
   58 	_cdio_stream.c \
   59 	_cdio_stream.h \
   60 	abs_path.c \
   61 	aix.c \
   62 	audio.c \
   63 	cd_types.c \
   64 	cdio.c \
   65 	cdtext.c \
   66 	cdtext_private.h \
   67 	device.c \
   68 	disc.c \
   69 	ds.c \
   70         FreeBSD/freebsd.c \
   71         FreeBSD/freebsd.h \
   72         FreeBSD/freebsd_cam.c \
   73 	FreeBSD/freebsd_ioctl.c \
   74 	generic.h \
   75 	gnu_linux.c \
   76 	image.h \
   77 	image/bincue.c \
   78 	image/cdrdao.c \
   79 	image_common.c \
   80 	image_common.h \
   81 	image/nrg.c \
   82 	image/nrg.h \
   83 	logging.c \
   84 	memory.c \
   85 	mmc/mmc.c \
   86 	mmc/mmc_cmd_helper.h \
   87 	mmc/mmc_hl_cmds.c \
   88 	mmc/mmc_ll_cmds.c \
   89 	mmc/mmc_private.h \
   90 	mmc/mmc_util.c \
   91 	MSWindows/aspi32.c \
   92 	MSWindows/aspi32.h \
   93 	MSWindows/win32_ioctl.c \
   94 	MSWindows/win32.c \
   95 	MSWindows/win32.h \
   96 	netbsd.c \
   97 	osx.c \
   98 	read.c \
   99         realpath.c \
  100 	sector.c \
  101 	solaris.c \
  102 	track.c \
  103 	utf8.c \
  104 	util.c
  105 
  106 lib_LTLIBRARIES    = libcdio.la
  107 libcdio_la_LIBADD  = $(LTLIBICONV)
  108 
  109 libcdio_la_SOURCES = $(libcdio_sources)
  110 libcdio_la_ldflags = -version-info $(libcdio_la_CURRENT):$(libcdio_la_REVISION):$(libcdio_la_AGE) @LT_NO_UNDEFINED@ $(DARWIN_PKG_LIB_HACK)
  111 
  112 AM_CPPFLAGS = $(LIBCDIO_CFLAGS)
  113 
  114 ########################################################
  115 # Things to version the symbols in the libraries
  116 ########################################################
  117 
  118 # An explanation of the versioning problem from Nicolas Boullis and
  119 # the versioned symbol solution he uses below...
  120 #
  121 # Currently, libvcdinfo uses the cdio_open function from libcdio.
  122 # Let's imagine a program foobar that uses both the vcdinfo_open
  123 # function from libvcdinfo and the cdio_open function from libcdio.
  124 
  125 # Currently, libcdio has SONAME libcdio.so.0, libvcdinfo has SONAME
  126 # libvcdinfo.so.0 and requires libcdio.so.0, and foobar requires both
  127 # libvcdinfo.so.0 and libcdio.so.0. Everything looks fine.
  128 #
  129 # Now, for some reason, you decide to change the cdio_open function.
  130 # That's your right, but you have to bump the CURRENT version and (if I
  131 # understand it correctly, athough this is not that clear in libtool's
  132 # documentation) set the AGE to 0. Anyway, this bumps the SONAME, which is
  133 # sane since the interface changes incompatibly.
  134 
  135 # Now, you have a new libcdio with SONAME libcdio.so.1. But libvcdinfo and
  136 # foobar still require libcdio.so.0. Everything is still fine.
  137 
  138 # Now, after some minor changes, the author of foobar recompiles foobar.
  139 # Then, foobar now requires libvcdinfo.so.0 and libcdio.so.1. And foobar
  140 # now segfaults...
  141 
  142 # What is happening? When you run foobar, if brings both libvcdinfo.so.0
  143 # and libcdio.so.1, but libvcdinfo.so.0 also brings libcdio.so.0. So you
  144 # have both libcdio.so.0 and libcdio.so.1 that bring their symbols to the
  145 # global namespace. Hence, you have to incompatible versions of the
  146 # cdio_open function in the name space. When foobar calls cdio_open, it
  147 # may choose the wrong function, and segfaults...
  148 
  149 # With versioned symbols, the cdio_open function from libcdio.so.0 may be
  150 # known as (something that looks like) cdio_open@@CDIO_0. An the cdio_open
  151 # function from libcdio.so.1 as cdio_open@@CDIO_1. Both versions of
  152 # libcdio would still be brought in by the most recent foobar, but foobar
  153 # (and libvcdinfo) know which versioned function to use and then use the
  154 # good one.
  155 
  156 
  157 # This is some simple versioning where every symbol is versioned with
  158 # something that looks like the SONAME of the library. More complex (and
  159 # better) versioning is possible; it is for example what is used by glibc.
  160 # But good complex versioning is something that requires much more
  161 # work...
  162 
  163 
  164 # The below is a impliments symbol versioning.  First of all, I
  165 # compute MAJOR as CURENT - AGE; that is what is used within libtool
  166 # (at least on GNU/Linux systems) for the number in the SONAME.  The
  167 # nm command gives the list of symbols known in each of the object
  168 # files that will be part of the shared library. And the sed command
  169 # extracts from this list those symbols that will be shared. (This sed
  170 # command comes from libtool.)
  171 
  172 libcdio_la_MAJOR = $(shell expr $(libcdio_la_CURRENT) - $(libcdio_la_AGE))
  173 if BUILD_VERSIONED_LIBS
  174 libcdio_la_LDFLAGS = $(libcdio_la_ldflags) -Wl,--version-script=libcdio.la.ver
  175 libcdio_la_DEPENDENCIES = libcdio.la.ver
  176 
  177 libcdio.la.ver: $(srcdir)/libcdio.sym
  178 	@echo 'CDIO_$(libcdio_la_MAJOR) { ' > $@
  179 	@echo '  global:' >> $@
  180 	@sed 's/^/    /;s/$$/;/' $< >> $@
  181 	@echo '  local:' >> $@
  182 	@echo '    *;' >> $@
  183 	@echo '};' >> $@
  184 else
  185 libcdio_la_LDFLAGS = $(libcdio_la_ldflags)
  186 endif
  187 
  188 MOSTLYCLEANFILES = libcdio.la.ver