# Copyright (C) 1995, Index Data I/S
# All rights reserved.
# Sebastian Hammer, Adam Dickmeiss
-# $Id: Makefile,v 1.4 1995-09-04 09:10:34 adam Exp $
+# $Id: Makefile,v 1.28 1995-12-06 12:41:20 adam Exp $
SHELL=/bin/sh
-INCLUDE=-I../include -I../../yaz/include
-TPROG1=index
+RANLIB=ranlib
+
+YAZLIB=../../yaz/lib/libyaz.a
+#YAZLIB=-lyaz
+YAZINC=-I../../yaz/include
+OSILIB=../../xtimosi/src/libmosi.a ../../yaz/lib/librfc.a
+#OSILIB=../../xtimosi/src/libmosi.a -lrfc
+#NETLIB=-lnsl -lsocket
+
+INCLUDE=-I../include $(YAZINC)
+TPROG1=zebraidx
TPROG2=kdump
-TPROG3=zserver
+TPROG3=zebrasrv
DEFS=$(INCLUDE)
-O1 = main.o dir.o trav.o extract.o kinput.o kcompare.o ksort.o
+O1 = main.o dir.o dirs.o trav.o extract.o kinput.o kcompare.o \
+ symtab.o text.o recctrl.o structrec.o recindex.o regxread.o recstat.o
O2 = kdump.o
-O3 = zserver.o kcompare.o zrpn.o
-CPP=cc -E
+O3 = zserver.o kcompare.o zrpn.o zsets.o text.o recctrl.o structrec.o \
+ attribute.o recindex.o zlogs.o regxread.o
+CPP=$(CC) -E
all: $(TPROG1) $(TPROG2) $(TPROG3)
-$(TPROG1): $(O1) ../lib/dict.a ../lib/isam.a ../lib/bfile.a ../lib/util.a
- $(CC) $(CFLAGS) -o $(TPROG1) $(O1) ../lib/dict.a ../lib/isam.a ../lib/bfile.a ../lib/util.a
+$(TPROG1): $(O1) ../lib/dict.a ../lib/isam.a \
+ ../lib/bfile.a ../lib/dfa.a ../lib/alexutil.a
+ $(CC) $(CFLAGS) -o $(TPROG1) $(O1) \
+ ../lib/dict.a ../lib/isam.a \
+ ../lib/bfile.a ../lib/dfa.a ../lib/alexutil.a \
+ $(YAZLIB)
-$(TPROG2): $(O2) ../lib/util.a
- $(CC) $(CFLAGS) -o $(TPROG2) $(O2) ../lib/util.a
-
-$(TPROG3): $(O3) ../lib/dict.a ../lib/isam.a ../lib/bfile.a ../lib/rset.a ../lib/util.a
- $(CC) $(CFLAGS) -o $(TPROG3) $(O3) ../lib/rset.a ../lib/dict.a ../lib/isam.a ../lib/bfile.a ../lib/util.a
+$(TPROG2): $(O2)
+ $(CC) $(CFLAGS) -o $(TPROG2) $(O2) $(YAZLIB)
+$(TPROG3): $(O3) \
+ ../lib/rset.a ../lib/dict.a ../lib/isam.a ../lib/bfile.a \
+ ../lib/dfa.a ../lib/alexutil.a
+ $(CC) $(CFLAGS) -o $(TPROG3) $(O3) \
+ ../lib/rset.a ../lib/dict.a ../lib/isam.a ../lib/bfile.a \
+ ../lib/dfa.a ../lib/alexutil.a \
+ $(YAZLIB) $(OSILIB) $(NETLIB) -lm
.c.o:
$(CC) -c $(DEFS) $(CFLAGS) $<
clean:
- rm -f *.[oa] $(TPROG1) $(TPROG2) core mon.out gmon.out errlist
-
-$(O1) $(O2) $(O3): index.h
+ rm -f *.[oa] $(TPROG1) $(TPROG2) $(TPROG3)
+ rm -f core mon.out gmon.out errlist
depend: depend2
depend1:
- mv Makefile Makefile.tmp
- sed '/^#Depend/q' <Makefile.tmp >Makefile
- $(CPP) $(INCLUDE) -M *.c >>Makefile
- -rm Makefile.tmp
+ sed '/^#Depend/q' <Makefile >Makefile.tmp
+ $(CPP) $(DEFS) -M *.c >>Makefile.tmp
+ mv -f Makefile.tmp Makefile
depend2:
- $(CPP) $(INCLUDE) -M *.c >.depend
+ $(CPP) $(DEFS) -M *.c >.depend
ifeq (.depend,$(wildcard .depend))
include .depend