0N/A#
0N/A# CDDL HEADER START
0N/A#
0N/A# The contents of this file are subject to the terms of the
0N/A# Common Development and Distribution License (the "License").
0N/A# You may not use this file except in compliance with the License.
0N/A#
0N/A# You can obtain a copy of the license at CDDL.LICENSE.
0N/A# See the License for the specific language governing permissions
0N/A# and limitations under the License.
0N/A#
0N/A# When distributing Covered Code, include this CDDL HEADER in each
0N/A# file and include the License file at CDDL.LICENSE.
0N/A# If applicable, add the following below this CDDL HEADER, with the
0N/A# fields enclosed by brackets "[]" replaced with your own identifying
0N/A# information: Portions Copyright [yyyy] [name of copyright owner]
0N/A#
0N/A# CDDL HEADER END
0N/A#
0N/A
0N/A#
0N/A# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
0N/A# Use is subject to license terms.
0N/A#
0N/A
0N/A# Build scfdot, invoke it to generate a graph description, and run dot to
0N/A# render it to PostScript. The resulting file will be <hostname>.ps .
0N/A
0N/A# How to invoke dot on this system.
0N/ADOT = dot
0N/A
0N/A# Options to pass to scfdot. This limits the graph to 300" by 42", includes
0N/A# legend.ps as the legend (built below), and consolidates inetd services into
0N/A# a single node. See the comment at the top of scfdot.c for other options.
0N/ASCFDOTOPTS = -s 300,42 -l legend.ps -x consolidate_inetd_svcs
0N/A
0N/A# Margin, in inches, to include above and below the legend.
0N/ALEGEND_MARGIN = 3
0N/A
0N/A# Options to pass to dot when rendering the graph. Consider increasing
0N/A# mclimit, which dictates how long dot spends optimizing node placement. It
0N/A# defaults to 1.0; 100 should produce good output, but it may take a long
0N/A# time.
0N/ADOTOPTS =
0N/A#DOTOPTS = -Gmclimit=100
0N/A
0N/A
0N/AHOSTNAME:sh = hostname
0N/A
0N/Aall: $(HOSTNAME).ps
0N/A
0N/A%.ps: %.dot legend.ps
0N/A @# Redirect to /tmp so if the command fails, $@ won't be updated
0N/A $(DOT) -Tps $(DOTOPTS) $< > /tmp/$@
0N/A @# Setpage tells the plotter how big the page is
0N/A awk -f setpage.awk /tmp/$@ > $@
0N/A
0N/A$(HOSTNAME).dot: scfdot
0N/A ./scfdot $(SCFDOTOPTS) > $@
0N/A
0N/Ascfdot: scfdot.c
0N/A $(CC) -o scfdot scfdot.c -lscf
0N/A
0N/Alegend.ps: legend.dot enlarge.awk
0N/A $(DOT) -Tps legend.dot > /tmp/legend.ps
0N/A awk -f enlarge.awk top=$(LEGEND_MARGIN) bottom=$(LEGEND_MARGIN) \
0N/A /tmp/legend.ps > legend.ps
0N/A
0N/Alegend.dot: scfdot
0N/A ./scfdot -L > $@
0N/A
0N/Alint: scfdot.c
0N/A lint scfdot.c -lscf
0N/A
0N/Aclean:
0N/A rm -f $(HOSTNAME).dot $(HOSTNAME).ps legend.dot legend.ps scfdot