Function options now returns arg with error option.
[idzebra-moved-to-github.git] / util / Makefile
1 # Copyright (C) 1994, Index Data I/S 
2 # All rights reserved.
3 # Sebastian Hammer, Adam Dickmeiss
4 # $Id: Makefile,v 1.15 1994-10-04 17:47:09 adam Exp $
5
6 SHELL=/bin/sh
7 INCLUDE=-I../include
8 TPROG=opt-test
9 CFLAGS=-g -Wall -pedantic
10 DEFS=$(INCLUDE)
11 LIB=../lib/util.a
12 PO = options.o xmalloc.o log.o res.o alexpath.o common.o
13 CPP=cc -E
14
15 all: $(LIB)
16
17 alll: opt-test res-test all
18
19 opt-test: opt-test.o $(LIB) 
20         $(CC) -o opt-test opt-test.o $(LIB)
21
22 res-test: res-test.o $(LIB)
23         $(CC) -o res-test res-test.o $(LIB)
24
25 $(LIB): $(PO)
26         rm -f $(LIB)
27         ar qc $(LIB) $(PO)
28         ranlib $(LIB)
29
30 .c.o:
31         $(CC) -c $(DEFS) $(CFLAGS) $<
32
33 clean:
34         rm -f *.[oa] opt-test res-test core mon.out gmon.out errlist
35
36 depend: depend2
37
38 depend1:
39         mv Makefile Makefile.tmp
40         sed '/^#Depend/q' <Makefile.tmp >Makefile
41         $(CPP) $(INCLUDE) -M *.c >>Makefile
42         -rm Makefile.tmp
43
44 depend2:
45         $(CPP) $(INCLUDE) -M *.c >.depend       
46
47 ifeq (.depend,$(wildcard .depend))
48 include .depend
49 endif
50
51 #Depend --- DOT NOT DELETE THIS LINE