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