Smallish adjustments.
[yaz-moved-to-github.git] / rfc1006 / Makefile
1 # Copyright (C) 1994, Index Data I/S 
2 # All rights reserved.
3 # Sebastian Hammer, Adam Dickmeiss
4 # $Id: Makefile,v 1.8 1995-06-25 10:53:56 quinn Exp $
5
6 SHELL=/bin/sh
7 INCLUDE=-I../include -I. -I../../xtimosi/src
8 LIBDIR=../lib
9 LIBINCLUDE=-L$(LIBDIR)
10 CFLAGS= -g -Wall -pedantic -ansi
11 DEFS=$(INCLUDE) # -DTRACE_TRANSPORT
12 LIB=$(LIBDIR)/librfc.a
13 LIBS=-lodr
14 PO = rfct.o makensap.o
15 CPP=$(CC) -E
16 RANLIB=ranlib
17
18 all: $(LIBDIR) $(INCDIR) $(LIB)
19
20 test: test.o $(LIB)
21         $(CC) $(CFLAGS) $(LIBINCLUDE) -o test test.o $(LIBS)
22
23 alll:
24
25 $(LIB): $(PO)
26         rm -f $(LIB)
27         ar qc $(LIB) $(PO)
28         $(RANLIB) $(LIB)
29
30 $(LIBDIR):
31         mkdir $(LIBDIR)
32
33 .c.o:
34         $(CC) -c $(DEFS) $(CFLAGS) $<
35
36 clean:
37         rm -f *.[oa] test core mon.out gmon.out errlist
38
39 depend: depend2
40
41 depend1:
42         sed '/^#Depend/q' <Makefile >Makefile.tmp
43         $(CPP) $(DEFS) -M *.c >>Makefile.tmp
44         mv -f Makefile.tmp Makefile
45
46 depend2:
47         $(CPP) $(INCLUDE) -M *.c >.depend       
48
49 ifeq (.depend,$(wildcard .depend))
50 include .depend
51 endif
52
53 #Depend --- DOT NOT DELETE THIS LINE