1#
2# Copyright (c) 2005-2006 The FreeBSD Project
3# All rights reserved.
4# Author: Victor Cruceru <soc-victor@freebsd.org>
5#
6# Redistribution of this software and documentation and use in source and
7# binary forms, with or without modification, are permitted provided that
8# the following conditions are met:
9#
10# 1. Redistributions of source code or documentation must retain the above
11#    copyright notice, this list of conditions and the following disclaimer.
12# 2. Redistributions in binary form must reproduce the above copyright
13#    notice, this list of conditions and the following disclaimer in the
14#    documentation and/or other materials provided with the distribution.
15#
16# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
17# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26# SUCH DAMAGE.
27#
28#
29
30LPRSRC=	${SRCTOP}/usr.sbin/lpr/common_source
31.PATH: ${LPRSRC}
32
33MOD=	hostres
34SRCS=	hostres_begemot.c		\
35	hostres_device_tbl.c		\
36	hostres_diskstorage_tbl.c	\
37	hostres_fs_tbl.c		\
38	hostres_network_tbl.c		\
39	hostres_partition_tbl.c		\
40	hostres_printer_tbl.c		\
41	hostres_processor_tbl.c		\
42	hostres_scalars.c		\
43	hostres_snmp.c			\
44	hostres_storage_tbl.c		\
45	hostres_swinstalled_tbl.c	\
46	hostres_swrun_tbl.c		\
47	printcap.c
48
49#Not having NDEBUG defined will enable assertions and a lot of output on stderr
50CFLAGS+= -DNDEBUG -I${LPRSRC}
51XSYM=	host hrStorageOther hrStorageRam hrStorageVirtualMemory \
52	hrStorageFixedDisk hrStorageRemovableDisk hrStorageFloppyDisk \
53	hrStorageCompactDisc hrStorageRamDisk hrStorageFlashMemory \
54	hrStorageNetworkDisk hrDeviceOther hrDeviceUnknown \
55	hrDeviceProcessor hrDeviceNetwork hrDevicePrinter \
56	hrDeviceDiskStorage hrDeviceVideo hrDeviceAudio \
57	hrDeviceCoprocessor hrDeviceKeyboard hrDeviceModem \
58	hrDeviceParallelPort hrDevicePointing \
59	hrDeviceSerialPort hrDeviceTape hrDeviceClock \
60	hrDeviceVolatileMemory hrDeviceNonVolatileMemory \
61	hrFSOther hrFSUnknown hrFSBerkeleyFFS hrFSSys5FS hrFSFat\
62	hrFSHPFS hrFSHFS hrFSMFS hrFSNTFS hrFSVNode hrFSJournaled \
63	hrFSiso9660 hrFSRockRidge hrFSNFS hrFSNetware hrFSAFS hrFSDFS \
64	hrFSAppleshare hrFSRFS hrFSDGCFS hrFSBFS hrFSFAT32 hrFSLinuxExt2
65
66MAN=	snmp_hostres.3
67
68DEFS=	${MOD}_tree.def
69BMIBS=	BEGEMOT-HOSTRES-MIB.txt
70
71LIBADD=	kvm devinfo m geom memstat
72
73.include <bsd.snmpmod.mk>
74
75printcap.pico: printcap.c
76	${CC} ${PICFLAG} -DPIC ${CFLAGS:C/^-W.*//} -c ${.IMPSRC} -o ${.TARGET}
77