Changed character map facility so that admin can specify character
[idzebra-moved-to-github.git] / index / Makefile
1 # Copyright (C) 1995-1996, Index Data I/S 
2 # All rights reserved.
3 # Sebastian Hammer, Adam Dickmeiss
4 # $Id: Makefile,v 1.45 1997-11-18 10:05:08 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 #NETLIB=-lnsl -lsocket
15
16 INCLUDE=-I../include $(YAZINC)
17 TPROG1=zebraidx
18 TPROG2=kdump
19 TPROG3=zebrasrv
20 TPROG4=hlvltest
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
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
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)
39
40 $(TPROG2): $(O2)
41         $(CC) $(CFLAGS) -o $(TPROG2) $(O2) ../lib/zebrautl.a $(YAZLIB)
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) $(NETLIB) -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) $(NETLIB) -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