Implemented Sort.
[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.48 1998-02-10 12:03:05 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
27 O4 = hlvl.o hlvltest.o kcompare.o
28 CPP=$(CC) -E
29
30 all: $(TPROG1) $(TPROG3)
31
32 $(TPROG1): $(O1) ../lib/dict.a ../lib/isam.a ../lib/isamc.a ../lib/recctrl.a \
33                 ../lib/bfile.a ../lib/dfa.a ../lib/zebrautl.a $(YAZLIB)
34         $(CC) $(CFLAGS) -o $(TPROG1) $(O1) \
35                 ../lib/dict.a ../lib/isam.a ../lib/isamc.a ../lib/recctrl.a \
36                 ../lib/bfile.a ../lib/dfa.a ../lib/zebrautl.a \
37                 $(YAZLIB) $(ELIBS)
38
39 $(TPROG2): $(O2)
40         $(CC) $(CFLAGS) -o $(TPROG2) $(O2) ../lib/zebrautl.a \
41                 $(YAZLIB) $(ELIBS)
42
43 $(TPROG3): $(O3) \
44                 ../lib/rset.a ../lib/dict.a ../lib/isam.a ../lib/recctrl.a \
45                 ../lib/isamc.a ../lib/bfile.a ../lib/dfa.a ../lib/zebrautl.a \
46                 $(YAZLIB)
47         $(CC) $(CFLAGS) -o $(TPROG3) $(O3) \
48                 ../lib/rset.a ../lib/dict.a ../lib/isam.a ../lib/recctrl.a \
49                 ../lib/isamc.a ../lib/bfile.a ../lib/dfa.a ../lib/zebrautl.a \
50                 $(YAZLIB) $(OSILIB) $(ELIBS) -lm
51
52 $(TPROG4): $(O4) \
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)
56         $(CC) $(CFLAGS) -o $(TPROG4) $(O4) \
57                 ../lib/rset.a ../lib/dict.a ../lib/isam.a ../lib/recctrl.a \
58                 ../lib/isamc.a ../lib/bfile.a ../lib/dfa.a ../lib/zebrautl.a \
59                 $(YAZLIB) $(OSILIB) $(ELIBS) -lm 
60
61 .c.o:
62         $(CC) -c $(DEFS) $(CFLAGS) $<
63
64 clean:
65         rm -f *.[oa] $(TPROG1) $(TPROG2) $(TPROG3)
66         rm -f core mon.out gmon.out errlist
67
68 depend: depend2
69
70 depend1:
71         sed '/^#Depend/q' <Makefile >Makefile.tmp
72         $(CPP) $(DEFS) -M *.c >>Makefile.tmp
73         mv -f Makefile.tmp Makefile
74
75 depend2:
76         $(CPP) $(DEFS) -M *.c >.depend  
77
78 ifeq (.depend,$(wildcard .depend))
79 include .depend
80 endif
81
82 #Depend --- DOT NOT DELETE THIS LINE