xref: /illumos-gate/usr/src/cmd/cmd-inet/usr.lib/mdnsd/Makefile (revision 472cd20d26008f77084ade4c2048159b98c2b705)
14b22b933Srs200217#
24b22b933Srs200217# CDDL HEADER START
34b22b933Srs200217#
44b22b933Srs200217# The contents of this file are subject to the terms of the
54b22b933Srs200217# Common Development and Distribution License (the "License").
64b22b933Srs200217# You may not use this file except in compliance with the License.
74b22b933Srs200217#
84b22b933Srs200217# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
94b22b933Srs200217# or http://www.opensolaris.org/os/licensing.
104b22b933Srs200217# See the License for the specific language governing permissions
114b22b933Srs200217# and limitations under the License.
124b22b933Srs200217#
134b22b933Srs200217# When distributing Covered Code, include this CDDL HEADER in each
144b22b933Srs200217# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
154b22b933Srs200217# If applicable, add the following below this CDDL HEADER, with the
164b22b933Srs200217# fields enclosed by brackets "[]" replaced with your own identifying
174b22b933Srs200217# information: Portions Copyright [yyyy] [name of copyright owner]
184b22b933Srs200217#
194b22b933Srs200217# CDDL HEADER END
204b22b933Srs200217#
214b22b933Srs200217# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
224b22b933Srs200217# Use is subject to license terms.
235ffb0c9bSToomas Soome# Copyright 2016 Toomas Soome <tsoome@me.com>
244b22b933Srs200217#
255661bb76SJohn Levon# Copyright (c) 2018, Joyent, Inc.
264b22b933Srs200217
274b22b933Srs200217PROG=		mdnsd
284b22b933Srs200217MANIFEST=	multicast.xml
294b22b933Srs200217
30c65ebfc7SToomas SoomeSRCDIR=		$(SRC)/contrib/mDNSResponder
314b22b933Srs200217
32c65ebfc7SToomas SoomeOBJS=		DNSCommon.o DNSDigest.o GenLinkedList.o \
334b22b933Srs200217		PlatformCommon.o PosixDaemon.o \
344b22b933Srs200217		mDNS.o mDNSDebug.o mDNSPosix.o mDNSUNP.o \
35*472cd20dSToomas Soome		uDNS.o uds_daemon.o dnssd_ipc.o posix_utilities.o \
36*472cd20dSToomas Soome		ClientRequests.o
37c65ebfc7SToomas SoomeSRCS=		$(OBJS:%.o=%.c)
384b22b933Srs200217
395ffb0c9bSToomas SoomeMDNSFLAGS=	-DNOT_HAVE_SA_LEN \
405ffb0c9bSToomas Soome		-DLOG_PERROR=0 -DHAVE_SOLARIS -DTARGET_OS_SOLARIS \
414b22b933Srs200217		-D_XPG4_2 -D__EXTENSIONS__ -DHAVE_BROKEN_RECVIF_NAME \
424b22b933Srs200217		-DHAVE_IPV6=1 -Dasm=__asm -DMDNSD_NOROOT \
433b427fadSrs200217		-DPID_FILE=\"\" -DMDNSD_USER=\"noaccess\" \
44*472cd20dSToomas Soome		-DmDNSResponderVersion=1310.80.1
454b22b933Srs200217
464b22b933Srs200217include	../../../Makefile.cmd
474b22b933Srs200217
485661bb76SJohn LevonCERRWARN +=	-_gcc=-Wno-unused-variable
495661bb76SJohn LevonCERRWARN +=	-_gcc=-Wno-implicit-function-declaration
50*472cd20dSToomas SoomeCERRWARN +=	-_gcc7=-Wno-expansion-to-defined
51*472cd20dSToomas SoomeCERRWARN +=	-_gcc10=-Wno-expansion-to-defined
52d3b5f563SJohn LevonCERRWARN +=	$(CNOWARN_UNINIT)
535661bb76SJohn Levon
545661bb76SJohn Levon# not linted
555661bb76SJohn LevonSMATCH=off
565661bb76SJohn Levon
574b22b933Srs200217ROOTMANIFESTDIR=	$(ROOTSVCNETWORKDNS)
584b22b933Srs200217$(ROOTMANIFEST)		:= FILEMODE= 444
594b22b933Srs200217
60c65ebfc7SToomas Soome.PARALLEL:      $(OBJS)
614b22b933Srs200217.WAIT:          $(PROG)
624b22b933Srs200217.KEEP_STATE:
634b22b933Srs200217
644b22b933Srs200217all:	$(PROG)
654b22b933Srs200217
664b22b933Srs200217$(PROG): $(OBJS)
674b22b933Srs200217	$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
684b22b933Srs200217	$(POST_PROCESS)
694b22b933Srs200217
704b22b933Srs200217include ../Makefile.lib
714b22b933Srs200217
72bd0ce624SYuri PankovCSTD= $(CSTD_GNU99)
73c65ebfc7SToomas SoomeCPPFLAGS += -D_REENTRANT $(MDNSFLAGS)
74c65ebfc7SToomas SoomeCPPFLAGS += -I$(SRCDIR)/mDNSShared -I$(SRCDIR)/mDNSPosix
75c65ebfc7SToomas SoomeCPPFLAGS += -I$(SRCDIR)/mDNSCore
764b22b933Srs200217LDLIBS += -lsocket -lnsl
774b22b933Srs200217
784b22b933Srs200217install:	all $(ROOTLIBINETPROG) $(ROOTMANIFEST)
794b22b933Srs200217
80c65ebfc7SToomas Soome%.o:		$(SRCDIR)/mDNSCore/%.c
81c65ebfc7SToomas Soome		$(COMPILE.c) $(OUTPUT_OPTION) $<
82c65ebfc7SToomas Soome		$(POST_PROCESS_O)
83c65ebfc7SToomas Soome
84c65ebfc7SToomas Soome%.o:		$(SRCDIR)/mDNSShared/%.c
85c65ebfc7SToomas Soome		$(COMPILE.c) $(OUTPUT_OPTION) $<
86c65ebfc7SToomas Soome		$(POST_PROCESS_O)
87c65ebfc7SToomas Soome
88c65ebfc7SToomas Soome%.o:		$(SRCDIR)/mDNSPosix/%.c
894b22b933Srs200217		$(COMPILE.c) $(OUTPUT_OPTION) $<
904b22b933Srs200217		$(POST_PROCESS_O)
914b22b933Srs200217
924b22b933Srs200217check:		$(CHKMANIFEST)
934b22b933Srs200217
944b22b933Srs200217clean:
954b22b933Srs200217	$(RM) $(OBJS)
964b22b933Srs200217
974b22b933Srs200217include ../../../Makefile.targ
98