Support for YAZ in standard located directories, such as /usr/local/..
[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.14 1995-11-20 11:57:54 adam Exp $
5
6 SHELL=/bin/sh
7 RANLIB=ranlib
8
9 YAZLIB=-lyaz
10 YAZINC=
11
12 INCLUDE=-I../include $(YAZINC)
13 #CFLAGS=-g -Wall -pedantic -ansi
14 DEFS=$(INCLUDE)
15 TPROG=btest
16 CFLAGS=-g -Wall -pedantic -ansi
17 DEFS=$(INCLUDE)
18 LIB=../lib/bfile.a
19 PO = bfile.o mfile.o
20 CPP=$(CC) -E
21
22 all: $(LIB)
23
24 $(TPROG): $(TPROG).o $(LIB) $(YAZLIB)
25         $(CC) -o $(TPROG) $(TPROG).o $(LIB) $(YAZLIB)
26
27 $(LIB): $(PO)
28         rm -f $(LIB)
29         ar qc $(LIB) $(PO)
30         $(RANLIB) $(LIB)
31
32 .c.o:
33         $(CC) -c $(DEFS) $(CFLAGS) $<
34
35 clean:
36         rm -f *.[oa] $(TPROG) core mon.out gmon.out errlist
37
38
39 depend: depend2
40
41 depend1:
42         sed '/^#Depend/q' <Makefile >Makefile.tmp
43         $(CPP) $(DEFS) -M *.c >>Makefile.tmp
44         mv -f Makefile.tmp Makefile
45
46 depend2:
47         $(CPP) $(DEFS) -M *.c >.depend  
48
49 ifeq (.depend,$(wildcard .depend))
50 include .depend
51 endif
52
53 #Depend --- DOT NOT DELETE THIS LINE