Various cleanup. YAZ util used instead.
[idzebra-moved-to-github.git] / bfile / Makefile
1 # Copyright (C) 1994, Index Data I/S 
2 # All rights reserved.
3 # Sebastian Hammer, Adam Dickmeiss
4 # $Id: Makefile,v 1.12 1995-09-04 12:33:21 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 TPROG=btest
14 CFLAGS=-g -Wall -pedantic -ansi
15 DEFS=$(INCLUDE)
16 LIB=../lib/bfile.a
17 PO = bfile.o mfile.o
18 CPP=cc -E
19
20 all: $(LIB)
21
22 $(TPROG): $(TPROG).o $(LIB) $(YAZLIB)
23         $(CC) -o $(TPROG) $(TPROG).o $(LIB) $(YAZLIB)
24
25 $(LIB): $(PO)
26         rm -f $(LIB)
27         ar qc $(LIB) $(PO)
28         $(RANLIB) $(LIB)
29
30 .c.o:
31         $(CC) -c $(DEFS) $(CFLAGS) $<
32
33 clean:
34         rm -f *.[oa] $(TPROG) core mon.out gmon.out errlist
35
36
37 depend: depend2
38
39 depend1:
40         sed '/^#Depend/q' <Makefile >Makefile.tmp
41         $(CPP) $(DEFS) -M *.c >>Makefile.tmp
42         mv -f Makefile.tmp Makefile
43
44 depend2:
45         $(CPP) $(DEFS) -M *.c >.depend  
46
47 ifeq (.depend,$(wildcard .depend))
48 include .depend
49 endif
50
51 #Depend --- DOT NOT DELETE THIS LINE