# Generated automatically from Makefile.in by configure.
#
# Makefile for ipfm
# Copyright (c) 1999 Robert CHERAMY <tibob@via.ecp.fr>
#

include ./Makefile.common

all: binary docs

binary: Makefile source/Makefile
	@cd source && $(MAKE) && cd ..

docs: Makefile doc/Makefile
	@cd doc && $(MAKE) && cd ..

install: all
	$(INSTALL) -d -m 755 $(SBINDIR)
	$(INSTALL) -m 755 source/ipfm $(SBINDIR)/ipfm
	$(INSTALL) -d -m 755 $(ETCDIR)
	[ -f $(CONFIGFILE) ] || \
	  $(INSTALL) -m 644 ipfm.conf.sample $(CONFIGFILE)
	$(INSTALL) -d -m 755 $(MANDIR)/man5
	$(INSTALL) -d -m 755 $(MANDIR)/man8
	$(INSTALL) -m 644 doc/ipfm.conf.5 $(MANDIR)/man5/ipfm.conf.5
	$(INSTALL) -m 644 doc/ipfm.8 $(MANDIR)/man8/ipfm.8
	$(INSTALL) -d -m 755 $(LOGDIR)/ipfm

clean:
	@cd source && $(MAKE) clean && cd .. && \
	  cd doc && $(MAKE) clean && cd ..

distclean: clean
	$(RM) config.cache config.log config.status \
	  Makefile Makefile.common *~ core \
	  source/Makefile source/*~ source/core source/config.h \
	  doc/Makefile doc/*~

configdump:
	@echo "Configuration:" && \
	echo "   ipfm is in               ${exec_prefix}/sbin" && \
	echo "   man pages are in         ${prefix}/man" && \
	echo "   configuration file is    $(CONFIGFILE)" && \
	echo "   pid file is              $(PIDFILE)" && \
	echo "   log files are            $(LOGFILE)"

