home *** CD-ROM | disk | FTP | other *** search
/ PC Press 1997 July / Sezamfile97_1.iso / msdos / c / cbase11.a03 / CBASE11.ZIP / XTEND / UNIX.MAK < prev    next >
Makefile  |  1993-01-01  |  2KB  |  75 lines

  1. #
  2. #    Copyright (c) 1989-1992 Citadel Software, Inc.
  3. #    All Rights Reserved
  4. #
  5.  
  6. # unix.mak    1.7 - 93/01/01
  7.  
  8. # xtend library makefile
  9.  
  10. AR    = ar#        # library archiver
  11. CC    = cc#        # C compiler
  12. CFLAGS    = -O#        # C compiler options
  13. INCDIR    = /usr/include#    # include directory
  14. LIB    = blkio#    # library name
  15. LIBDIR    = /usr/lib#    # library directory
  16. LLIBDIR    = /usr/lib#    # lint library directory
  17. LINT    = lint -b -p -o $(LIB)
  18. MAN    = $(LIB).man#    # manual file
  19.  
  20. FILES =    makefile   xtend.h                    \
  21.     errlog.c   xalloc.c   xstring.c
  22. MANS =    xtend.h                            \
  23.     errlog.c   xalloc.c   xstring.c
  24. SRCS =    errlog.c   xalloc.c   xstring.c
  25. OBJS =    $(SRCS:.c=.o)
  26. MODS =    $(LIB)(errlog.o)   $(LIB)(xalloc.o)   $(LIB)(xstring.o)
  27.  
  28. all:    $(LIB) man install
  29.  
  30. $(LIB):    $(MODS)
  31.     @echo $(LIB) up-to-date.
  32.  
  33. $(MODS):    blkio.h blkio_.h
  34.  
  35. install:
  36.     @if test -s $(INCDIR)/blkio.h = 0;            \
  37.     then                            \
  38.         echo $(INCDIR)/blkio.h exists\.;        \
  39.         echo -n "Do you wish to copy over it? ";    \
  40.         read response;                    \
  41.         case $$response in                \
  42.         y | Y | yes | YES | Yes)    ;;        \
  43.         *) exit 1            ;;        \
  44.         esac                        \
  45.     fi;                            \
  46.     cp blkio.h $(INCDIR)
  47.     @if test -s $(LIBDIR)/lib$(LIB).a = 0;            \
  48.     then                            \
  49.         echo $(LIBDIR)/lib$(LIB).a exists\.;        \
  50.         echo -n "Do you wish to copy over it? ";    \
  51.         read response;                    \
  52.         case $$response in                \
  53.         y | Y | yes | YES | Yes)    ;;        \
  54.         *) exit 1            ;;        \
  55.         esac                        \
  56.     fi;                            \
  57.     cp $(LIB) $(LIBDIR)/lib$(LIB).a
  58.     @echo $(LIB) installed.
  59.  
  60. lint:
  61.     $(LINT) $(SRCS)
  62.     mv llib-l$(LIB).ln $(LLIBDIR)
  63.  
  64. man:    $(MAN)
  65.  
  66. $(MAN):    $(MANS)
  67.     cat $(MANS) | manx > $@
  68.  
  69. clean:
  70.     rm $(LIB)
  71.     rm *.o
  72.     rm *.man
  73.  
  74. # eof
  75.