summaryrefslogtreecommitdiff
path: root/rpmio/Makefile.am
blob: b1ddd5bec03030365f658053f9d90b645f48b04b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# Makefile for rpm library.

AUTOMAKE_OPTIONS = 1.4 foreign

LINT = splint

EXTRA_DIST = tdigest.c tdir.c tficl.c tfts.c tglob.c tinv.c tkey.c trpmio.c

EXTRA_PROGRAMS = tdigest tdir tfts tglob tinv tkey tring trpmio tsw dumpasn1

INCLUDES = -I. \
	-I$(top_srcdir) \
	@WITH_BEECRYPT_INCLUDE@ \
	-I$(top_srcdir)/popt \
	@INCPATH@

pkgincdir = $(pkgincludedir)
pkginc_HEADERS = \
	argv.h fts.h \
	rpmio.h rpmurl.h rpmmacro.h rpmlog.h rpmmessages.h rpmerr.h rpmpgp.h \
	rpmsq.h rpmsw.h ugid.h
noinst_HEADERS = rpmio_internal.h

BEECRYPTLOBJS = $(shell test X"@WITH_BEECRYPT_SUBDIR@" != X && cat $(top_builddir)/@WITH_BEECTYPT_SUBDIR@/listobjs)

LDFLAGS = -L$(RPM_BUILD_ROOT)$(usrlibdir) -L$(DESTDIR)$(usrlibdir)

usrlibdir = $(libdir)@MARK64@
usrlib_LTLIBRARIES = librpmio.la
librpmio_la_SOURCES = \
	argv.c digest.c fts.c macro.c \
	rpmio.c rpmlog.c rpmmalloc.c \
	rpmpgp.c rpmrpc.c rpmsq.c rpmsw.c strcasecmp.c stubs.c url.c ugid.c
librpmio_la_LDFLAGS = -release 4.3 $(LDFLAGS) \
	@WITH_BEECRYPT_LIB@ \
	$(top_builddir)/file/src/libfmagic.la \
	@WITH_ZLIB_LIB@ \
	-lrt -lpthread
librpmio_la_LIBADD = # $(BEECRYPTLOBJS)
librpmio_la_DEPENDENCIES = # .created

.created:
	if test X"@WITH_BEECRYPT_SUBDIR@" != X; then \
	${MAKE} -C $(top_builddir)/@WITH_BEECRYPT_SUBDIR@ listobjs ; \
	for lo in $(BEECRYPTLOBJS); do \
	  [ -f $$lo ] || $(LN_S) $(top_builddir)/@WITH_BEECRYPT_SUBDIR@/$$lo $$lo ; \
	done \
	fi
	touch $@

clean-local:
	rm -f $(BEECRYPTLOBJS) *.o .created

#BUILT_SOURCES = rpmio.lcd

rpmio.lcd: Makefile.am ${librpmio_la_SOURCES} ${pkginc_HEADERS} ${noinst_HEADERS}
	-lclint -load ../beecrypt/beecrypt.lcd $(DEFS) $(INCLUDES) $(librpmio_la_SOURCES) -dump $@ 2>/dev/null

.PHONY:	sources
sources:
	@echo $(librpmio_la_SOURCES:%=rpmio/%)

.PHONY:	lint
lint:
	$(LINT) $(DEFS) $(INCLUDES) $(librpmio_la_SOURCES)

tdigest_SOURCES = tdigest.c
tdigest_LDADD = librpmio.la $(top_builddir)/popt/libpopt.la -lgcrypt

tdir_SOURCES = tdir.c
tdir_LDFLAGS = -all-static
tdir_LDADD = librpmio.la $(top_builddir)/popt/libpopt.la

tfts_SOURCES = tfts.c
tfts_LDFLAGS = -all-static
tfts_LDADD = librpmio.la $(top_builddir)/popt/libpopt.la

tglob_SOURCES = tglob.c
tglob_LDFLAGS = -all-static
tglob_LDADD = librpmio.la $(top_builddir)/popt/libpopt.la

tinv_SOURCES = tinv.c
tinv_LDFLAGS = -all-static
tinv_LDADD = librpmio.la $(top_builddir)/popt/libpopt.la

tkey_SOURCES = tkey.c
tkey_LDFLAGS = -all-static
tkey_LDADD = librpmio.la $(top_builddir)/popt/libpopt.la

tring_SOURCES = tring.c
tring_LDFLAGS = -all-static
tring_LDADD = librpmio.la $(top_builddir)/popt/libpopt.la

trpmio_SOURCES = trpmio.c
trpmio_LDADD = librpmio.la $(top_builddir)/popt/libpopt.la

tsw_SOURCES = tsw.c
tsw_LDFLAGS = librpmio.la

dumpasn1_SOURCES = dumpasn1.c

tficl.o: tficl.c
	$(COMPILE) -I/usr/include/ficl -o $@ -c tficl.c 

tficl: tficl.o
	$(LINK) -o $@ tficl.o -lficl -lm