New result set model and modular ranking system. Moved towards
[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.49 1998-03-05 08:45: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 DEFS=$(INCLUDE)
21 O1 = main.o dir.o dirs.o trav.o extract.o kinput.o kcompare.o \
22  symtab.o recindex.o recstat.o lockutil.o lockidx.o \
23  zinfo.o invstat.o sortidx.o
24 O2 = kdump.o
25 O3 = zserver.o kcompare.o zrpn.o zsets.o attribute.o recindex.o \
26  zlogs.o lockutil.o locksrv.o zinfo.o trunc.o sortidx.o rank1.o zebraapi.o \
27  retrieve.o
28 O4 = hlvl.o hlvltest.o kcompare.o
29 CPP=$(CC) -E
30
31 all: $(TPROG1) $(TPROG2) $(TPROG3)
32
33 $(TPROG1): $(O1) ../lib/dict.a ../lib/isam.a ../lib/isamc.a ../lib/recctrl.a \
34                 ../lib/bfile.a ../lib/dfa.a ../lib/zebrautl.a $(YAZLIB)
35         $(CC) $(CFLAGS) -o $(TPROG1) $(O1) \
36                 ../lib/dict.a ../lib/isam.a ../lib/isamc.a ../lib/recctrl.a \
37                 ../lib/bfile.a ../lib/dfa.a ../lib/zebrautl.a \
38                 $(YAZLIB) $(ELIBS)
39
40 $(TPROG2): $(O2)
41         $(CC) $(CFLAGS) -o $(TPROG2) $(O2) ../lib/zebrautl.a \
42                 $(YAZLIB) $(ELIBS)
43
44 $(TPROG3): $(O3) \
45                 ../lib/rset.a ../lib/dict.a ../lib/isam.a ../lib/recctrl.a \
46                 ../lib/isamc.a ../lib/bfile.a ../lib/dfa.a ../lib/zebrautl.a \
47                 $(YAZLIB)
48         $(CC) $(CFLAGS) -o $(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) $(OSILIB) $(ELIBS) -lm
52
53 $(TPROG4): $(O4) \
54                 ../lib/rset.a ../lib/dict.a ../lib/isam.a ../lib/recctrl.a \
55                 ../lib/isamc.a ../lib/bfile.a ../lib/dfa.a ../lib/zebrautl.a \
56                 $(YAZLIB)
57         $(CC) $(CFLAGS) -o $(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) $(OSILIB) $(ELIBS) -lm 
61
62 .c.o:
63         $(CC) -c $(DEFS) $(CFLAGS) $<
64
65 clean:
66         rm -f *.[oa] $(TPROG1) $(TPROG2) $(TPROG3)
67         rm -f core mon.out gmon.out errlist
68
69 depend: depend2
70
71 depend1:
72         sed '/^#Depend/q' <Makefile >Makefile.tmp
73         $(CPP) $(DEFS) -M *.c >>Makefile.tmp
74         mv -f Makefile.tmp Makefile
75
76 depend2:
77         $(CPP) $(DEFS) -M *.c >.depend  
78
79 ifeq (.depend,$(wildcard .depend))
80 include .depend
81 endif
82
83 #Depend --- DOT NOT DELETE THIS LINE