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