Started work on better record management system.
[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.17 1995-11-15 14:46:17 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 #NETLIB=-lnsl -lsocket
12 INCLUDE=-I../include -I$(YAZ)/include
13 TPROG1=index
14 TPROG2=kdump
15 TPROG3=zserver
16 DEFS=$(INCLUDE)
17 O1 = main.o dir.o trav.o extract.o kinput.o kcompare.o \
18  symtab.o text.o recctrl.o structrec.o recindex.o
19 O2 = kdump.o
20 O3 = zserver.o kcompare.o zrpn.o zsets.o text.o recctrl.o structrec.o  \
21         attribute.o recindex.o
22 CPP=$(CC) -E
23
24 all: $(TPROG1) $(TPROG2) $(TPROG3)
25
26 $(TPROG1): $(O1) ../lib/dict.a \
27                 ../lib/isam.a ../lib/bfile.a ../lib/alexutil.a \
28                 $(YAZLIB)
29         $(CC) $(CFLAGS) -o $(TPROG1) $(O1) ../lib/dict.a \
30                 ../lib/isam.a ../lib/bfile.a ../lib/alexutil.a \
31                 $(YAZLIB) $(OSILIB)
32
33 $(TPROG2): $(O2) $(YAZLIB)
34         $(CC) $(CFLAGS) -o $(TPROG2) $(O2) $(YAZLIB)
35
36 $(TPROG3): $(O3) \
37                 ../lib/rset.a ../lib/dict.a ../lib/isam.a ../lib/bfile.a \
38                 ../lib/dfa.a ../lib/alexutil.a \
39                 $(YAZLIB)
40         $(CC) $(CFLAGS) -o $(TPROG3) $(O3) \
41                 ../lib/rset.a ../lib/dict.a ../lib/isam.a ../lib/bfile.a \
42                 ../lib/dfa.a ../lib/alexutil.a \
43                 $(YAZLIB) $(OSILIB) $(NETLIB) -lm
44
45 .c.o:
46         $(CC) -c $(DEFS) $(CFLAGS) $<
47
48 clean:
49         rm -f *.[oa] $(TPROG1) $(TPROG2) $(TPROG3)
50         rm -f core mon.out gmon.out errlist
51
52 depend: depend2
53
54 depend1:
55         sed '/^#Depend/q' <Makefile >Makefile.tmp
56         $(CPP) $(DEFS) -M *.c >>Makefile.tmp
57         mv -f Makefile.tmp Makefile
58
59 depend2:
60         $(CPP) $(DEFS) -M *.c >.depend  
61
62 ifeq (.depend,$(wildcard .depend))
63 include .depend
64 endif
65
66 #Depend --- DOT NOT DELETE THIS LINE