*** empty log message ***
[yaz-moved-to-github.git] / comstack / Makefile
1 # Copyright (C) 1994, Index Data I/S 
2 # All rights reserved.
3 # Sebastian Hammer, Adam Dickmeiss
4 # $Id: Makefile,v 1.4 1996-02-20 12:52:09 quinn Exp $
5
6
7 LIBDIR=../lib
8
9 #LIBOSI=../../xtimosi/src/libmosi.a $(LIBDIR)/librfc.a
10 #XMOSI=xmosi.o
11
12 SHELL=/bin/sh
13 INCLUDE=-I../include -I. -I../../xtimosi/src
14 LIBINCLUDE=-L$(LIBDIR) -L../../xtimosi/src
15 #CFLAGS=-Wall -pedantic -g
16 #CFLAGS=-g
17 DEFS=$(INCLUDE) # -DTRACE_TCPIP
18 LIB= $(LIBDIR)/libcomstack.a 
19 LIBS=$(LIBDIR)/libasn.a $(LIBDIR)/libodr.a $(LIBDIR)/libcomstack.a \
20          ../lib/ccl.a $(LIBDIR)/libutil.a $(LIBMOSI)
21 PO = comstack.o tcpip.o waislen.o $(XMOSI)
22 CPP=$(CC) -E
23 #CC=checkergcc
24 RANLIB=ranlib
25
26 all: $(LIBDIR) $(LIB)
27
28 cli: tst.o $(LIB)
29         $(CC) $(CFLAGS) $(LIBINCLUDE) -o cli tst.o $(LIBINCLUDE) $(LIBS)
30
31 alll:
32
33 $(LIB): $(PO)
34         rm -f $(LIB)
35         ar qc $(LIB) $(PO)
36         $(RANLIB) $(LIB)
37
38 $(LIBDIR):
39         mkdir $(LIBDIR)
40 .c.o:
41         $(CC) -c $(DEFS) $(CFLAGS) $<
42
43 clean:
44         rm -f *.[oa] test core mon.out gmon.out errlist tst cli
45
46 depend: depend2
47
48 depend1:
49         sed '/^#Depend/q' <Makefile >Makefile.tmp
50         $(CPP) $(DEFS) -M *.c >>Makefile.tmp
51         mv -f Makefile.tmp Makefile
52
53 depend2:
54         $(CPP) $(INCLUDE) -M *.c >.depend       
55
56 ifeq (.depend,$(wildcard .depend))
57 include .depend
58 endif
59
60 #Depend --- DOT NOT DELETE THIS LINE