Makefile revision 5895:f251acdd9bdc
11590Srgrimes#
21590Srgrimes# CDDL HEADER START
31590Srgrimes#
41590Srgrimes# The contents of this file are subject to the terms of the
51590Srgrimes# Common Development and Distribution License (the "License").
61590Srgrimes# You may not use this file except in compliance with the License.
71590Srgrimes#
81590Srgrimes# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
91590Srgrimes# or http://www.opensolaris.org/os/licensing.
101590Srgrimes# See the License for the specific language governing permissions
111590Srgrimes# and limitations under the License.
121590Srgrimes#
131590Srgrimes# When distributing Covered Code, include this CDDL HEADER in each
141590Srgrimes# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
151590Srgrimes# If applicable, add the following below this CDDL HEADER, with the
161590Srgrimes# fields enclosed by brackets "[]" replaced with your own identifying
171590Srgrimes# information: Portions Copyright [yyyy] [name of copyright owner]
181590Srgrimes#
191590Srgrimes# CDDL HEADER END
201590Srgrimes#
211590Srgrimes#
221590Srgrimes# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
231590Srgrimes# Use is subject to license terms.
241590Srgrimes#
251590Srgrimes# ident	"%Z%%M%	%I%	%E% SMI"
261590Srgrimes#
271590Srgrimes
281590SrgrimesPROG =		ifconfig
291590SrgrimesROOTFS_PROG =	$(PROG)
301590SrgrimesLOCALOBJS=	ifconfig.o revarp.o
311590SrgrimesCOMMONOBJS=	compat.o
321590SrgrimesOBJS=		$(LOCALOBJS) $(COMMONOBJS)
331590Srgrimes
3441568Sarchieinclude ../../../Makefile.cmd
351590Srgrimesinclude ../../Makefile.cmd-inet
361590Srgrimes
3741568SarchieLOCALSRCS=	$(LOCALOBJS:%.o=%.c)
381590SrgrimesCOMMONSRCS=	$(CMDINETCOMMONDIR)/$(COMMONOBJS:%.o=%.c)
3999115SobrienSRCS=		$(LOCALSRCS) $(COMMONSRCS)
4099115Sobrien
411590SrgrimesCPPFLAGS +=	-I$(CMDINETCOMMONDIR) -I$(SRC)/common/net/dhcp
421590SrgrimesLDLIBS +=       -ldhcpagent -linetcfg -ldlpi
4327098ScharnierLINTFLAGS +=	-m
44131197Stjr
451590SrgrimesROOTUSRSBINLINKS = $(PROG:%=$(ROOTUSRSBIN)/%)
4643531Seivind
471590Srgrimes# ifconfig uses the ancillary data feature which is available only through
481590Srgrimes# UNIX 98 standards version of Socket interface. This interface is supposed to
491590Srgrimes# be accessed by -lxnet. In addition -lsocket and -lnsl are used to
5023693Speter# capture new not-yet-standard interfaces. Someday -lxnet alone should be
51131183Stjr# enough when IPv6 inspired new interfaces are part of standards.
521590SrgrimesLDLIBS +=	-lxnet -lsocket -lnsl
53227162Sed
54227162Sed# these #defines are required to use UNIX 98 interfaces
55227162Sed_D_UNIX98_EXTN= -D_XOPEN_SOURCE=500 -D__EXTENSIONS__
56227162Sed
57227162Sed$(OBJS)		:= CPPFLAGS +=	$(_D_UNIX98_EXTN)
58227162Sed
59227162SedLINTFLAGS +=	$(_D_UNIX98_EXTN)
60227162Sed
611590Srgrimes.KEEP_STATE:
62227162Sed
63227162Sedall:	$(ROOTFS_PROG)
64131226Stjr
65227162Sed$(PROG):	$(OBJS)
66227162Sed	$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
67227162Sed	$(POST_PROCESS)
68227162Sed
69227162Sedinstall:	all $(ROOTSBINPROG) $(ROOTUSRSBINLINKS)
70227162Sed
71227162Sed$(ROOTUSRSBINLINKS):
721590Srgrimes	-$(RM) $@; $(SYMLINK) ../../sbin/$(@F) $@
731590Srgrimes
74102944Sdwmaloneclean:
751590Srgrimes	$(RM) $(OBJS)
761590Srgrimes
77131194Stjrlint:	lint_SRCS
7897218Stjr
79131197Stjrinclude ../../../Makefile.targ
801590Srgrimes