Bug fix of .depend include.
[idzebra-moved-to-github.git] / isam / Makefile
1 SHELL=/bin/sh
2 INCLUDE=-I../include
3 CFLAGS=-g -Wall -pedantic
4 DEFS=$(INCLUDE)
5 LIB=../lib/isam.a
6 PO = isutil.o isam.o
7 CPP=cc -E
8
9 all: $(LIB)
10
11 isam-test: isam-test.c $(LIB)
12         $(CC) -g -o isam-test -I../include isam-test.c \
13         ../lib/isam.a ../lib/bfile.a ../lib/util.a
14
15 #$(TPROG): $(TPROG).o $(LIB) 
16 #       $(CC) -o $(TPROG) $(TPROG).o $(LIB)
17
18 $(LIB): $(PO)
19         rm -f $(LIB)
20         ar qc $(LIB) $(PO)
21         ranlib $(LIB)
22
23 .c.o:
24         $(CC) -c $(DEFS) $(CFLAGS) $<
25
26 clean:
27         rm -f *.[oa] $(TPROG) core mon.out gmon.out errlist isam-test
28
29 dep depend:
30         $(CPP) $(INCLUDE) -M *.c >.depend
31
32 ifeq (.depend,$(wildcard .depend))
33 include .depend
34 endif