# main Makefile for apcupsd
#
# Copyright (C) 1999-2003 Riccardo Facchetti <riccardo@master.oasi.gpa.it>
#

# Default variables
@VARIABLES@
# TOP source directory.
topdir = @topdir@
top_builddir = $(topdir)

#
# this is a list of all subdirectories that contain Makefiles
# Warning: "autoconf" must always be the last.
# Warning: "platforms" must always be next to last.
#
subdirs = src include doc platforms autoconf

# Include the default make targets: to be put before the all-targets: rule.
@TARGETS@

all-targets: Makefile

install: install-directories install-subdirs

install-directories: install-dir@CGI@
	$(SHELL) $(MKINSTALLDIRS) $(DESTDIR)$(sbindir)	
	$(SHELL) $(MKINSTALLDIRS) $(DESTDIR)$(mandir)  
	@if [ ! -d $(DESTDIR)$(sysconfdir) ] ; then \
	      $(SHELL) $(MKINSTALLDIRS) $(DESTDIR)$(sysconfdir); \
	      chmod 755 $(DESTDIR)$(sysconfdir); \
	fi

install-dir: dummy

install-dircgi:
	@$(SHELL) $(MKINSTALLDIRS)  $(DESTDIR)$(cgibin)

uninstall: uninstall-subdirs

example_clean:
	(cd examples; $(MAKE) clean)

clean: example_clean targetclean
	find . -type f -size 0 -exec $(RMF) {} \;

example_distclean: example_clean
	(cd examples; $(MAKE) distclean)

distclean: example_distclean targetdistclean
	$(RMF) TAGS tags
	$(RMF) config.cache config.status config.log config.out stamp-config
	$(RMF) Makefile
	rm -rf CVS

# -----------------------------------------------------------------------
# DO NOT DELETE THIS LINE -- make depend depends on it.


syntax highlighted by Code2HTML, v. 0.9.1