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
208a7aa2a5SYuri Pankov#
218a7aa2a5SYuri Pankov
227c478bd9Sstevel@tonic-gate#
236e91bba0SGirish Moodalbail# Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
247c478bd9Sstevel@tonic-gate# Use is subject to license terms.
257c478bd9Sstevel@tonic-gate#
265661bb76SJohn Levon# Copyright (c) 2018, Joyent, Inc.
277c478bd9Sstevel@tonic-gate
287c478bd9Sstevel@tonic-gatePROG=		in.ndpd
2969bb4bb4ScarlsonjOBJS=		config.o main.o ndp.o tables.o trace.o
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
398a7aa2a5SYuri Pankov# be accessed by -lxnet. In addition -lsocket is 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.
428a7aa2a5SYuri PankovLDLIBS +=	-ldhcpagent -lxnet -lsocket -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
476e91bba0SGirish Moodalbail$(OBJS)		:= CPPFLAGS +=  $(_D_UNIX98_EXTN)
487c478bd9Sstevel@tonic-gate
497014882cSRichard LoweCERRWARN += -_gcc=-Wno-switch
50*d3b5f563SJohn LevonCERRWARN += $(CNOWARN_UNINIT)
517014882cSRichard Lowe
525661bb76SJohn Levon# not linted
535661bb76SJohn LevonSMATCH=off
545661bb76SJohn Levon
556e91bba0SGirish MoodalbailCTFCONVERT_HOOK = && $(CTFCONVERT_O)
566e91bba0SGirish MoodalbailCTFMERGE_HOOK = && $(CTFMERGE) -L VERSION -o $@ $(OBJS)
576e91bba0SGirish Moodalbail$(OBJS) := CFLAGS += $(CTF_FLAGS)
586e91bba0SGirish Moodalbail
597c478bd9Sstevel@tonic-gate.KEEP_STATE:
607c478bd9Sstevel@tonic-gate
617c478bd9Sstevel@tonic-gate.PARALLEL:  $(OBJS)
627c478bd9Sstevel@tonic-gate
637c478bd9Sstevel@tonic-gateall: $(PROG)
647c478bd9Sstevel@tonic-gate
657c478bd9Sstevel@tonic-gate$(PROG): $(OBJS)
666e91bba0SGirish Moodalbail	$(LINK.c) $(OBJS) -o $@ $(LDLIBS) $(CTFMERGE_HOOK)
677c478bd9Sstevel@tonic-gate	$(POST_PROCESS)
687c478bd9Sstevel@tonic-gate
697c478bd9Sstevel@tonic-gateinclude		../Makefile.lib
707c478bd9Sstevel@tonic-gate
71a192e900Samaguireinstall: all $(ROOTLIBINETPROG) $(ROOTMANIFEST) $(ROOTSVCMETHOD)
72a192e900Samaguire
73a192e900Samaguirecheck:	$(CHKMANIFEST)
747c478bd9Sstevel@tonic-gate
757c478bd9Sstevel@tonic-gateclean:
767c478bd9Sstevel@tonic-gate	$(RM) $(OBJS)
777c478bd9Sstevel@tonic-gate
787c478bd9Sstevel@tonic-gateinclude		../../../Makefile.targ
79