Install hooks puts versions for all bin_PROGRAMS programs.
[idzebra-moved-to-github.git] / index / Makefile.am
1 ## $Id: Makefile.am,v 1.45 2006-06-28 21:45:06 adam Exp $
2
3
4 noinst_PROGRAMS = apitest kdump zebrash
5
6 lib_LTLIBRARIES = libidzebra-api.la
7
8 libidzebra_api_la_LDFLAGS=-version-info $(ZEBRALIBS_VERSION)
9 libidzebra_api_la_SOURCES = \
10   api_swig.c attribute.c \
11   compact.c \
12   dir.c dirs.c \
13   extract.c \
14   index.h invstat.c \
15   kinput.c kcompare.c  kcontrol.c \
16   limit.c \
17   orddict.c orddict.h \
18   rank.h rank1.c ranksimilarity.c rankstatic.c \
19   recindex.c  recindex.h recindxp.h reckeys.c reckeys.h recstat.c retrieve.c \
20   sortidx.c symtab.c \
21   update_path.c update_file.c trunc.c \
22   zebraapi.c zinfo.c zinfo.h zserver.h zsets.c zrpn.c
23
24
25 bin_PROGRAMS = zebraidx zebrasrv
26
27 zebralibs = \
28  libidzebra-api.la \
29  ../rset/libidzebra-rset.la \
30  ../recctrl/libidzebra-recctrl.la \
31  ../dict/libidzebra-dict.la  \
32  ../isams/libidzebra-isams.la \
33  ../isamc/libidzebra-isamc.la \
34  ../isamb/libidzebra-isamb.la \
35  ../data1/libidzebra-data1.la \
36  ../bfile/libidzebra-bfile.la \
37  ../dfa/libidzebra-dfa.la \
38  ../util/libidzebra-util.la
39
40 zebraidx_SOURCES = main.c
41 zebrasrv_SOURCES = zserver.c
42 zebrash_SOURCES = zebrash.c
43 apitest_SOURCES = apitest.c
44 kdump_SOURCES = kdump.c
45
46 AM_CPPFLAGS = -I$(srcdir)/../include $(YAZINC) \
47   -DDEFAULT_PROFILE_PATH=\"$(pkgdatadir)/tab\"
48
49 zebrash_LDADD= $(zebralibs) $(YAZLALIB) $(READLINE_LIBS)
50
51 LDADD = $(zebralibs) $(YAZLALIB)
52
53 install-exec-hook:
54         cd $(DESTDIR)$(bindir); for p in $(bin_PROGRAMS); do \
55                 mv -f $$p $$p$(PACKAGE_SUFFIX); \
56                 ln -sf $$p$(PACKAGE_SUFFIX) $$p; \
57         done
58
59 uninstall-hook:
60         cd $(DESTDIR)$(bindir) && for p in $(bin_PROGRAMS); do \
61                 rm -f $$p$(PACKAGE_SUFFIX); \
62         done
63