More work on search engine.
[idzebra-moved-to-github.git] / index / Makefile
1 # Copyright (C) 1995, Index Data I/S 
2 # All rights reserved.
3 # Sebastian Hammer, Adam Dickmeiss
4 # $Id: Makefile,v 1.6 1995-09-05 15:28:39 adam Exp $
5
6 SHELL=/bin/sh
7 RANLIB=ranlib
8 YAZ=../../yaz
9 YAZLIB=$(YAZ)/lib/libyaz.a
10 INCLUDE=-I../include -I$(YAZ)/include
11 TPROG1=index
12 TPROG2=kdump
13 TPROG3=zserver
14 DEFS=$(INCLUDE)
15 O1 = main.o dir.o trav.o extract.o kinput.o kcompare.o ksort.o
16 O2 = kdump.o
17 O3 = zserver.o kcompare.o zrpn.o zsets.o
18 CPP=cc -E
19
20 all: $(TPROG1) $(TPROG2) $(TPROG3)
21
22 $(TPROG1): $(O1) ../lib/dict.a \
23                 ../lib/isam.a ../lib/bfile.a ../lib/alexutil.a $(YAZLIB)
24         $(CC) $(CFLAGS) -o $(TPROG1) $(O1) ../lib/dict.a \
25                 ../lib/isam.a ../lib/bfile.a ../lib/alexutil.a $(YAZLIB)
26
27 $(TPROG2): $(O2) $(YAZLIB)
28         $(CC) $(CFLAGS) -o $(TPROG2) $(O2) $(YAZLIB)
29
30 $(TPROG3): $(O3) ../lib/rset.a \
31                 ../lib/dict.a ../lib/isam.a ../lib/bfile.a \
32                 ../lib/dfa.a ../lib/alexutil.a $(YAZLIB)
33         $(CC) $(CFLAGS) -o $(TPROG3) $(O3) ../lib/rset.a \
34                 ../lib/dict.a ../lib/isam.a ../lib/bfile.a \
35                 ../lib/dfa.a ../lib/alexutil.a $(YAZLIB)
36
37 .c.o:
38         $(CC) -c $(DEFS) $(CFLAGS) $<
39
40 clean:
41         rm -f *.[oa] $(TPROG1) $(TPROG2) $(TPROG3)
42         rm -f core mon.out gmon.out errlist
43
44 depend: depend2
45
46 depend1:
47         sed '/^#Depend/q' <Makefile >Makefile.tmp
48         $(CPP) $(DEFS) -M *.c >>Makefile.tmp
49         mv -f Makefile.tmp Makefile
50
51 depend2:
52         $(CPP) $(DEFS) -M *.c >.depend  
53
54 ifeq (.depend,$(wildcard .depend))
55 include .depend
56 endif
57
58 #Depend --- DOT NOT DELETE THIS LINE