Client uses prefix query notation.
[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.19 1995-04-21 16:31:56 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
18 CPP=$(CC) -E
19
20 all: $(LIBDIR) $(INCDIR) $(LIB)
21
22 test: test.o $(LIB)
23         $(CC) $(CFLAGS) $(LIBINCLUDE) -o test test.o $(LIBS)
24
25 alll:
26
27 $(LIB): $(PO)
28         rm -f $(LIB)
29         ar qc $(LIB) $(PO)
30         ranlib $(LIB)
31
32 $(LIBDIR):
33         mkdir $(LIBDIR)
34
35 .c.o:
36         $(CC) -c $(DEFS) $(CFLAGS) $<
37
38 clean:
39         rm -f *.[oa] test core mon.out gmon.out errlist
40
41 depend: depend2
42
43 depend1:
44         mv Makefile Makefile.tmp
45         sed '/^#Depend/q' <Makefile.tmp >Makefile
46         $(CPP) $(INCLUDE) -M *.c >>Makefile
47         -rm Makefile.tmp
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