2007-12-08 22:42:33 +00:00
|
|
|
##
|
2009-04-13 08:27:40 +00:00
|
|
|
## Author: Lasse Collin
|
2007-12-08 22:42:33 +00:00
|
|
|
##
|
2009-04-13 08:27:40 +00:00
|
|
|
## This file has been put into the public domain.
|
|
|
|
## You can do whatever you want with this file.
|
2007-12-08 22:42:33 +00:00
|
|
|
##
|
|
|
|
|
2009-06-30 14:09:57 +00:00
|
|
|
SUBDIRS = api
|
|
|
|
|
|
|
|
EXTRA_DIST =
|
|
|
|
CLEANFILES =
|
|
|
|
doc_DATA =
|
2007-12-08 22:42:33 +00:00
|
|
|
|
|
|
|
lib_LTLIBRARIES = liblzma.la
|
2014-06-18 19:04:24 +00:00
|
|
|
liblzma_la_SOURCES =
|
2009-06-30 14:09:57 +00:00
|
|
|
liblzma_la_CPPFLAGS = \
|
|
|
|
-I$(top_srcdir)/src/liblzma/api \
|
|
|
|
-I$(top_srcdir)/src/liblzma/common \
|
|
|
|
-I$(top_srcdir)/src/liblzma/check \
|
|
|
|
-I$(top_srcdir)/src/liblzma/lz \
|
|
|
|
-I$(top_srcdir)/src/liblzma/rangecoder \
|
|
|
|
-I$(top_srcdir)/src/liblzma/lzma \
|
|
|
|
-I$(top_srcdir)/src/liblzma/delta \
|
|
|
|
-I$(top_srcdir)/src/liblzma/simple \
|
2009-11-15 10:40:17 +00:00
|
|
|
-I$(top_srcdir)/src/common \
|
|
|
|
-DTUKLIB_SYMBOL_PREFIX=lzma_
|
2022-08-12 11:30:13 +00:00
|
|
|
liblzma_la_LDFLAGS = -no-undefined -version-info 7:6:2
|
2007-12-08 22:42:33 +00:00
|
|
|
|
2012-07-05 04:28:53 +00:00
|
|
|
EXTRA_DIST += liblzma.map validate_map.sh
|
2011-05-28 12:55:39 +00:00
|
|
|
if COND_SYMVERS
|
|
|
|
liblzma_la_LDFLAGS += \
|
|
|
|
-Wl,--version-script=$(top_srcdir)/src/liblzma/liblzma.map
|
|
|
|
endif
|
|
|
|
|
2014-10-29 19:15:35 +00:00
|
|
|
liblzma_la_SOURCES += ../common/tuklib_physmem.c
|
2014-06-18 19:04:24 +00:00
|
|
|
|
|
|
|
if COND_THREADS
|
2014-10-29 19:15:35 +00:00
|
|
|
liblzma_la_SOURCES += ../common/tuklib_cpucores.c
|
2014-06-18 19:04:24 +00:00
|
|
|
endif
|
|
|
|
|
2009-06-30 14:09:57 +00:00
|
|
|
include $(srcdir)/common/Makefile.inc
|
|
|
|
include $(srcdir)/check/Makefile.inc
|
2007-12-08 22:42:33 +00:00
|
|
|
|
2008-08-28 19:53:15 +00:00
|
|
|
if COND_FILTER_LZ
|
2009-06-30 14:09:57 +00:00
|
|
|
include $(srcdir)/lz/Makefile.inc
|
2008-08-28 19:53:15 +00:00
|
|
|
endif
|
|
|
|
|
2008-09-27 16:09:21 +00:00
|
|
|
if COND_FILTER_LZMA1
|
2009-06-30 14:09:57 +00:00
|
|
|
include $(srcdir)/lzma/Makefile.inc
|
|
|
|
include $(srcdir)/rangecoder/Makefile.inc
|
2007-12-08 22:42:33 +00:00
|
|
|
endif
|
|
|
|
|
2008-08-28 19:53:15 +00:00
|
|
|
if COND_FILTER_DELTA
|
2009-06-30 14:09:57 +00:00
|
|
|
include $(srcdir)/delta/Makefile.inc
|
2008-08-28 19:53:15 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
if COND_FILTER_SIMPLE
|
2009-06-30 14:09:57 +00:00
|
|
|
include $(srcdir)/simple/Makefile.inc
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
## Windows-specific stuff
|
|
|
|
|
|
|
|
# Windows resource compiler support. libtool knows what to do with .rc
|
|
|
|
# files, but Automake (<= 1.11 at least) doesn't know.
|
|
|
|
#
|
|
|
|
# We want the resource file only in shared liblzma. To avoid linking it into
|
|
|
|
# static liblzma, we overwrite the static object file with an object file
|
|
|
|
# compiled from empty input. Note that GNU-specific features are OK here,
|
|
|
|
# because on Windows we are compiled with the GNU toolchain.
|
|
|
|
.rc.lo:
|
|
|
|
$(LIBTOOL) --mode=compile $(RC) $(DEFS) $(DEFAULT_INCLUDES) \
|
|
|
|
$(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(RCFLAGS) \
|
|
|
|
-i $< -o $@
|
|
|
|
echo > empty.c
|
|
|
|
$(COMPILE) -c empty.c -o $(*D)/$(*F).o
|
|
|
|
|
|
|
|
# Remove ordinals from the generated .def file. People must link by name,
|
|
|
|
# not by ordinal, because no one is going to track the ordinal numbers.
|
|
|
|
liblzma.def: liblzma.la liblzma.def.in
|
2009-07-06 07:36:04 +00:00
|
|
|
sed 's/ \+@ *[0-9]\+//' liblzma.def.in > liblzma.def
|
2009-06-30 14:09:57 +00:00
|
|
|
|
|
|
|
# Creating liblzma.def.in is a side effect of linking the library.
|
|
|
|
liblzma.def.in: liblzma.la
|
|
|
|
|
|
|
|
if COND_W32
|
|
|
|
CLEANFILES += liblzma.def liblzma.def.in empty.c
|
|
|
|
liblzma_la_SOURCES += liblzma_w32res.rc
|
|
|
|
liblzma_la_LDFLAGS += -Xlinker --output-def -Xlinker liblzma.def.in
|
|
|
|
|
|
|
|
## liblzma.def.in is created only when building shared liblzma, so don't
|
|
|
|
## try to create liblzma.def when not building shared liblzma.
|
|
|
|
if COND_SHARED
|
|
|
|
doc_DATA += liblzma.def
|
|
|
|
endif
|
2007-12-08 22:42:33 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
## pkg-config
|
|
|
|
pkgconfigdir = $(libdir)/pkgconfig
|
2008-12-30 22:48:23 +00:00
|
|
|
pkgconfig_DATA = liblzma.pc
|
2009-06-30 14:09:57 +00:00
|
|
|
EXTRA_DIST += liblzma.pc.in
|
2013-09-09 17:37:03 +00:00
|
|
|
|
|
|
|
pc_verbose = $(pc_verbose_@AM_V@)
|
|
|
|
pc_verbose_ = $(pc_verbose_@AM_DEFAULT_V@)
|
|
|
|
pc_verbose_0 = @echo " PC " $@;
|
|
|
|
|
|
|
|
liblzma.pc: $(srcdir)/liblzma.pc.in
|
|
|
|
$(AM_V_at)rm -f $@
|
|
|
|
$(pc_verbose)sed \
|
|
|
|
-e 's,@prefix[@],$(prefix),g' \
|
|
|
|
-e 's,@exec_prefix[@],$(exec_prefix),g' \
|
|
|
|
-e 's,@libdir[@],$(libdir),g' \
|
|
|
|
-e 's,@includedir[@],$(includedir),g' \
|
|
|
|
-e 's,@PACKAGE_URL[@],$(PACKAGE_URL),g' \
|
|
|
|
-e 's,@PACKAGE_VERSION[@],$(PACKAGE_VERSION),g' \
|
|
|
|
-e 's,@PTHREAD_CFLAGS[@],$(PTHREAD_CFLAGS),g' \
|
|
|
|
-e 's,@LIBS[@],$(LIBS),g' \
|
2014-09-20 16:42:56 +00:00
|
|
|
< $(srcdir)/liblzma.pc.in > $@ || { rm -f $@; exit 1; }
|
2013-09-09 17:37:03 +00:00
|
|
|
|
|
|
|
clean-local:
|
|
|
|
rm -f liblzma.pc
|