Add librpm-tizen.spec file & Debian packaging.
[tools/librpm-tizen.git] / rpmio / Makefile.am
1 # Makefile for rpm library.
2
3 include $(top_srcdir)/rpm.am
4 AM_CFLAGS = @RPMCFLAGS@
5
6 AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) -I$(top_builddir)/include/
7 AM_CPPFLAGS += @WITH_NSS_INCLUDE@
8 AM_CPPFLAGS += @WITH_BEECRYPT_INCLUDE@
9 AM_CPPFLAGS += @WITH_OPENSSL_INCLUDE@
10 AM_CPPFLAGS += @WITH_POPT_INCLUDE@
11 AM_CPPFLAGS += $(ZSTD_CFLAGS)
12 AM_CPPFLAGS += -I$(top_srcdir)/misc
13 AM_CPPFLAGS += -DRPMCONFIGDIR="\"@RPMCONFIGDIR@\""
14 AM_CPPFLAGS += -DLOCALSTATEDIR="\"$(localstatedir)\""
15
16 usrlibdir = $(libdir)
17 usrlib_LTLIBRARIES = librpmio.la
18 librpmio_la_SOURCES = \
19         argv.c base64.c digest.h digest.c macro.c \
20         rpmhook.c rpmio.c rpmlog.c rpmmalloc.c \
21         rpmpgp.c rpmsq.c rpmsw.c url.c \
22         rpmio_internal.h rpmhook.h \
23         rpmstring.c rpmfileutil.c rpmglob.c \
24         rpmkeyring.c rpmstrpool.c
25
26 if WITH_BEECRYPT
27 librpmio_la_SOURCES += digest_beecrypt.c
28 else
29 if WITH_OPENSSL
30 librpmio_la_SOURCES += digest_openssl.c
31 else
32 librpmio_la_SOURCES += digest_nss.c
33 endif
34 endif
35
36
37 librpmio_la_LDFLAGS = -version-info $(rpm_version_info)
38 librpmio_la_LIBADD = \
39         ../misc/libmisc.la \
40         @WITH_NSS_LIB@ \
41         @WITH_BEECRYPT_LIB@ \
42         @WITH_OPENSSL_LIB@ \
43         @WITH_BZ2_LIB@ \
44         @WITH_ZLIB_LIB@ \
45         @WITH_LIBELF_LIB@ \
46         @WITH_POPT_LIB@ \
47         @WITH_LZMA_LIB@ \
48         $(ZSTD_LIBS) \
49         -lpthread
50
51 if WITH_INTERNAL_BEECRYPT
52 librpmio_la_LIBADD += $(libbeecrypt_la)
53
54 libbeecrypt_la = $(top_builddir)/beecrypt/libbeecrypt_nolibdir.la
55
56 $(top_builddir)/beecrypt/libbeecrypt_nolibdir.la: $(top_builddir)/beecrypt/libbeecrypt.la
57         sed -e 's/libdir=.*/libdir=/' < $(top_builddir)/beecrypt/libbeecrypt.la > $(top_builddir)/beecrypt/libbeecrypt_nolibdir.la
58 endif
59
60 if WITH_LUA
61 AM_CPPFLAGS += -I$(top_srcdir)/luaext/
62 AM_CPPFLAGS += @LUA_CFLAGS@
63 librpmio_la_SOURCES += rpmlua.c rpmlua.h
64 librpmio_la_LIBADD += @LUA_LIBS@
65 librpmio_la_LIBADD += $(top_builddir)/luaext/libluaext.la
66 endif
67
68 check_PROGRAMS =
69