]> icculus.org git repositories - icculus/xz.git/blob - src/liblzma/Makefile.am
Build system fixes
[icculus/xz.git] / src / liblzma / Makefile.am
1 ##
2 ## Author: Lasse Collin
3 ##
4 ## This file has been put into the public domain.
5 ## You can do whatever you want with this file.
6 ##
7
8 SUBDIRS = api
9
10 EXTRA_DIST =
11 CLEANFILES =
12 doc_DATA =
13
14 lib_LTLIBRARIES = liblzma.la
15 liblzma_la_SOURCES =
16 liblzma_la_CPPFLAGS = \
17         -I$(top_srcdir)/src/liblzma/api \
18         -I$(top_srcdir)/src/liblzma/common \
19         -I$(top_srcdir)/src/liblzma/check \
20         -I$(top_srcdir)/src/liblzma/lz \
21         -I$(top_srcdir)/src/liblzma/rangecoder \
22         -I$(top_srcdir)/src/liblzma/lzma \
23         -I$(top_srcdir)/src/liblzma/subblock \
24         -I$(top_srcdir)/src/liblzma/delta \
25         -I$(top_srcdir)/src/liblzma/simple \
26         -I$(top_srcdir)/src/common
27 liblzma_la_LDFLAGS = -no-undefined -version-info 0:0:0
28
29 include $(srcdir)/common/Makefile.inc
30 include $(srcdir)/check/Makefile.inc
31
32 if COND_FILTER_LZ
33 include $(srcdir)/lz/Makefile.inc
34 endif
35
36 if COND_FILTER_LZMA1
37 include $(srcdir)/lzma/Makefile.inc
38 include $(srcdir)/rangecoder/Makefile.inc
39 endif
40
41 if COND_FILTER_SUBBLOCK
42 include $(srcdir)/subblock/Makefile.inc
43 endif
44
45 if COND_FILTER_DELTA
46 include $(srcdir)/delta/Makefile.inc
47 endif
48
49 if COND_FILTER_SIMPLE
50 include $(srcdir)/simple/Makefile.inc
51 endif
52
53
54 ## Windows-specific stuff
55
56 # Windows resource compiler support. libtool knows what to do with .rc
57 # files, but Automake (<= 1.11 at least) doesn't know.
58 #
59 # We want the resource file only in shared liblzma. To avoid linking it into
60 # static liblzma, we overwrite the static object file with an object file
61 # compiled from empty input. Note that GNU-specific features are OK here,
62 # because on Windows we are compiled with the GNU toolchain.
63 .rc.lo:
64         $(LIBTOOL) --mode=compile $(RC) $(DEFS) $(DEFAULT_INCLUDES) \
65                 $(INCLUDES) $(liblzma_la_CPPFLAGS) $(CPPFLAGS) $(RCFLAGS) \
66                 -i $< -o $@
67         echo > empty.c
68         $(COMPILE) -c empty.c -o $(*D)/$(*F).o
69
70 # Remove ordinals from the generated .def file. People must link by name,
71 # not by ordinal, because no one is going to track the ordinal numbers.
72 liblzma.def: liblzma.la liblzma.def.in
73         $(SED) 's/ \+@ *[0-9]\+//' liblzma.def.in > liblzma.def
74
75 # Creating liblzma.def.in is a side effect of linking the library.
76 liblzma.def.in: liblzma.la
77
78 if COND_W32
79 CLEANFILES += liblzma.def liblzma.def.in empty.c
80 liblzma_la_SOURCES += liblzma_w32res.rc
81 liblzma_la_LDFLAGS += -Xlinker --output-def -Xlinker liblzma.def.in
82
83 ## liblzma.def.in is created only when building shared liblzma, so don't
84 ## try to create liblzma.def when not building shared liblzma.
85 if COND_SHARED
86 doc_DATA += liblzma.def
87 endif
88 endif
89
90
91 ## pkg-config
92 pkgconfigdir = $(libdir)/pkgconfig
93 pkgconfig_DATA = liblzma.pc
94 EXTRA_DIST += liblzma.pc.in