home *** CD-ROM | disk | FTP | other *** search
Makefile | 1990-07-13 | 2.2 KB | 110 lines |
- #
- # fsfilt - filesystem filtering program for use with find.
- # Written by Mark H. Colburn
- # Copyright (C) 1987, Mark H. Colburn
- #
- # Permission is hereby granted to use or modify this program for any
- # non-commercial purpose.
- #
- # AUTHOR(S)
- # Mark H. Colburn
- #
- # %W% %G%
- #
- # HISTORY
- #
-
- HEADER =
- SOURCE = fsfilt.c
- OBJECT = fsfilt.o
- CFLAGS = -O
- LDFLAGS = -s
- SCCSDIR = .
- MAKEFILE = Makefile
- LINT = /usr/bin/lint -b -x -h
- PR = /usr/local/bin/cpr
- LP = lp
- GFLAGS =
-
- #
- # Program construction rules
- #
-
- fsfilt: $(OBJECT)
- cc $(LDFLAGS) $(OBJECT) -o fsfilt
-
- all: fsfilt
-
- #
- # Generic Makefile Rules
- #
-
- install: all
-
- build: $(SOURCE) $(HEADER) $(MAKEFILE)
-
- edit:
- @for file in $(SOURCE) $(HEADERS) $(MAKEFILE); do \
- if [ ! -w $$file]; then \
- get -e $(SCCSDIR)/s.$$file; \
- fi; \
- done
-
- delta:
- @for file in $(SOURCE) $(HEADERS) $(MAKEFILE); do \
- if [ -w $$file]; then \
- delta $(SCCSDIR)/s.$$file; \
- fi; \
- done
- rm -f $(SOURCE)
- rm -f $(HEADER)
- rm -f $(MAKEFILE)
- get $(GFLAGS) $(SCCSDIR)/s.$(MAKEFILE)
-
- clean:
- rm -f a.out core
- rm -f cosy
- rm -f $(OBJECT)
-
- clobber:
- rm -f $(OBJECT)
- rm -f $(SOURCE)
- rm -f $(HEADER)
- rm -f a.out core
-
- lint: $(HEADER) $(SOURCE)
- $(LINT) $(SOURCE)
-
- print: $(HEADER) $(SOURCE)
- $(PR) $(HEADER) $(SOURCE) | $(LP) -T"COSY cosy"
-
- depend:
- # For the moment we are lazy and disregard /usr/include files because
- # the sources contain them conditionally. Perhaps we should use cpp.
- # ( /bin/grep '^#[ ]*include' $$i | sed -n \
- # -e 's,<\(.*\)>,"/usr/include/\1",' \
- #
- for i in ${SOURCE}; do \
- ( /bin/grep '^#[ ]*include[ ]*"' $$i | sed -n \
- -e 's/[^"]*"\([^"]*\)".*/\1/' \
- -e H -e '$$g' -e '$$s/\n/ /g' \
- -e '$$s/.*/'$$i': &/' -e '$$s/\.c:/.o:/p' \
- >> makedep); done
- @echo '/^# DO NOT DELETE THIS LINE/+2,$$d' >eddep
- @echo '$$r makedep' >>eddep
- @echo 'w' >>eddep
- @echo 'q' >>eddep
- @cp $(MAKEFILE) $(MAKEFILE).bak
- ed - $(MAKEFILE) < eddep
- @rm -f eddep makedep
- @echo '# DEPENDENCIES MUST END AT END OF FILE' >> $(MAKEFILE)
- @echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY' >> $(MAKEFILE)
- @echo '# see make depend above' >> $(MAKEFILE)
- @rm -f $(MAKEFILE).bak
-
- # DO NOT DELETE THIS LINE
-
- # DEPENDENCIES MUST END AT END OF FILE
- # IF YOU PUT STUFF HERE IT WILL GO AWAY
- # see make depend above
-