*** empty log message ***
[yaz-moved-to-github.git] / odr / Makefile
1 # Copyright (C) 1994, Index Data I/S 
2 # All rights reserved.
3 # Sebastian Hammer, Adam Dickmeiss
4 # $Id: Makefile,v 1.22 1995-06-25 10:53:55 quinn Exp $
5
6 SHELL=/bin/sh
7 INCLUDE=-I../include -I.
8 LIBDIR=../lib
9 LIBINCLUDE=-L$(LIBDIR)
10 CFLAGS= -g -Wall -pedantic -ansi   -DODR_DEBUG
11 DEFS=$(INCLUDE)
12 LIB=$(LIBDIR)/libodr.a
13 LIBS=-lodr
14 PO = odr_bool.o ber_bool.o ber_len.o ber_tag.o odr_util.o odr_null.o \
15         ber_null.o odr_int.o ber_int.o odr_tag.o odr_cons.o odr_seq.o\
16         odr_oct.o ber_oct.o odr_bit.o ber_bit.o odr_oid.o ber_oid.o odr_use.o \
17         odr_choice.o odr_any.o ber_any.o odr.o odr_mem.o dumpber.o
18 CPP=$(CC) -E
19 RANLIB=ranlib
20
21 all: $(LIBDIR) $(INCDIR) $(LIB)
22
23 test: test.o $(LIB)
24         $(CC) $(CFLAGS) $(LIBINCLUDE) -o test test.o $(LIBS)
25
26 alll:
27
28 $(LIB): $(PO)
29         rm -f $(LIB)
30         ar qc $(LIB) $(PO)
31         $(RANLIB) $(LIB)
32
33 $(LIBDIR):
34         mkdir $(LIBDIR)
35
36 .c.o:
37         $(CC) -c $(DEFS) $(CFLAGS) $<
38
39 clean:
40         rm -f *.[oa] test core mon.out gmon.out errlist
41
42 depend: depend2
43
44 depend1:
45         sed '/^#Depend/q' <Makefile >Makefile.tmp
46         $(CPP) $(DEFS) -M *.c >>Makefile.tmp
47         mv -f Makefile.tmp Makefile
48
49 depend2:
50         $(CPP) $(INCLUDE) -M *.c >.depend       
51
52 ifeq (.depend,$(wildcard .depend))
53 include .depend
54 endif
55
56 #Depend --- DOT NOT DELETE THIS LINE