17c478bd9Sstevel@tonic-gate# 27c478bd9Sstevel@tonic-gate# CDDL HEADER START 37c478bd9Sstevel@tonic-gate# 47c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the 569bb4bb4Scarlsonj# Common Development and Distribution License (the "License"). 669bb4bb4Scarlsonj# You may not use this file except in compliance with the License. 77c478bd9Sstevel@tonic-gate# 87c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 97c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing. 107c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions 117c478bd9Sstevel@tonic-gate# and limitations under the License. 127c478bd9Sstevel@tonic-gate# 137c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each 147c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 157c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the 167c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying 177c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner] 187c478bd9Sstevel@tonic-gate# 197c478bd9Sstevel@tonic-gate# CDDL HEADER END 207c478bd9Sstevel@tonic-gate# 21*6e91bba0SGirish Moodalbail# Copyright 2010 Sun Microsystems, Inc. All rights reserved. 227c478bd9Sstevel@tonic-gate# Use is subject to license terms. 237c478bd9Sstevel@tonic-gate# 247c478bd9Sstevel@tonic-gate# cmd/cmd-inet/usr.lib/in.ndpd/Makefile 257c478bd9Sstevel@tonic-gate# 267c478bd9Sstevel@tonic-gate 277c478bd9Sstevel@tonic-gatePROG= in.ndpd 2869bb4bb4ScarlsonjOBJS= config.o main.o ndp.o tables.o trace.o 297c478bd9Sstevel@tonic-gateSRCS= $(OBJS:%.o=%.c) 30a192e900SamaguireSVCMETHOD= svc-ndp 31a192e900SamaguireMANIFEST= ndp.xml 327c478bd9Sstevel@tonic-gate 337c478bd9Sstevel@tonic-gateinclude ../../../Makefile.cmd 347c478bd9Sstevel@tonic-gate 35a192e900SamaguireROOTMANIFESTDIR= $(ROOTSVCNETWORKROUTING) 36a192e900Samaguire 377c478bd9Sstevel@tonic-gate# in.ndpd uses the ancillary data feature which is available only through 387c478bd9Sstevel@tonic-gate# UNIX 98 standards version of Socket interface. This interface is supposed to 397c478bd9Sstevel@tonic-gate# be accessed by -lxnet. In addition -lsocket and -lnsl are used to 407c478bd9Sstevel@tonic-gate# capture new not-yet-standard interfaces. Someday -lxnet alone should be enough 417c478bd9Sstevel@tonic-gate# when IPv6 inspired new interfaces are part of standards. 42*6e91bba0SGirish MoodalbailLDLIBS += -ldhcpagent -lxnet -lsocket -lnsl -lipadm 437c478bd9Sstevel@tonic-gate 447c478bd9Sstevel@tonic-gate# these #defines are required to use UNIX 98 interfaces 457c478bd9Sstevel@tonic-gate_D_UNIX98_EXTN= -D_XOPEN_SOURCE=500 -D__EXTENSIONS__ 467c478bd9Sstevel@tonic-gate 47*6e91bba0SGirish Moodalbail$(OBJS) := CPPFLAGS += $(_D_UNIX98_EXTN) 487c478bd9Sstevel@tonic-gate 497c478bd9Sstevel@tonic-gateLINTFLAGS += $(_D_UNIX98_EXTN) 507c478bd9Sstevel@tonic-gate 5169bb4bb4Scarlsonj# This shouldn't be necessary, but linking with libxnet requires it. 5269bb4bb4ScarlsonjLINTFLAGS += -erroff=E_INCONS_ARG_DECL2 -erroff=E_INCONS_VAL_TYPE_DECL2 5369bb4bb4Scarlsonj 5469bb4bb4Scarlsonj# This is needed to avoid littering the code with useless LINTED statements 5569bb4bb4Scarlsonj# for each place where pointers are casted. It's not perfect, but being 5669bb4bb4Scarlsonj# perfect would require a bigger rewrite. 5769bb4bb4ScarlsonjLINTFLAGS += -erroff=E_BAD_PTR_CAST_ALIGN 5869bb4bb4Scarlsonj 59*6e91bba0SGirish MoodalbailCTFCONVERT_HOOK = && $(CTFCONVERT_O) 60*6e91bba0SGirish MoodalbailCTFMERGE_HOOK = && $(CTFMERGE) -L VERSION -o $@ $(OBJS) 61*6e91bba0SGirish Moodalbail$(OBJS) := CFLAGS += $(CTF_FLAGS) 62*6e91bba0SGirish Moodalbail 637c478bd9Sstevel@tonic-gate.KEEP_STATE: 647c478bd9Sstevel@tonic-gate 657c478bd9Sstevel@tonic-gate.PARALLEL: $(OBJS) 667c478bd9Sstevel@tonic-gate 677c478bd9Sstevel@tonic-gateall: $(PROG) 687c478bd9Sstevel@tonic-gate 697c478bd9Sstevel@tonic-gate$(PROG): $(OBJS) 70*6e91bba0SGirish Moodalbail $(LINK.c) $(OBJS) -o $@ $(LDLIBS) $(CTFMERGE_HOOK) 717c478bd9Sstevel@tonic-gate $(POST_PROCESS) 727c478bd9Sstevel@tonic-gate 737c478bd9Sstevel@tonic-gateinclude ../Makefile.lib 747c478bd9Sstevel@tonic-gate 75a192e900Samaguireinstall: all $(ROOTLIBINETPROG) $(ROOTMANIFEST) $(ROOTSVCMETHOD) 76a192e900Samaguire 77a192e900Samaguirecheck: $(CHKMANIFEST) 787c478bd9Sstevel@tonic-gate 797c478bd9Sstevel@tonic-gateclean: 807c478bd9Sstevel@tonic-gate $(RM) $(OBJS) 817c478bd9Sstevel@tonic-gate 827c478bd9Sstevel@tonic-gatelint: lint_SRCS 837c478bd9Sstevel@tonic-gate 847c478bd9Sstevel@tonic-gateinclude ../../../Makefile.targ 85