Initial version of email gateway under CVS control.
[egate.git] / util / Makefile
1 # Makefile for Email gateway utilities
2 # Europagate, 1995
3 #
4 # $Log: Makefile,v $
5 # Revision 1.1.1.1  1995/02/09 17:27:11  adam
6 # Initial version of email gateway under CVS control.
7 #
8 SHELL=/bin/sh
9 INCLUDE=-I../include
10 CFLAGS=-g -Wall -pedantic -ansi
11 CC=gcc
12 TPROG1=iso2709dump
13 LIB=../lib/util.a
14 PO=iso2709.o
15 CPP=cc -E
16 DEFS=$(INCLUDE)
17
18 all: $(TPROG1)
19
20 $(TPROG1): $(TPROG1).o $(LIB) 
21         $(CC) $(CFLAGS) -o $(TPROG1) $(TPROG1).o $(LIB)
22
23 $(LIB): $(PO)
24         rm -f $(LIB)
25         ar qc $(LIB) $(PO)
26         ranlib $(LIB)
27
28 .c.o:
29         $(CC) -c $(DEFS) $(CFLAGS) $<
30
31 clean:
32         rm -f *.log *.[oa] $(TPROG1) $(TPROG2) core mon.out gmon.out errlist *~
33
34 depend: depend2
35
36 depend1:
37         mv Makefile Makefile.tmp
38         sed '/^#Depend/q' <Makefile.tmp >Makefile
39         $(CPP) $(INCLUDE) -M *.c >>Makefile
40         -rm Makefile.tmp
41
42 depend2:
43         $(CPP) $(INCLUDE) -M *.c >.depend       
44
45 ifeq (.depend,$(wildcard .depend))
46 include .depend
47 endif
48
49 #Depend --- DOT NOT DELETE THIS LINE