Added id-header.
[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.10 1994-09-27 16:31:40 adam 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 test: test.c $(LIB)
17         $(CC) -g -o test -I../include test.c \
18         ../lib/isam.a ../lib/bfile.a ../lib/util.a
19
20 isam-test: isam-test.c $(LIB)
21         $(CC) -g -o isam-test -I../include isam-test.c \
22         ../lib/isam.a ../lib/bfile.a ../lib/util.a
23
24 issh: issh.c $(LIB)
25         $(CC) -g -o issh -I../include issh.c \
26         ../lib/isam.a ../lib/bfile.a ../lib/util.a
27
28 #$(TPROG): $(TPROG).o $(LIB) 
29 #       $(CC) -o $(TPROG) $(TPROG).o $(LIB)
30
31 $(LIB): $(PO)
32         rm -f $(LIB)
33         ar qc $(LIB) $(PO)
34         ranlib $(LIB)
35
36 .c.o:
37         $(CC) -c $(DEFS) $(CFLAGS) $<
38
39 clean:
40         rm -f *.[oa] $(TPROG) core mon.out gmon.out errlist isam-test issh
41
42 depend: depend2
43
44 depend1:
45         mv Makefile Makefile.tmp
46         sed '/^#Depend/q' <Makefile.tmp >Makefile
47         $(CPP) $(INCLUDE) -M *.c >>Makefile
48         -rm Makefile.tmp
49
50 depend2:
51         $(CPP) $(INCLUDE) -M *.c >.depend       
52
53 ifeq (.depend,$(wildcard .depend))
54 include .depend
55 endif
56
57 #Depend --- DOT NOT DELETE THIS LINE