home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 3 / 3930 / Makefile < prev    next >
Encoding:
Makefile  |  1991-08-29  |  2.1 KB  |  100 lines

  1. # Makefile -    Makefile for dls
  2. #
  3. # Copyright (c) 1991 Tim Cook.
  4. # Non-profit distribution allowed.  See README for details.
  5. #
  6. # $Header: Makefile 1.6 91/08/21 $
  7.  
  8. # This may need tweaking (the "seq" library is where getopt hides on DYNIX)
  9. LIBS =        -lndbm
  10. #LIBS =        -ldbm -lseq
  11.  
  12. # Take out strpbrk.o if you have it in a library
  13. EXTRAS =    strpbrk.o perror2.o
  14.  
  15. # You will have to make this shorter if you are on System V
  16. SPLIT_PATH =    split_pathname
  17. #SPLIT_PATH =    split_path
  18.  
  19. # If you don't like 'em, change 'em.
  20. BINDIR =    /usr/local/bin
  21. DOCDIR =    /usr/local/man
  22.  
  23. # This is what _I_ do.  You will no doubt have to change these.  See
  24. # the "install" target as well.
  25. INSTALLBIN =    root install -c -s -o bin -g cs -m 751
  26. #INSTALLBIN =    install -c -s -m 751
  27. INSTALLDOC =    root install -c -m 644
  28. #INSTALLDOC =    install -c -m 644
  29.  
  30. SHAR =        shar -w
  31.  
  32. # Alter these to taste.
  33. COPT =        -O
  34. #COPT =        -g
  35. CFLAGS =    $(COPT) -I.
  36. LDFLAGS =    $(COPT)
  37.  
  38. SOURCE =    config.h list.h dl.c describe.c list.c allocate.c \
  39.         pathname.c $(SPLIT_PATH).c getdesc.c setdesc.c \
  40.         enddesc.c dl.1 describe.1 getdesc.3 strpbrk.c \
  41.         perror2.c
  42.  
  43. DL_REQ =    getdesc.o enddesc.o pathname.o list.o allocate.o \
  44.         $(SPLIT_PATH).o
  45.  
  46. DESCRIBE_REQ =    getdesc.o setdesc.o enddesc.o pathname.o \
  47.         $(SPLIT_PATH).o $(EXTRAS)
  48.  
  49. ..SUFFIXES :    .1 .0
  50.  
  51. # How to make a man page
  52. ..1.0:
  53.     nroff -man $*.1 > $@
  54.  
  55.  
  56. all : dl describe
  57.  
  58. doc : dl.0 describe.0 getdesc.0
  59.  
  60. getdesc.0 : getdesc.3
  61.     nroff -man $*.3 > $@
  62.  
  63. # You will probably want to change this
  64. install : all doc
  65.     $(INSTALLBIN) dl $(BINDIR)
  66.     $(INSTALLBIN) describe $(BINDIR)
  67.     $(INSTALLDOC) dl.0 $(DOCDIR)/cat1
  68.     $(INSTALLDOC) describe.0 $(DOCDIR)/cat1
  69.     $(INSTALLDOC) getdesc.0 $(DOCDIR)/cat3
  70.  
  71. shar :
  72.     $(SHAR) README INSTALL Makefile $(SOURCE) > dl.shar
  73.  
  74. dl : dl.o $(DL_REQ)
  75.     $(CC) $(LDFLAGS) -o $@ dl.o $(DL_REQ) $(LIBS)
  76.  
  77. describe : describe.o $(DESCRIBE_REQ)
  78.     $(CC) $(LDFLAGS) -o $@ describe.o $(DESCRIBE_REQ) $(LIBS)
  79.  
  80. dl.c :    config.h list.h
  81.  
  82. describe.c : config.h
  83.  
  84. getdesc.c : config.h
  85.  
  86. setdesc.c : config.h
  87.  
  88. enddesc.c : config.h
  89.  
  90. list.c : config.h list.h
  91.  
  92. allocate.c : config.h
  93.  
  94. pathname.c : config.h
  95.  
  96. $(SPLIT_PATH).c : config.h
  97.  
  98. strpbrk.o : strpbrk.c
  99.     $(CC) -c -O $*.c
  100.