home *** CD-ROM | disk | FTP | other *** search
Makefile | 1991-09-23 | 3.0 KB | 89 lines |
- # Copyright (c) 1989 Citadel
- # All Rights Reserved
-
- # makefile 1.5 - 91/09/23
-
- # btree library makefile
-
- AR = ar# # library archiver
- CC = cc# # C compiler
- CFLAGS = -O# # C compiler options
- INCDIR = /usr/include# # include directory
- LIB = btree# # library name
- LIBDIR = /usr/lib# # library directory
- LLIBDIR = /usr/lib# # lint library directory
- LINT = lint -b -p -lblkio -o $(LIB)
- MAN = $(LIB).man# # manual file name
-
- FILES = makefile btree.h btree_.h \
- btclose.c btcreate.c btcursor.c btdelcur.c btdelete.c btfirst.c \
- btfix.c btgetcur.c btgetk.c btgetlck.c btinsert.c btkeycmp.c \
- btkeycnt.c btkeysiz.c btlast.c btlock.c btnext.c btopen.c \
- btprev.c btsearch.c btsetbuf.c btsetcur.c btsetvbu.c btsync.c \
- btops.c dgops.c kyops.c ndops.c \
- btdemo.c
- MANS = btree.h \
- btclose.c btcreate.c btcursor.c btdelcur.c btdelete.c btfirst.c \
- btfix.c btgetcur.c btgetk.c btgetlck.c btinsert.c btkeycmp.c \
- btkeycnt.c btkeysiz.c btlast.c btlock.c btnext.c btopen.c \
- btprev.c btsearch.c btsetbuf.c btsetcur.c btsetvbu.c btsync.c
- SRCS = btclose.c btcreate.c btdelcur.c btdelete.c btfirst.c btfix.c \
- btgetcur.c btgetk.c btgetlck.c btinsert.c btkeycmp.c btlast.c \
- btlock.c btnext.c btopen.c btprev.c btsearch.c btsetbuf.c \
- btsetcur.c btsetvbu.c btsync.c \
- btops.c dgops.c kyops.c ndops.c
- OBJS = $(SRCS:.c=.o)
- MODS = $(LIB)(btclose.o) $(LIB)(btcreate.o) $(LIB)(btdelcur.o) \
- $(LIB)(btdelete.o) $(LIB)(btfirst.o) $(LIB)(btfix.o) \
- $(LIB)(btgetcur.o) $(LIB)(btgetk.o) $(LIB)(btgetlck.o) \
- $(LIB)(btinsert.o) $(LIB)(btkeycmp.o) $(LIB)(btlast.o) \
- $(LIB)(btlock.o) $(LIB)(btnext.o) $(LIB)(btopen.o) \
- $(LIB)(btprev.o) $(LIB)(btsearch.o) $(LIB)(btsetbuf.o) \
- $(LIB)(btsetcur.o) $(LIB)(btsetvbu.o) $(LIB)(btsync.o) \
- $(LIB)(btops.o) $(LIB)(dgops.o) $(LIB)(kyops.o) \
- $(LIB)(ndops.o)
-
- $(LIB): $(MODS)
- @echo $(LIB) up-to-date.
-
- $(MODS): btree.h btree_.h
-
- util: btdemo
-
- btdemo: $$@.c $(LIBDIR)/lib$(LIB).a
- cc $(CFLAGS) $@.c -l$(LIB) -lblkio -o $@
-
- install:
- @if test -s $(INCDIR)/btree.h = 0; \
- then \
- echo $(INCDIR)/btree.h exists\.; \
- echo -n "Do you wish to copy over it? "; \
- read response; \
- case $$response in \
- y | Y | yes | YES | Yes) ;; \
- *) exit 1 ;; \
- esac \
- fi; \
- cp btree.h $(INCDIR)
- @if test -s $(LIBDIR)/lib$(LIB).a = 0; \
- then \
- echo $(LIBDIR)/lib$(LIB).a exists\.; \
- echo -n "Do you wish to copy over it? "; \
- read response; \
- case $$response in \
- y | Y | yes | YES | Yes) ;; \
- *) exit 1 ;; \
- esac \
- fi; \
- cp $(LIB) $(LIBDIR)/lib$(LIB).a
- @echo $(LIB) installed.
-
- lint:
- $(LINT) $(SRCS)
- mv llib-l$(LIB).ln $(LLIBDIR)
-
- man: $(MAN)
-
- $(MAN): $(MANS)
- cat $(MANS) | manx > $@