Deleted regexp.y
[idzebra-moved-to-github.git] / dfa / Makefile
1 # Copyright (C) 1994, Index Data I/S 
2 # All rights reserved.
3 # Sebastian Hammer, Adam Dickmeiss
4 # $Id: Makefile,v 1.9 1995-09-15 09:32:08 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 TPROG1=agrep
12 TPROG2=lexer
13 TPROG3=grepper
14 DEFS=$(INCLUDE) -DYACC -DYYDEBUG=1 -DMEMDEBUG=1
15 LIB=../lib/dfa.a 
16 PO = dfa.o imalloc.o states.o set.o bset.o
17 CPP=cc -E
18
19 all: $(LIB)
20
21 alll: $(LIB) $(TPROG1) $(TPROG2) $(TPROG3)
22
23 $(TPROG1): $(TPROG1).o $(LIB) ../lib/alexutil.a $(YAZLIB)
24         $(CC) $(CFLAGS) -o $(TPROG1) $(TPROG1).o $(LIB) \
25                 ../lib/alexutil.a $(YAZLIB)
26
27 $(TPROG2): $(TPROG2).o readfile.o $(LIB) ../lib/alexutil.a $(YAZLIB)
28         $(CC) $(CFLAGS) -o $(TPROG2) $(TPROG2).o readfile.o $(LIB) \
29                 ../lib/alexutil.a $(YAZLIB)
30
31 $(TPROG3): $(TPROG3).o $(LIB) ../lib/alexutil.a $(YAZLIB)
32         $(CC) $(CFLAGS) -o $(TPROG3) $(TPROG3).o $(LIB) $(YAZLIB) \
33                 ../lib/alexutil.a $(YAZLIB)
34
35 $(LIB): $(PO)
36         rm -f $(LIB)
37         ar qc $(LIB) $(PO)
38         $(RANLIB) $(LIB)
39
40 .c.o:
41         $(CC) -c $(DEFS) $(CFLAGS) $<
42
43 clean:
44         rm -f *.[oa] $(TPROG1) $(TPROG2) $(TPROG3) core mon.out gmon.out errlist
45
46 depend: depend2
47
48 depend1:
49         sed '/^#Depend/q' <Makefile >Makefile.tmp
50         $(CPP) -M $(DEFS) *.c >>Makefile.tmp
51         mv -f Makefile.tmp Makefile
52
53 depend2:
54         $(CPP) -M $(DEFS) *.c >.depend
55
56 ifeq (.depend,$(wildcard .depend))
57 include .depend
58 endif
59
60 #Depend --- DOT NOT DELETE THIS LINE