xref: /illumos-gate/usr/src/cmd/hal/addons/network-devices/Makefile (revision 5801b0f01c3c34499a929ed96164a5a68b470945)
14e9cfc9aSjacobs#
24e9cfc9aSjacobs# CDDL HEADER START
34e9cfc9aSjacobs#
44e9cfc9aSjacobs# The contents of this file are subject to the terms of the
54e9cfc9aSjacobs# Common Development and Distribution License (the "License").
64e9cfc9aSjacobs# You may not use this file except in compliance with the License.
74e9cfc9aSjacobs#
84e9cfc9aSjacobs# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
94e9cfc9aSjacobs# or http://www.opensolaris.org/os/licensing.
104e9cfc9aSjacobs# See the License for the specific language governing permissions
114e9cfc9aSjacobs# and limitations under the License.
124e9cfc9aSjacobs#
134e9cfc9aSjacobs# When distributing Covered Code, include this CDDL HEADER in each
144e9cfc9aSjacobs# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
154e9cfc9aSjacobs# If applicable, add the following below this CDDL HEADER, with the
164e9cfc9aSjacobs# fields enclosed by brackets "[]" replaced with your own identifying
174e9cfc9aSjacobs# information: Portions Copyright [yyyy] [name of copyright owner]
184e9cfc9aSjacobs#
194e9cfc9aSjacobs# CDDL HEADER END
204e9cfc9aSjacobs#
214e9cfc9aSjacobs#
22fc3af78aSBasabi Bhattacharya# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
234e9cfc9aSjacobs# Use is subject to license terms.
244e9cfc9aSjacobs#
254e9cfc9aSjacobs#
264e9cfc9aSjacobs
274e9cfc9aSjacobsPROG =		hald-addon-network-discovery
284e9cfc9aSjacobsOBJS =		addon-network-discovery.o probe-snmp.o snmp.o logger.o cache.o common.o printer.o
294e9cfc9aSjacobs
304e9cfc9aSjacobsMANIFEST =	network-discovery.xml
314e9cfc9aSjacobsSVCMETHOD =	svc-network-discovery
324e9cfc9aSjacobs
334e9cfc9aSjacobsinclude ../../../Makefile.cmd
344e9cfc9aSjacobsinclude ../../Makefile.hal
354e9cfc9aSjacobs
364e9cfc9aSjacobsROOTMANIFESTDIR =	$(ROOTSVCNETWORK)
374e9cfc9aSjacobs$(ROOTMANIFEST) :=	FILEMODE = 444
384e9cfc9aSjacobs$(ROOTLIBSVCMETHOD)/$(SVCMETHOD):= FILEMODE = 555
394e9cfc9aSjacobs
404e9cfc9aSjacobsROOTCMDDIR =	$(ROOTLIB_HAL)
414e9cfc9aSjacobs
424e9cfc9aSjacobsLDLIBS +=	-lc -ldbus-1 -lhal -lglib-2.0 -ldbus-glib-1
434e9cfc9aSjacobsLDLIBS +=	-lnsl -lsocket
44fc3af78aSBasabi BhattacharyaLDLIBS +=	$(ZIGNORE) -lnetsnmp
45*5801b0f0SToomas SoomeNATIVE_LIBS +=	libdbus-1.so libglib-2.0.so libdbus-glib-1.so libnetsnmp.so
464e9cfc9aSjacobs
474e9cfc9aSjacobsCPPFLAGS +=	$(HAL_DBUS_CPPFLAGS) $(HAL_GLIB_CPPFLAGS) $(HAL_CONFIG_CPPFLAGS)
484e9cfc9aSjacobsCPPFLAGS +=	-I$(ROOT)/usr/include/hal -I../../hald -I../../utils
49bd0ce624SYuri PankovCSTD =	$(CSTD_GNU99)
504e9cfc9aSjacobs
514e9cfc9aSjacobs.KEEP_STATE:
524e9cfc9aSjacobs
534e9cfc9aSjacobsall: $(PROG)
544e9cfc9aSjacobs
554e9cfc9aSjacobsprobe-snmp.o: ../../probing/network-printer/probe-snmp.c
564e9cfc9aSjacobs	$(COMPILE.c) -o $@ ../../probing/network-printer/probe-snmp.c
574e9cfc9aSjacobs	$(POST_PROCESS_O)
584e9cfc9aSjacobs
594e9cfc9aSjacobslogger.o: ../../hald/logger.c
604e9cfc9aSjacobs	$(COMPILE.c) -o $@ ../../hald/logger.c
614e9cfc9aSjacobs	$(POST_PROCESS_O)
624e9cfc9aSjacobs
634e9cfc9aSjacobsprinter.o: ../../utils/printer.c
644e9cfc9aSjacobs	$(COMPILE.c) -o $@ ../../utils/printer.c
654e9cfc9aSjacobs	$(POST_PROCESS_O)
664e9cfc9aSjacobs
674e9cfc9aSjacobs$(PROG): $(OBJS)
684e9cfc9aSjacobs	$(LINK.c) -o $@ $(OBJS) $(LDLIBS)
694e9cfc9aSjacobs	$(POST_PROCESS)
704e9cfc9aSjacobs
714e9cfc9aSjacobsinstall: all $(ROOTCMD) $(ROOTMANIFEST) $(ROOTSVCMETHOD)
724e9cfc9aSjacobs
734e9cfc9aSjacobscheck: $(CHKMANIFEST)
744e9cfc9aSjacobs
754e9cfc9aSjacobsclean:
764e9cfc9aSjacobs	$(RM) $(OBJS) $(PROG)
774e9cfc9aSjacobs
784e9cfc9aSjacobsFRC:
794e9cfc9aSjacobs
804e9cfc9aSjacobsinclude ../../../Makefile.targ
81