Added -pedantic
[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.11 1994-09-02 14:56:06 quinn 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 opt-test: opt-test.o $(LIB) 
18         $(CC) -o opt-test opt-test.o $(LIB)
19
20 res-test: res-test.o $(LIB)
21         $(CC) -o res-test res-test.o $(LIB)
22
23 $(LIB): $(PO)
24         rm -f $(LIB)
25         ar qc $(LIB) $(PO)
26         ranlib $(LIB)
27
28 .c.o:
29         $(CC) -c $(DEFS) $(CFLAGS) $<
30
31 clean:
32         rm -f *.[oa] opt-test res-test core mon.out gmon.out errlist
33
34 dep depend:
35         $(CPP) $(INCLUDE) -M *.c >.depend
36
37 ifeq (.depend,$(wildcard .depend))
38 include .depend
39 endif