Various cleanup. YAZ util used instead.
[idzebra-moved-to-github.git] / isam / Makefile
1 # Copyright (C) 1994, Index Data I/S 
2 # All rights reserved.
3 # Sebastian Hammer, Adam Dickmeiss
4 # $Id: Makefile,v 1.13 1995-09-04 12:33:46 adam Exp $
5
6 SHELL=/bin/sh
7 RANLIB=ranlib
8 YAZ=../../yaz
9 YAZLIB=$(YAZ)/lib/libyaz.a
10 INCLUDE=-I../include -I$(YAZ)/include
11 #CFLAGS=-g -Wall -pedantic -ansi
12 DEFS=$(INCLUDE)
13 LIB=../lib/isam.a
14 PO = isam.o isutil.o rootblk.o memory.o physical.o
15 CPP=cc -E
16
17 all: $(LIB)
18
19 alll: $(LIB) isam-test issh
20
21 test: test.c $(LIB)
22         $(CC) -g -o test -I../include test.c \
23         ../lib/isam.a ../lib/bfile.a ../lib/alexutil.a $(YAZLIB)
24
25 isam-test: isam-test.c $(LIB)
26         $(CC) -g -o isam-test -I../include isam-test.c \
27         ../lib/isam.a ../lib/bfile.a ../lib/alexutil.a $(YAZLIB)
28
29 issh: issh.c $(LIB)
30         $(CC) -g -o issh -I../include issh.c \
31         ../lib/isam.a ../lib/bfile.a ../lib/alexutil.a $(YAZLIB)
32
33 #$(TPROG): $(TPROG).o $(LIB) 
34 #       $(CC) -o $(TPROG) $(TPROG).o $(LIB)
35
36 $(LIB): $(PO)
37         rm -f $(LIB)
38         ar qc $(LIB) $(PO)
39         $(RANLIB) $(LIB)
40
41 .c.o:
42         $(CC) -c $(DEFS) $(CFLAGS) $<
43
44 clean:
45         rm -f *.[oa] $(TPROG) core mon.out gmon.out errlist test isam-test issh
46
47 depend: depend2
48
49 depend1:
50         sed '/^#Depend/q' <Makefile >Makefile.tmp
51         $(CPP) $(DEFS) -M *.c >>Makefile.tmp
52         mv -f Makefile.tmp Makefile
53
54 depend2:
55         $(CPP) $(DEFS) -M *.c >.depend  
56
57 ifeq (.depend,$(wildcard .depend))
58 include .depend
59 endif
60
61 #Depend --- DOT NOT DELETE THIS LINE