New result set model and modular ranking system. Moved towards
[idzebra-moved-to-github.git] / index / Makefile
index 80a0ff1..fb699a0 100644 (file)
@@ -1,38 +1,80 @@
-# Copyright (C) 1994, Index Data I/S 
+# Copyright (C) 1995-1998, Index Data I/S 
 # All rights reserved.
 # Sebastian Hammer, Adam Dickmeiss
-# $Id: Makefile,v 1.1 1995-08-31 14:50:24 adam Exp $
+# $Id: Makefile,v 1.49 1998-03-05 08:45:11 adam Exp $
 
 SHELL=/bin/sh
-INCLUDE=-I../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
+
+INCLUDE=-I../include $(YAZINC)
+TPROG1=zebraidx
+TPROG2=kdump
+TPROG3=zebrasrv
+TPROG4=hlvltest
 DEFS=$(INCLUDE)
-O = main.o
-CPP=cc -E
+O1 = main.o dir.o dirs.o trav.o extract.o kinput.o kcompare.o \
+ symtab.o recindex.o recstat.o lockutil.o lockidx.o \
+ zinfo.o invstat.o sortidx.o
+O2 = kdump.o
+O3 = zserver.o kcompare.o zrpn.o zsets.o attribute.o recindex.o \
+ zlogs.o lockutil.o locksrv.o zinfo.o trunc.o sortidx.o rank1.o zebraapi.o \
+ retrieve.o
+O4 = hlvl.o hlvltest.o kcompare.o
+CPP=$(CC) -E
+
+all: $(TPROG1) $(TPROG2) $(TPROG3)
 
-all: $(TPROG1)
+$(TPROG1): $(O1) ../lib/dict.a ../lib/isam.a ../lib/isamc.a ../lib/recctrl.a \
+               ../lib/bfile.a ../lib/dfa.a ../lib/zebrautl.a $(YAZLIB)
+       $(CC) $(CFLAGS) -o $(TPROG1) $(O1) \
+               ../lib/dict.a ../lib/isam.a ../lib/isamc.a ../lib/recctrl.a \
+               ../lib/bfile.a ../lib/dfa.a ../lib/zebrautl.a \
+               $(YAZLIB) $(ELIBS)
 
-$(TPROG1): $(O) ../lib/dict.a ../lib/bfile.a ../lib/util.a
-       $(CC) $(CFLAGS) -o $(TPROG1) $(O) ../lib/dict.a ../lib/bfile.a ../lib/util.a
+$(TPROG2): $(O2)
+       $(CC) $(CFLAGS) -o $(TPROG2) $(O2) ../lib/zebrautl.a \
+               $(YAZLIB) $(ELIBS)
+
+$(TPROG3): $(O3) \
+               ../lib/rset.a ../lib/dict.a ../lib/isam.a ../lib/recctrl.a \
+               ../lib/isamc.a ../lib/bfile.a ../lib/dfa.a ../lib/zebrautl.a \
+               $(YAZLIB)
+       $(CC) $(CFLAGS) -o $(TPROG3) $(O3) \
+               ../lib/rset.a ../lib/dict.a ../lib/isam.a ../lib/recctrl.a \
+               ../lib/isamc.a ../lib/bfile.a ../lib/dfa.a ../lib/zebrautl.a \
+               $(YAZLIB) $(OSILIB) $(ELIBS) -lm
+
+$(TPROG4): $(O4) \
+               ../lib/rset.a ../lib/dict.a ../lib/isam.a ../lib/recctrl.a \
+               ../lib/isamc.a ../lib/bfile.a ../lib/dfa.a ../lib/zebrautl.a \
+               $(YAZLIB)
+       $(CC) $(CFLAGS) -o $(TPROG4) $(O4) \
+               ../lib/rset.a ../lib/dict.a ../lib/isam.a ../lib/recctrl.a \
+               ../lib/isamc.a ../lib/bfile.a ../lib/dfa.a ../lib/zebrautl.a \
+               $(YAZLIB) $(OSILIB) $(ELIBS) -lm 
 
 .c.o:
        $(CC) -c $(DEFS) $(CFLAGS) $<
 
 clean:
-       rm -f *.[oa] $(TPROG1) $(TPROG2) core mon.out gmon.out errlist
-
-$(O): 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