More work on index add/del/update.
[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.4 1995-09-04 09:10:34 adam Exp $
5
6 SHELL=/bin/sh
7 INCLUDE=-I../include -I../../yaz/include
8 TPROG1=index
9 TPROG2=kdump
10 TPROG3=zserver
11 DEFS=$(INCLUDE)
12 O1 = main.o dir.o trav.o extract.o kinput.o kcompare.o ksort.o
13 O2 = kdump.o
14 O3 = zserver.o kcompare.o zrpn.o
15 CPP=cc -E
16
17 all: $(TPROG1) $(TPROG2) $(TPROG3)
18
19 $(TPROG1): $(O1) ../lib/dict.a ../lib/isam.a ../lib/bfile.a ../lib/util.a
20         $(CC) $(CFLAGS) -o $(TPROG1) $(O1) ../lib/dict.a ../lib/isam.a ../lib/bfile.a ../lib/util.a
21
22 $(TPROG2): $(O2) ../lib/util.a
23         $(CC) $(CFLAGS) -o $(TPROG2) $(O2) ../lib/util.a
24
25 $(TPROG3): $(O3) ../lib/dict.a ../lib/isam.a ../lib/bfile.a ../lib/rset.a ../lib/util.a
26         $(CC) $(CFLAGS) -o $(TPROG3) $(O3) ../lib/rset.a ../lib/dict.a ../lib/isam.a ../lib/bfile.a ../lib/util.a
27
28
29 .c.o:
30         $(CC) -c $(DEFS) $(CFLAGS) $<
31
32 clean:
33         rm -f *.[oa] $(TPROG1) $(TPROG2) core mon.out gmon.out errlist
34
35 $(O1) $(O2) $(O3): index.h
36
37 depend: depend2
38
39 depend1:
40         mv Makefile Makefile.tmp
41         sed '/^#Depend/q' <Makefile.tmp >Makefile
42         $(CPP) $(INCLUDE) -M *.c >>Makefile
43         -rm Makefile.tmp
44
45 depend2:
46         $(CPP) $(INCLUDE) -M *.c >.depend       
47
48 ifeq (.depend,$(wildcard .depend))
49 include .depend
50 endif
51
52 #Depend --- DOT NOT DELETE THIS LINE