xref: /titanic_52/usr/src/cmd/cmd-inet/usr.lib/mdnsd/Makefile (revision 25c28e83beb90e7c80452a7c818c5e6f73a07dc8)
1#
2# CDDL HEADER START
3#
4# The contents of this file are subject to the terms of the
5# Common Development and Distribution License (the "License").
6# You may not use this file except in compliance with the License.
7#
8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9# or http://www.opensolaris.org/os/licensing.
10# See the License for the specific language governing permissions
11# and limitations under the License.
12#
13# When distributing Covered Code, include this CDDL HEADER in each
14# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15# If applicable, add the following below this CDDL HEADER, with the
16# fields enclosed by brackets "[]" replaced with your own identifying
17# information: Portions Copyright [yyyy] [name of copyright owner]
18#
19# CDDL HEADER END
20#
21# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
22# Use is subject to license terms.
23#
24
25PROG=		mdnsd
26MANIFEST=	multicast.xml
27
28CMN_DIR=	$(SRC)/lib/libdns_sd/common
29CMN_OBJS=	dnssd_ipc.o
30CMN_SRCS=	$(CMN_OBJS:%.o=$(CMN_DIR)/%.c)
31
32LOCAL_OBJS=	DNSCommon.o DNSDigest.o GenLinkedList.o \
33		PlatformCommon.o PosixDaemon.o \
34		mDNS.o mDNSDebug.o mDNSPosix.o mDNSUNP.o \
35		uDNS.o uds_daemon.o
36LOCAL_SRCS=     $(LOCAL_OBJS:%.o=%.c)
37
38SRCS=		$(LOCAL_SRCS) $(CMN_SRCS)
39OBJS=	 	$(LOCAL_OBJS) $(CMN_OBJS)
40
41
42MDNSFLAGS=	-DNOT_HAVE_DAEMON -DNOT_HAVE_SA_LEN \
43		-DLOG_PERROR=0 -DHAVE_SOLARIS \
44		-D_XPG4_2 -D__EXTENSIONS__ -DHAVE_BROKEN_RECVIF_NAME \
45		-DHAVE_IPV6=1 -Dasm=__asm -DMDNSD_NOROOT \
46		-DPID_FILE=\"\" -DMDNSD_USER=\"noaccess\" \
47		-DMDNS_VERSIONSTR_NODTS
48
49include	../../../Makefile.cmd
50
51CERRWARN +=	-_gcc=-Wno-unused-variable
52CERRWARN +=	-_gcc=-Wno-implicit-function-declaration
53CERRWARN +=	-_gcc=-Wno-uninitialized
54
55ROOTMANIFESTDIR=	$(ROOTSVCNETWORKDNS)
56$(ROOTMANIFEST)		:= FILEMODE= 444
57
58.PARALLEL:      $(LOCAL_OBJS)
59.WAIT:          $(PROG)
60.KEEP_STATE:
61
62all:	$(PROG)
63
64$(PROG): $(OBJS)
65	$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
66	$(POST_PROCESS)
67
68include ../Makefile.lib
69
70C99MODE = $(C99_ENABLE)
71CPPFLAGS += -D_REENTRANT $(MDNSFLAGS) -I$(CMN_DIR)
72LDLIBS += -lsocket -lnsl
73
74install:	all $(ROOTLIBINETPROG) $(ROOTMANIFEST)
75
76%.o:		$(CMN_DIR)/%.c
77		$(COMPILE.c) $(OUTPUT_OPTION) $<
78		$(POST_PROCESS_O)
79
80check:		$(CHKMANIFEST)
81
82clean:
83	$(RM) $(OBJS)
84
85lint:		lint_SRCS
86
87include ../../../Makefile.targ
88