Run latex
[egate.git] / util / Makefile
1 # Makefile for Email gateway utilities
2 # Europagate, 1995
3 #
4 # $Log: Makefile,v $
5 # Revision 1.19  1996/05/22 08:37:29  adam
6 # Removed CFLAGS definition.
7 #
8 # Revision 1.18  1996/01/24 10:11:34  adam
9 # Make all builds library only.
10 #
11 # Revision 1.17  1995/12/20  16:28:07  adam
12 # Extra parameter block to gw_db_open. If block is 0 gw_db_open
13 # returns NULL if lock couldn't be satisfied.
14 # Minor changes in iso2709.c.
15 #
16 # Revision 1.16  1995/11/10  10:19:48  adam
17 # Test programs not build on 'make all'.
18 #
19 # Revision 1.15  1995/05/01  12:43:55  adam
20 # lgets function moved from kernel to util.
21 #
22 # Revision 1.14  1995/04/17  09:36:32  adam
23 # ttyemit moved from kernel directory.
24 #
25 # Revision 1.13  1995/03/29  11:44:29  adam
26 # New functions: iso2709_a_.. for record manipulation.
27 #
28 # Revision 1.12  1995/03/28  16:07:06  adam
29 # New function: iso2709_out. This function is the reverse of iso2709_cvt.
30 #
31 # Revision 1.11  1995/03/28  11:42:41  adam
32 # First version of string-queue utility.
33 #
34 # Revision 1.10  1995/03/27  12:52:18  adam
35 # A little more verbose in marc dump.
36 #
37 # Revision 1.9  1995/03/27  08:24:57  adam
38 # New module gip: Gateway IPc module.
39 # New module gw-db: Gateway hash-db module (user information table).
40 #
41 # Revision 1.8  1995/03/10  09:10:56  adam
42 # Removed dbc2709_cvt function. Makes heuristic guess for DBC2709 records.
43 #
44 # Revision 1.7  1995/02/22  21:32:36  adam
45 # Changed header.
46 #
47 # Revision 1.5  1995/02/22  08:51:46  adam
48 # Definition of CPP changed.
49 #
50 # Revision 1.4  1995/02/20  21:16:32  adam
51 # Minor changes.
52 #
53 # Revision 1.3  1995/02/15  17:45:43  adam
54 # Bug fix in iso2709 module.
55 #
56 # Revision 1.2  1995/02/10  17:05:18  adam
57 # New function iso2709_display to display MARC records in a
58 # line-by-line format. The iso2709_cvt function no longer
59 # prints the record to stderr.
60 #
61 # Revision 1.1.1.1  1995/02/09  17:27:11  adam
62 # Initial version of email gateway under CVS control.
63 #
64 SHELL=/bin/sh
65 INCLUDE=-I../include
66 TPROG1=iso2709dump
67 TPROG2=gwdbtest
68 LIB=../lib/util.a
69 PO=iso2709.o iso27dis.o iso2709o.o iso2709a.o strqueue.o \
70  gw-db.o gip.o gips.o gipc.o ttyemit.o lgets.o
71 CPP=$(CC) -E
72 DEFS=$(INCLUDE) -DWEIRD_ISO_DBC=1
73
74 all: $(LIB)
75
76 $(TPROG1): $(TPROG1).o $(LIB) 
77         $(CC) $(CFLAGS) -o $(TPROG1) $(TPROG1).o $(LIB) ../lib/libres+log.a
78
79 $(TPROG2): $(TPROG2).o $(LIB) 
80         $(CC) $(CFLAGS) -o $(TPROG2) $(TPROG2).o $(LIB) ../lib/libres+log.a
81
82 $(LIB): $(PO)
83         rm -f $(LIB)
84         ar qc $(LIB) $(PO)
85         ranlib $(LIB)
86
87 .c.o:
88         $(CC) -c $(DEFS) $(CFLAGS) $<
89
90 clean:
91         rm -f *.log *.[oa] $(TPROG1) $(TPROG2) core mon.out gmon.out errlist *~
92
93 depend: depend2
94
95 depend1:
96         sed '/^#Depend/q' <Makefile >Makefile.tmp
97         $(CPP) $(DEFS) -M *.c >>Makefile.tmp
98         mv -f Makefile.tmp Makefile
99
100 depend2:
101         $(CPP) $(DEFS) -M *.c >.depend  
102
103 #GNU make style depend
104 ifeq (.depend,$(wildcard .depend))
105 include .depend
106 endif
107
108 #Depend --- DOT NOT DELETE THIS LINE