Support for YAZ in standard located directories, such as /usr/local/..
[idzebra-moved-to-github.git] / util / Makefile
1 # Copyright (C) 1994, Index Data I/S 
2 # All rights reserved.
3 # Sebastian Hammer, Adam Dickmeiss
4 # $Id: Makefile,v 1.21 1995-11-20 11:58:16 adam Exp $
5
6 SHELL=/bin/sh
7 RANLIB=ranlib
8
9 YAZLIB=-lyaz
10 YAZINC=
11
12 INCLUDE=-I../include $(YAZINC)
13 TPROG=opt-test
14 #CFLAGS=-g -Wall -pedantic -ansi
15 DEFS=$(INCLUDE)
16 CPP=$(CC) -E
17 LIB=../lib/alexutil.a
18 PO = res.o alexpath.o common.o
19
20 all: $(LIB)
21
22 alll: res-test all
23
24 res-test: res-test.o $(LIB) 
25         $(CC) -o res-test res-test.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] res-test core mon.out gmon.out errlist
37
38 depend: depend2
39
40 depend1:
41         sed '/^#Depend/q' <Makefile >Makefile.tmp
42         $(CPP) $(DEFS) -M *.c >>Makefile.tmp
43         mv -f Makefile.tmp Makefile
44
45 depend2:
46         $(CPP) $(DEFS) -M *.c >.depend  
47
48 ifeq (.depend,$(wildcard .depend))
49 include .depend
50 endif
51
52 #Depend --- DOT NOT DELETE THIS LINE