First work on regular expressions/truncations.
[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.10 1995-09-14 11:53:27 adam Exp $
5
6 SHELL=/bin/sh
7 RANLIB=ranlib
8 YAZ=../../yaz
9 YAZLIB=$(YAZ)/lib/libyaz.a
10 OSILIB=../../xtimosi/src/libmosi.a $(YAZ)/lib/librfc.a
11 INCLUDE=-I../include -I$(YAZ)/include
12 TPROG1=index
13 TPROG2=kdump
14 TPROG3=zserver
15 DEFS=$(INCLUDE)
16 O1 = main.o dir.o trav.o extract.o kinput.o kcompare.o ksort.o symtab.o text.o
17 O2 = kdump.o
18 O3 = zserver.o kcompare.o zrpn.o zsets.o text.o
19 CPP=cc -E
20
21 all: $(TPROG1) $(TPROG2) $(TPROG3)
22
23 $(TPROG1): $(O1) ../lib/dict.a \
24                 ../lib/isam.a ../lib/bfile.a ../lib/alexutil.a $(YAZLIB)
25         $(CC) $(CFLAGS) -o $(TPROG1) $(O1) ../lib/dict.a \
26                 ../lib/isam.a ../lib/bfile.a ../lib/alexutil.a $(YAZLIB) $(OSILIB)
27
28 $(TPROG2): $(O2) $(YAZLIB)
29         $(CC) $(CFLAGS) -o $(TPROG2) $(O2) $(YAZLIB)
30
31 $(TPROG3): $(O3) \
32                 ../lib/rset.a ../lib/dict.a ../lib/isam.a ../lib/bfile.a \
33                 ../lib/dfa.a ../lib/alexutil.a $(YAZLIB)
34         $(CC) $(CFLAGS) -o $(TPROG3) $(O3) \
35                 ../lib/rset.a ../lib/dict.a ../lib/isam.a ../lib/bfile.a \
36                 ../lib/dfa.a ../lib/alexutil.a $(YAZLIB) $(OSILIB) -lm
37
38 .c.o:
39         $(CC) -c $(DEFS) $(CFLAGS) $<
40
41 clean:
42         rm -f *.[oa] $(TPROG1) $(TPROG2) $(TPROG3)
43         rm -f core mon.out gmon.out errlist
44
45 depend: depend2
46
47 depend1:
48         sed '/^#Depend/q' <Makefile >Makefile.tmp
49         $(CPP) $(DEFS) -M *.c >>Makefile.tmp
50         mv -f Makefile.tmp Makefile
51
52 depend2:
53         $(CPP) $(DEFS) -M *.c >.depend  
54
55 ifeq (.depend,$(wildcard .depend))
56 include .depend
57 endif
58
59 #Depend --- DOT NOT DELETE THIS LINE