home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / dos / database / cbase103 / btree / makefile < prev    next >
Encoding:
Makefile  |  1991-09-23  |  3.0 KB  |  89 lines

  1. #    Copyright (c) 1989 Citadel
  2. #       All Rights Reserved
  3.  
  4. # makefile    1.5 - 91/09/23
  5.  
  6. # btree library makefile
  7.  
  8. AR    = ar#        # library archiver
  9. CC    = cc#        # C compiler
  10. CFLAGS    = -O#        # C compiler options
  11. INCDIR    = /usr/include#    # include directory
  12. LIB    = btree#    # library name
  13. LIBDIR    = /usr/lib#    # library directory
  14. LLIBDIR    = /usr/lib#    # lint library directory
  15. LINT    = lint -b -p -lblkio -o $(LIB)
  16. MAN    = $(LIB).man#    # manual file name
  17.  
  18. FILES =    makefile   btree.h    btree_.h                                    \
  19.     btclose.c  btcreate.c btcursor.c btdelcur.c btdelete.c btfirst.c  \
  20.     btfix.c    btgetcur.c btgetk.c   btgetlck.c btinsert.c btkeycmp.c \
  21.     btkeycnt.c btkeysiz.c btlast.c   btlock.c   btnext.c   btopen.c   \
  22.     btprev.c   btsearch.c btsetbuf.c btsetcur.c btsetvbu.c btsync.c   \
  23.     btops.c    dgops.c    kyops.c    ndops.c                          \
  24.     btdemo.c
  25. MANS =    btree.h                                                           \
  26.     btclose.c  btcreate.c btcursor.c btdelcur.c btdelete.c btfirst.c  \
  27.     btfix.c    btgetcur.c btgetk.c   btgetlck.c btinsert.c btkeycmp.c \
  28.     btkeycnt.c btkeysiz.c btlast.c   btlock.c   btnext.c   btopen.c   \
  29.     btprev.c   btsearch.c btsetbuf.c btsetcur.c btsetvbu.c btsync.c
  30. SRCS =    btclose.c  btcreate.c btdelcur.c btdelete.c btfirst.c  btfix.c    \
  31.     btgetcur.c btgetk.c   btgetlck.c btinsert.c btkeycmp.c btlast.c   \
  32.     btlock.c   btnext.c   btopen.c   btprev.c   btsearch.c btsetbuf.c \
  33.     btsetcur.c btsetvbu.c btsync.c                                    \
  34.     btops.c    dgops.c    kyops.c    ndops.c
  35. OBJS =    $(SRCS:.c=.o)
  36. MODS =    $(LIB)(btclose.o)  $(LIB)(btcreate.o) $(LIB)(btdelcur.o) \
  37.     $(LIB)(btdelete.o) $(LIB)(btfirst.o)  $(LIB)(btfix.o)    \
  38.     $(LIB)(btgetcur.o) $(LIB)(btgetk.o)   $(LIB)(btgetlck.o) \
  39.     $(LIB)(btinsert.o) $(LIB)(btkeycmp.o) $(LIB)(btlast.o)   \
  40.     $(LIB)(btlock.o)   $(LIB)(btnext.o)   $(LIB)(btopen.o)   \
  41.     $(LIB)(btprev.o)   $(LIB)(btsearch.o) $(LIB)(btsetbuf.o) \
  42.     $(LIB)(btsetcur.o) $(LIB)(btsetvbu.o) $(LIB)(btsync.o)   \
  43.     $(LIB)(btops.o)    $(LIB)(dgops.o)    $(LIB)(kyops.o)    \
  44.     $(LIB)(ndops.o)
  45.  
  46. $(LIB):    $(MODS)
  47.     @echo $(LIB) up-to-date.
  48.  
  49. $(MODS):    btree.h btree_.h
  50.  
  51. util:    btdemo
  52.  
  53. btdemo:    $$@.c $(LIBDIR)/lib$(LIB).a
  54.     cc $(CFLAGS) $@.c -l$(LIB) -lblkio -o $@
  55.  
  56. install:
  57.     @if test -s $(INCDIR)/btree.h = 0;            \
  58.     then                            \
  59.         echo $(INCDIR)/btree.h exists\.;        \
  60.         echo -n "Do you wish to copy over it? ";    \
  61.         read response;                    \
  62.         case $$response in                \
  63.         y | Y | yes | YES | Yes)    ;;        \
  64.         *) exit 1            ;;        \
  65.         esac                        \
  66.     fi;                            \
  67.     cp btree.h $(INCDIR)
  68.     @if test -s $(LIBDIR)/lib$(LIB).a = 0;            \
  69.     then                            \
  70.         echo $(LIBDIR)/lib$(LIB).a exists\.;        \
  71.         echo -n "Do you wish to copy over it? ";    \
  72.         read response;                    \
  73.         case $$response in                \
  74.         y | Y | yes | YES | Yes)    ;;        \
  75.         *) exit 1            ;;        \
  76.         esac                        \
  77.     fi;                            \
  78.     cp $(LIB) $(LIBDIR)/lib$(LIB).a
  79.     @echo $(LIB) installed.
  80.  
  81. lint:
  82.     $(LINT) $(SRCS)
  83.     mv llib-l$(LIB).ln $(LLIBDIR)
  84.  
  85. man:    $(MAN)
  86.  
  87. $(MAN):    $(MANS)
  88.     cat $(MANS) | manx > $@
  89.