Makefile revision d62bc4badc1c1f1549c961cfb8b420e650e1272b
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
990d0e893f5b70e735cdf990af66e9ec6e91fa78Tinderbox User# CDDL HEADER START
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# The contents of this file are subject to the terms of the
4a14ce5ba00ab7bc55c99ffdcf59c7a4ab902721Automatic Updater# Common Development and Distribution License (the "License").
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# You may not use this file except in compliance with the License.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# or http://www.opensolaris.org/os/licensing.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# See the License for the specific language governing permissions
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# and limitations under the License.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# When distributing Covered Code, include this CDDL HEADER in each
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# If applicable, add the following below this CDDL HEADER, with the
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# fields enclosed by brackets "[]" replaced with your own identifying
ea94d370123a5892f6c47a97f21d1b28d44bb168Tinderbox User# information: Portions Copyright [yyyy] [name of copyright owner]
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# CDDL HEADER END
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
e21a2904f02a03fa06b6db04d348f65fe9c67b2bMark Andrews# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Use is subject to license terms.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews#
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updater# ident "%Z%%M% %I% %E% SMI"
c3dc968140ab7f04795acc7835e4e89ccb0c0a27Tinderbox User#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsPROG = ifconfig
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsROOTFS_PROG = $(PROG)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsLOCALOBJS= ifconfig.o revarp.o
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCOMMONOBJS= compat.o
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsOBJS= $(LOCALOBJS) $(COMMONOBJS)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
0a7ed88633a680bb881868b75ded4d09a7bbbc50Automatic Updaterinclude ../../../Makefile.cmd
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsinclude ../../Makefile.cmd-inet
c3dc968140ab7f04795acc7835e4e89ccb0c0a27Tinderbox User
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsLOCALSRCS= $(LOCALOBJS:%.o=%.c)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCOMMONSRCS= $(CMDINETCOMMONDIR)/$(COMMONOBJS:%.o=%.c)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsSRCS= $(LOCALSRCS) $(COMMONSRCS)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsCPPFLAGS += -I$(CMDINETCOMMONDIR) -I$(SRC)/common/net/dhcp
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsLDLIBS += -ldhcpagent -linetcfg -ldlpi
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsLINTFLAGS += -m
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsROOTUSRSBINLINKS = $(PROG:%=$(ROOTUSRSBIN)/%)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# ifconfig uses the ancillary data feature which is available only through
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# UNIX 98 standards version of Socket interface. This interface is supposed to
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# be accessed by -lxnet. In addition -lsocket and -lnsl are used to
6f1205897504b8f50b1785975482c995888dd630Tinderbox User# capture new not-yet-standard interfaces. Someday -lxnet alone should be
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# enough when IPv6 inspired new interfaces are part of standards.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsLDLIBS += -lxnet -lsocket -lnsl
6f1205897504b8f50b1785975482c995888dd630Tinderbox User
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# these #defines are required to use UNIX 98 interfaces
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews_D_UNIX98_EXTN= -D_XOPEN_SOURCE=500 -D__EXTENSIONS__
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews$(OBJS) := CPPFLAGS += $(_D_UNIX98_EXTN)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsLINTFLAGS += $(_D_UNIX98_EXTN)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews.KEEP_STATE:
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsall: $(ROOTFS_PROG)
6f1205897504b8f50b1785975482c995888dd630Tinderbox User
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews$(PROG): $(OBJS)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(LINK.c) $(OBJS) -o $@ $(LDLIBS)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews $(POST_PROCESS)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrewsinstall: all $(ROOTSBINPROG) $(ROOTUSRSBINLINKS)
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews$(ROOTUSRSBINLINKS):
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews -$(RM) $@; $(SYMLINK) ../../sbin/$(@F) $@
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
2895f101b5585a19015ac2c2c1e1812ac467fa12Automatic Updaterclean:
2895f101b5585a19015ac2c2c1e1812ac467fa12Automatic Updater $(RM) $(OBJS)
2895f101b5585a19015ac2c2c1e1812ac467fa12Automatic Updater
2895f101b5585a19015ac2c2c1e1812ac467fa12Automatic Updaterlint: lint_SRCS
2895f101b5585a19015ac2c2c1e1812ac467fa12Automatic Updater
2895f101b5585a19015ac2c2c1e1812ac467fa12Automatic Updaterinclude ../../../Makefile.targ
2895f101b5585a19015ac2c2c1e1812ac467fa12Automatic Updater