Minor changes.
[egate.git] / util / Makefile
1 # Makefile for Email gateway utilities
2 # Europagate, 1995
3 #
4 # Makefile,v
5 # Revision 1.5  1995/02/22  08:51:46  adam
6 # Definition of CPP changed.
7 #
8 # Revision 1.4  1995/02/20  21:16:32  adam
9 # Minor changes.
10 #
11 # Revision 1.3  1995/02/15  17:45:43  adam
12 # Bug fix in iso2709 module.
13 #
14 # Revision 1.2  1995/02/10  17:05:18  adam
15 # New function iso2709_display to display MARC records in a
16 # line-by-line format. The iso2709_cvt function no longer
17 # prints the record to stderr.
18 #
19 # Revision 1.1.1.1  1995/02/09  17:27:11  adam
20 # Initial version of email gateway under CVS control.
21 #
22 SHELL=/bin/sh
23 INCLUDE=-I../include
24 CFLAGS=-g -Wall -pedantic -ansi
25 TPROG1=iso2709dump
26 LIB=../lib/util.a
27 PO=iso2709.o iso27dis.o
28 CPP=$(CC) -E
29 DEFS=$(INCLUDE)
30
31 all: $(TPROG1) $(TPROG2)
32
33 $(TPROG1): $(TPROG1).o $(LIB) 
34         $(CC) $(CFLAGS) -o $(TPROG1) $(TPROG1).o $(LIB)
35
36 $(LIB): $(PO)
37         rm -f $(LIB)
38         ar qc $(LIB) $(PO)
39         ranlib $(LIB)
40
41 .c.o:
42         $(CC) -c $(DEFS) $(CFLAGS) $<
43
44 clean:
45         rm -f *.log *.[oa] $(TPROG1) $(TPROG2) core mon.out gmon.out errlist *~
46
47 depend: depend2
48
49 depend1:
50         mv Makefile Makefile.tmp
51         sed '/^#Depend/q' <Makefile.tmp >Makefile
52         $(CPP) $(INCLUDE) -M *.c >>Makefile
53         -rm Makefile.tmp
54
55 depend2:
56         $(CPP) $(INCLUDE) -M *.c >.depend       
57
58 ifeq (.depend,$(wildcard .depend))
59 include .depend
60 endif
61
62 #Depend --- DOT NOT DELETE THIS LINE