home *** CD-ROM | disk | FTP | other *** search
Makefile | 1988-11-14 | 2.9 KB | 130 lines |
- # $Header: Makefile,v 1.7 88/09/14 19:59:53 network Exp $
- #
- # Makefile for deliver
- #
- # +----------------+
- # | Things to make |
- # +----------------+
- #
- # deliver Compile and link the deliver program.
- # install Install deliver. (You must be root to do this.)
- # lint Run lint on all sources, creating lint.out.
- # shar Create distribution sharchives.
- # clean Clean up.
- # clobber Remove everything that can be regenerated.
- #
- # +---------------+
- # | Configuration |
- # +---------------+
- #
- # SHELL
- # I don't have to tell you...
- #
- # COPY
- # Your local copy program. SCO Xenix users may want to change this
- # to "copy -m" which preserves file modification time.
- #
- # SHAR
- # Your local sharchive generator.
- #
- # CFLAGS
- # Compile-time flags to cc.
- # For BSD systems, include "-DBSD".
- # For USG (System III and System V) systems, include "-DUSG".
- #
- # LDFLAGS
- # Link-time flags to cc. The -i flag creates pure (sharable) code.
- #
- # LIBS
- # Depending on your environment, you may or may not need to link
- # with "-lx". SCO Xenix System V needs it; Altos Xenix doesn't.
- #
- # BIN
- # Target directory for installation; /usr/bin is recommended.
- # You may use /usr/local/bin (or whatever), but you must be sure
- # that the directory you choose is in your PATH during mail
- # transmission and delivery.
- #
- # DELSHAR
- # Basename of sharchives created by "make shar".
- #
-
- SHELL = /bin/sh
- COPY = cp
- SHAR = shar
- CFLAGS = -O
- LDFLAGS = -i
- LIBS = -lx
- BIN = /usr/bin
- DELSHAR = deliver.sh
-
- #
- # The files that make up the deliver distribution.
- #
-
- DOCS = README deliver.8
- MF = Makefile
-
- HDRS = config.h context.h deliver.h dest.h patchlevel.h misc.h
-
- SRC1 = context.c copymsg.c debug.c dest.c dfile.c lock.c
- SRC2 = main.c mbox.c procs.c subs.c sysdep.c uucp.c
- SRCS = $(SRC1) $(SRC2)
-
- OBJS = context.o copymsg.o debug.o dest.o dfile.o lock.o \
- main.o mbox.o procs.o subs.o sysdep.o uucp.o
-
- all: deliver
- deliver: $(OBJS)
- $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
- $(OBJS): $(HDRS)
-
- clean::
- rm -f $(OBJS)
-
- #
- # This is a klugy way to determine if you are root or not.
- # I'm open to suggestions! (Remember that 'su' counts.)
- #
-
- install: deliver
- @if [ ! -w /etc ]; \
- then \
- echo ""; \
- echo "Sorry! You must be root to install deliver."; \
- exit 1; \
- fi
- $(COPY) deliver $(BIN)/deliver
- chgrp root $(BIN)/deliver
- chown root $(BIN)/deliver
- chmod 4711 $(BIN)/deliver
-
- clobber::
- rm -f deliver
-
- #
- # Look for fuzz.
- #
-
- lint: lint.out
- lint.out: $(HDRS) $(SRCS)
- lint $(SRCS) -lc $(LIBS) >lint.out
-
- clean::
- rm -f lint.out
-
- #
- # Make distribution sharchives.
- #
-
- shar: $(DELSHAR).01 $(DELSHAR).02 $(DELSHAR).03
- $(DELSHAR).01: $(DOCS) $(MF) $(HDRS)
- $(SHAR) >$@ $(DOCS) $(MF) $(HDRS)
- $(DELSHAR).02: $(SRC1)
- $(SHAR) >$@ $(SRC1)
- $(DELSHAR).03: $(SRC2)
- $(SHAR) >$@ $(SRC2)
-
- clobber::
- rm -f $(DELSHAR).??
-