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 307c478bd9Sstevel@tonic-gateSRCS= $(OBJS:%.o=%.c) 31a192e900SamaguireSVCMETHOD= svc-ndp 32a192e900SamaguireMANIFEST= ndp.xml 337c478bd9Sstevel@tonic-gate 347c478bd9Sstevel@tonic-gateinclude ../../../Makefile.cmd 357c478bd9Sstevel@tonic-gate 36a192e900SamaguireROOTMANIFESTDIR= $(ROOTSVCNETWORKROUTING) 37a192e900Samaguire 387c478bd9Sstevel@tonic-gate# in.ndpd uses the ancillary data feature which is available only through 397c478bd9Sstevel@tonic-gate# UNIX 98 standards version of Socket interface. This interface is supposed to 408a7aa2a5SYuri Pankov# be accessed by -lxnet. In addition -lsocket is used to 417c478bd9Sstevel@tonic-gate# capture new not-yet-standard interfaces. Someday -lxnet alone should be enough 427c478bd9Sstevel@tonic-gate# when IPv6 inspired new interfaces are part of standards. 438a7aa2a5SYuri PankovLDLIBS += -ldhcpagent -lxnet -lsocket -lipadm 447c478bd9Sstevel@tonic-gate 457c478bd9Sstevel@tonic-gate# these #defines are required to use UNIX 98 interfaces 467c478bd9Sstevel@tonic-gate_D_UNIX98_EXTN= -D_XOPEN_SOURCE=500 -D__EXTENSIONS__ 477c478bd9Sstevel@tonic-gate 486e91bba0SGirish Moodalbail$(OBJS) := CPPFLAGS += $(_D_UNIX98_EXTN) 497c478bd9Sstevel@tonic-gate 507c478bd9Sstevel@tonic-gateLINTFLAGS += $(_D_UNIX98_EXTN) 517c478bd9Sstevel@tonic-gate 5269bb4bb4Scarlsonj# This shouldn't be necessary, but linking with libxnet requires it. 5369bb4bb4ScarlsonjLINTFLAGS += -erroff=E_INCONS_ARG_DECL2 -erroff=E_INCONS_VAL_TYPE_DECL2 5469bb4bb4Scarlsonj 5569bb4bb4Scarlsonj# This is needed to avoid littering the code with useless LINTED statements 5669bb4bb4Scarlsonj# for each place where pointers are casted. It's not perfect, but being 5769bb4bb4Scarlsonj# perfect would require a bigger rewrite. 5869bb4bb4ScarlsonjLINTFLAGS += -erroff=E_BAD_PTR_CAST_ALIGN 5969bb4bb4Scarlsonj 607014882cSRichard LoweCERRWARN += -_gcc=-Wno-switch 61*d3b5f563SJohn LevonCERRWARN += $(CNOWARN_UNINIT) 627014882cSRichard Lowe 635661bb76SJohn Levon# not linted 645661bb76SJohn LevonSMATCH=off 655661bb76SJohn Levon 666e91bba0SGirish MoodalbailCTFCONVERT_HOOK = && $(CTFCONVERT_O) 676e91bba0SGirish MoodalbailCTFMERGE_HOOK = && $(CTFMERGE) -L VERSION -o $@ $(OBJS) 686e91bba0SGirish Moodalbail$(OBJS) := CFLAGS += $(CTF_FLAGS) 696e91bba0SGirish Moodalbail 707c478bd9Sstevel@tonic-gate.KEEP_STATE: 717c478bd9Sstevel@tonic-gate 727c478bd9Sstevel@tonic-gate.PARALLEL: $(OBJS) 737c478bd9Sstevel@tonic-gate 747c478bd9Sstevel@tonic-gateall: $(PROG) 757c478bd9Sstevel@tonic-gate 767c478bd9Sstevel@tonic-gate$(PROG): $(OBJS) 776e91bba0SGirish Moodalbail $(LINK.c) $(OBJS) -o $@ $(LDLIBS) $(CTFMERGE_HOOK) 787c478bd9Sstevel@tonic-gate $(POST_PROCESS) 797c478bd9Sstevel@tonic-gate 807c478bd9Sstevel@tonic-gateinclude ../Makefile.lib 817c478bd9Sstevel@tonic-gate 82a192e900Samaguireinstall: all $(ROOTLIBINETPROG) $(ROOTMANIFEST) $(ROOTSVCMETHOD) 83a192e900Samaguire 84a192e900Samaguirecheck: $(CHKMANIFEST) 857c478bd9Sstevel@tonic-gate 867c478bd9Sstevel@tonic-gateclean: 877c478bd9Sstevel@tonic-gate $(RM) $(OBJS) 887c478bd9Sstevel@tonic-gate 897c478bd9Sstevel@tonic-gatelint: lint_SRCS 907c478bd9Sstevel@tonic-gate 917c478bd9Sstevel@tonic-gateinclude ../../../Makefile.targ 92