Extra parameter decode added to search routines to implement
[idzebra-moved-to-github.git] / index / Makefile
1 # Copyright (C) 1995-1998, Index Data I/S 
2 # All rights reserved.
3 # Sebastian Hammer, Adam Dickmeiss
4 # $Id: Makefile,v 1.50 1998-06-12 12:22:11 adam Exp $
5
6 SHELL=/bin/sh
7 RANLIB=ranlib
8
9 YAZLIB=../../yaz/lib/libyaz.a
10 #YAZLIB=-lyaz
11 YAZINC=-I../../yaz/include
12 #OSILIB=../../xtimosi/src/libmosi.a ../../yaz/lib/librfc.a
13 #OSILIB=../../xtimosi/src/libmosi.a -lrfc
14
15 INCLUDE=-I../include $(YAZINC)
16 TPROG1=zebraidx
17 TPROG2=kdump
18 TPROG3=zebrasrv
19 TPROG4=hlvltest
20 TPROG5=apitest
21 DEFS=$(INCLUDE)
22 O1 = main.o dir.o dirs.o trav.o extract.o kinput.o kcompare.o \
23  symtab.o recindex.o recstat.o lockutil.o lockidx.o \
24  zinfo.o invstat.o sortidx.o
25 O2 = kdump.o
26 O3 = zserver.o kcompare.o zrpn.o zsets.o attribute.o recindex.o \
27  zlogs.o lockutil.o locksrv.o zinfo.o trunc.o sortidx.o rank1.o zebraapi.o \
28  retrieve.o
29 O4 = hlvl.o hlvltest.o kcompare.o
30 O5 = apitest.o kcompare.o zrpn.o zsets.o attribute.o recindex.o \
31  zlogs.o lockutil.o locksrv.o zinfo.o trunc.o sortidx.o rank1.o zebraapi.o \
32  retrieve.o
33 CPP=$(CC) -E
34
35 all: $(TPROG1) $(TPROG2) $(TPROG3)
36
37 $(TPROG1): $(O1) ../lib/dict.a ../lib/isam.a ../lib/isamc.a ../lib/recctrl.a \
38                 ../lib/bfile.a ../lib/dfa.a ../lib/zebrautl.a $(YAZLIB)
39         $(CC) $(CFLAGS) -o $(TPROG1) $(O1) \
40                 ../lib/dict.a ../lib/isam.a ../lib/isamc.a ../lib/recctrl.a \
41                 ../lib/bfile.a ../lib/dfa.a ../lib/zebrautl.a \
42                 $(YAZLIB) $(ELIBS)
43
44 $(TPROG2): $(O2)
45         $(CC) $(CFLAGS) -o $(TPROG2) $(O2) ../lib/zebrautl.a \
46                 $(YAZLIB) $(ELIBS)
47
48 $(TPROG3): $(O3) \
49                 ../lib/rset.a ../lib/dict.a ../lib/isam.a ../lib/recctrl.a \
50                 ../lib/isamc.a ../lib/bfile.a ../lib/dfa.a ../lib/zebrautl.a \
51                 $(YAZLIB)
52         $(CC) $(CFLAGS) -o $(TPROG3) $(O3) \
53                 ../lib/rset.a ../lib/dict.a ../lib/isam.a ../lib/recctrl.a \
54                 ../lib/isamc.a ../lib/bfile.a ../lib/dfa.a ../lib/zebrautl.a \
55                 $(YAZLIB) $(OSILIB) $(ELIBS) -lm
56
57 $(TPROG4): $(O4) \
58                 ../lib/rset.a ../lib/dict.a ../lib/isam.a ../lib/recctrl.a \
59                 ../lib/isamc.a ../lib/bfile.a ../lib/dfa.a ../lib/zebrautl.a \
60                 $(YAZLIB)
61         $(CC) $(CFLAGS) -o $(TPROG4) $(O4) \
62                 ../lib/rset.a ../lib/dict.a ../lib/isam.a ../lib/recctrl.a \
63                 ../lib/isamc.a ../lib/bfile.a ../lib/dfa.a ../lib/zebrautl.a \
64                 $(YAZLIB) $(OSILIB) $(ELIBS) -lm 
65
66 $(TPROG5): $(O5) \
67                 ../lib/rset.a ../lib/dict.a ../lib/isam.a ../lib/recctrl.a \
68                 ../lib/isamc.a ../lib/bfile.a ../lib/dfa.a ../lib/zebrautl.a \
69                 $(YAZLIB)
70         $(CC) $(CFLAGS) -o $(TPROG5) $(O5) \
71                 ../lib/rset.a ../lib/dict.a ../lib/isam.a ../lib/recctrl.a \
72                 ../lib/isamc.a ../lib/bfile.a ../lib/dfa.a ../lib/zebrautl.a \
73                 $(YAZLIB) $(OSILIB) $(ELIBS) -lm
74
75
76 .c.o:
77         $(CC) -c $(DEFS) $(CFLAGS) $<
78
79 clean:
80         rm -f *.[oa] $(TPROG1) $(TPROG2) $(TPROG3)
81         rm -f core mon.out gmon.out errlist
82
83 depend: depend2
84
85 depend1:
86         sed '/^#Depend/q' <Makefile >Makefile.tmp
87         $(CPP) $(DEFS) -M *.c >>Makefile.tmp
88         mv -f Makefile.tmp Makefile
89
90 depend2:
91         $(CPP) $(DEFS) -M *.c >.depend  
92
93 ifeq (.depend,$(wildcard .depend))
94 include .depend
95 endif
96
97 #Depend --- DOT NOT DELETE THIS LINE