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# $FreeBSD$
29#
30
31LPRSRC=	${SRCTOP}/usr.sbin/lpr/common_source
32.PATH: ${LPRSRC}
33
34MOD=	hostres
35SRCS=	hostres_begemot.c		\
36	hostres_device_tbl.c		\
37	hostres_diskstorage_tbl.c	\
38	hostres_fs_tbl.c		\
39	hostres_network_tbl.c		\
40	hostres_partition_tbl.c		\
41	hostres_printer_tbl.c		\
42	hostres_processor_tbl.c		\
43	hostres_scalars.c		\
44	hostres_snmp.c			\
45	hostres_storage_tbl.c		\
46	hostres_swinstalled_tbl.c	\
47	hostres_swrun_tbl.c		\
48	printcap.c
49
50#Not having NDEBUG defined will enable assertions and a lot of output on stderr
51CFLAGS+= -DNDEBUG -I${LPRSRC}
52XSYM=	host hrStorageOther hrStorageRam hrStorageVirtualMemory \
53	hrStorageFixedDisk hrStorageRemovableDisk hrStorageFloppyDisk \
54	hrStorageCompactDisc hrStorageRamDisk hrStorageFlashMemory \
55	hrStorageNetworkDisk hrDeviceOther hrDeviceUnknown \
56	hrDeviceProcessor hrDeviceNetwork hrDevicePrinter \
57	hrDeviceDiskStorage hrDeviceVideo hrDeviceAudio \
58	hrDeviceCoprocessor hrDeviceKeyboard hrDeviceModem \
59	hrDeviceParallelPort hrDevicePointing \
60	hrDeviceSerialPort hrDeviceTape hrDeviceClock \
61	hrDeviceVolatileMemory hrDeviceNonVolatileMemory \
62	hrFSOther hrFSUnknown hrFSBerkeleyFFS hrFSSys5FS hrFSFat\
63	hrFSHPFS hrFSHFS hrFSMFS hrFSNTFS hrFSVNode hrFSJournaled \
64	hrFSiso9660 hrFSRockRidge hrFSNFS hrFSNetware hrFSAFS hrFSDFS \
65	hrFSAppleshare hrFSRFS hrFSDGCFS hrFSBFS hrFSFAT32 hrFSLinuxExt2
66
67MAN=	snmp_hostres.3
68
69DEFS=	${MOD}_tree.def
70BMIBS=	BEGEMOT-HOSTRES-MIB.txt
71
72LIBADD=	kvm devinfo m geom memstat
73
74.include <bsd.snmpmod.mk>
75
76printcap.pico: printcap.c
77	${CC} ${PICFLAG} -DPIC ${CFLAGS:C/^-W.*//} -c ${.IMPSRC} -o ${.TARGET}
78