New simple file index tool.
[idzebra-moved-to-github.git] / index / Makefile
1 # Copyright (C) 1994, Index Data I/S 
2 # All rights reserved.
3 # Sebastian Hammer, Adam Dickmeiss
4 # $Id: Makefile,v 1.1 1995-08-31 14:50:24 adam Exp $
5
6 SHELL=/bin/sh
7 INCLUDE=-I../include
8 TPROG1=index
9 DEFS=$(INCLUDE)
10 O = main.o
11 CPP=cc -E
12
13 all: $(TPROG1)
14
15 $(TPROG1): $(O) ../lib/dict.a ../lib/bfile.a ../lib/util.a
16         $(CC) $(CFLAGS) -o $(TPROG1) $(O) ../lib/dict.a ../lib/bfile.a ../lib/util.a
17
18 .c.o:
19         $(CC) -c $(DEFS) $(CFLAGS) $<
20
21 clean:
22         rm -f *.[oa] $(TPROG1) $(TPROG2) core mon.out gmon.out errlist
23
24 $(O): index.h
25
26 depend: depend2
27
28 depend1:
29         mv Makefile Makefile.tmp
30         sed '/^#Depend/q' <Makefile.tmp >Makefile
31         $(CPP) $(INCLUDE) -M *.c >>Makefile
32         -rm Makefile.tmp
33
34 depend2:
35         $(CPP) $(INCLUDE) -M *.c >.depend       
36
37 ifeq (.depend,$(wildcard .depend))
38 include .depend
39 endif
40
41 #Depend --- DOT NOT DELETE THIS LINE