Seems relatively bug-free.
[idzebra-moved-to-github.git] / isam / 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-27 20:03:50 quinn Exp $
5
6 SHELL=/bin/sh
7 INCLUDE=-I../include
8 CFLAGS=-g -Wall -pedantic
9 DEFS=$(INCLUDE)
10 LIB=../lib/isam.a
11 PO = isam.o isutil.o rootblk.o memory.o physical.o
12 CPP=cc -E
13
14 all: $(LIB)
15
16 alll: $(LIB) isam-test issh
17
18 test: test.c $(LIB)
19         $(CC) -g -o test -I../include test.c \
20         ../lib/isam.a ../lib/bfile.a ../lib/util.a
21
22 isam-test: isam-test.c $(LIB)
23         $(CC) -g -o isam-test -I../include isam-test.c \
24         ../lib/isam.a ../lib/bfile.a ../lib/util.a
25
26 issh: issh.c $(LIB)
27         $(CC) -g -o issh -I../include issh.c \
28         ../lib/isam.a ../lib/bfile.a ../lib/util.a
29
30 #$(TPROG): $(TPROG).o $(LIB) 
31 #       $(CC) -o $(TPROG) $(TPROG).o $(LIB)
32
33 $(LIB): $(PO)
34         rm -f $(LIB)
35         ar qc $(LIB) $(PO)
36         ranlib $(LIB)
37
38 .c.o:
39         $(CC) -c $(DEFS) $(CFLAGS) $<
40
41 clean:
42         rm -f *.[oa] $(TPROG) core mon.out gmon.out errlist test isam-test issh
43
44 depend: depend2
45
46 depend1:
47         mv Makefile Makefile.tmp
48         sed '/^#Depend/q' <Makefile.tmp >Makefile
49         $(CPP) $(INCLUDE) -M *.c >>Makefile
50         -rm Makefile.tmp
51
52 depend2:
53         $(CPP) $(INCLUDE) -M *.c >.depend       
54
55 ifeq (.depend,$(wildcard .depend))
56 include .depend
57 endif
58
59 #Depend --- DOT NOT DELETE THIS LINE