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