--- Makefile.orig 1995-03-06 14:00:20 UTC +++ Makefile @@ -5,19 +5,19 @@ endif # use cp backup option if you have gnu cp -CP=cp -CP=cp -b +#CP=cp +#CP=cp -b # where you want to install ifndef PREFIX -PREFIX=$(HOME) +PREFIX=/usr/local endif # which shell do we use for the cflow to script? # I know it works on bash on unix, it also should work with # msh on ms-dog ifndef CFLOW_SHELL -CFLOW_SHELL=/bin/bash +CFLOW_SHELL=$(PREFIX)/bin/bash endif # actual location of prcc @@ -39,12 +39,13 @@ LOADLIBES=-L$(HOME)/lib -ldmalloc endif -DEBUG=-g -OPT=-O -CFLAGS=-Wall $(DEBUG) $(OPT) $(DEFS) +#DEBUG=-g +#OPT=-O +CFLAGS+=$(DEBUG) $(OPT) $(DEFS) # set this to where to install -BINDIR=$(PREFIX)/bin +BINDIR=$(DESTDIR)$(PREFIX)/bin +MANDIR=$(DESTDIR)$(PREFIX)/share/man/man1 SRCS=cflow.sh prcc.c prcg.c @@ -64,17 +65,23 @@ prototypes: $(PROTOTYPES) -install: install-cflow install-bins +install: install-cflow install-bins install-man install-bins: $(BINDIR)/prcc $(BINDIR)/prcg install-cflow: $(BINDIR)/cflow +install-man: $(MANDIR)/cflow.1.gz + $(BINDIR)/prcc $(BINDIR)/prcg: $(BINDIR)/%: % - $(CP) $^ $@ + $(BSD_INSTALL_PROGRAM) $^ $@ $(BINDIR)/cflow: cflow - $(CP) $^ $@ + $(BSD_INSTALL_SCRIPT) $^ $@ + +$(MANDIR)/cflow.1.gz: cflow.1 + $(BSD_INSTALL_MAN) $^ $(MANDIR) + gzip -9nf $(MANDIR)/cflow.1 cflow: cflow.sh sed -e "s;@CFLOW_SHELL@;$(CFLOW_SHELL);g" \