home *** CD-ROM | disk | FTP | other *** search
Makefile | 1991-08-29 | 2.1 KB | 100 lines |
- # Makefile - Makefile for dls
- #
- # Copyright (c) 1991 Tim Cook.
- # Non-profit distribution allowed. See README for details.
- #
- # $Header: Makefile 1.6 91/08/21 $
-
- # This may need tweaking (the "seq" library is where getopt hides on DYNIX)
- LIBS = -lndbm
- #LIBS = -ldbm -lseq
-
- # Take out strpbrk.o if you have it in a library
- EXTRAS = strpbrk.o perror2.o
-
- # You will have to make this shorter if you are on System V
- SPLIT_PATH = split_pathname
- #SPLIT_PATH = split_path
-
- # If you don't like 'em, change 'em.
- BINDIR = /usr/local/bin
- DOCDIR = /usr/local/man
-
- # This is what _I_ do. You will no doubt have to change these. See
- # the "install" target as well.
- INSTALLBIN = root install -c -s -o bin -g cs -m 751
- #INSTALLBIN = install -c -s -m 751
- INSTALLDOC = root install -c -m 644
- #INSTALLDOC = install -c -m 644
-
- SHAR = shar -w
-
- # Alter these to taste.
- COPT = -O
- #COPT = -g
- CFLAGS = $(COPT) -I.
- LDFLAGS = $(COPT)
-
- SOURCE = config.h list.h dl.c describe.c list.c allocate.c \
- pathname.c $(SPLIT_PATH).c getdesc.c setdesc.c \
- enddesc.c dl.1 describe.1 getdesc.3 strpbrk.c \
- perror2.c
-
- DL_REQ = getdesc.o enddesc.o pathname.o list.o allocate.o \
- $(SPLIT_PATH).o
-
- DESCRIBE_REQ = getdesc.o setdesc.o enddesc.o pathname.o \
- $(SPLIT_PATH).o $(EXTRAS)
-
- ..SUFFIXES : .1 .0
-
- # How to make a man page
- ..1.0:
- nroff -man $*.1 > $@
-
-
- all : dl describe
-
- doc : dl.0 describe.0 getdesc.0
-
- getdesc.0 : getdesc.3
- nroff -man $*.3 > $@
-
- # You will probably want to change this
- install : all doc
- $(INSTALLBIN) dl $(BINDIR)
- $(INSTALLBIN) describe $(BINDIR)
- $(INSTALLDOC) dl.0 $(DOCDIR)/cat1
- $(INSTALLDOC) describe.0 $(DOCDIR)/cat1
- $(INSTALLDOC) getdesc.0 $(DOCDIR)/cat3
-
- shar :
- $(SHAR) README INSTALL Makefile $(SOURCE) > dl.shar
-
- dl : dl.o $(DL_REQ)
- $(CC) $(LDFLAGS) -o $@ dl.o $(DL_REQ) $(LIBS)
-
- describe : describe.o $(DESCRIBE_REQ)
- $(CC) $(LDFLAGS) -o $@ describe.o $(DESCRIBE_REQ) $(LIBS)
-
- dl.c : config.h list.h
-
- describe.c : config.h
-
- getdesc.c : config.h
-
- setdesc.c : config.h
-
- enddesc.c : config.h
-
- list.c : config.h list.h
-
- allocate.c : config.h
-
- pathname.c : config.h
-
- $(SPLIT_PATH).c : config.h
-
- strpbrk.o : strpbrk.c
- $(CC) -c -O $*.c
-