abc43f8930d02c9632ad3381d899661f553e0a74
[idzebra-moved-to-github.git] / util / Makefile
1 # Copyright (C) 1994-1996, Index Data I/S 
2 # All rights reserved.
3 # Sebastian Hammer, Adam Dickmeiss
4 # $Id: Makefile,v 1.23 1996-05-22 08:23:41 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 DEFS=$(INCLUDE)
15 CPP=$(CC) -E
16 LIB=../lib/alexutil.a
17 PO = res.o alexpath.o common.o
18
19 all: $(LIB)
20
21 alll: res-test all
22
23 res-test: res-test.o $(LIB) 
24         $(CC) -o res-test res-test.o $(LIB) $(YAZLIB)
25
26 $(LIB): $(PO)
27         rm -f $(LIB)
28         ar qc $(LIB) $(PO)
29         $(RANLIB) $(LIB)
30
31 .c.o:
32         $(CC) -c $(DEFS) $(CFLAGS) $<
33
34 clean:
35         rm -f *.[oa] res-test core mon.out gmon.out errlist
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