xref: /titanic_41/usr/src/cmd/cmd-inet/usr.lib/mdnsd/Makefile (revision c94146ce6d2a316eca6450a8cd77d8dee993f233)
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#ident	"%Z%%M%	%I%	%E% SMI"
25
26PROG=		mdnsd
27MANIFEST=	multicast.xml
28
29CMN_DIR=	$(SRC)/lib/libdns_sd/common
30CMN_OBJS=	dnssd_ipc.o
31CMN_SRCS=	$(CMN_OBJS:%.o=$(CMN_DIR)/%.c)
32
33LOCAL_OBJS=	DNSCommon.o DNSDigest.o GenLinkedList.o \
34		PlatformCommon.o PosixDaemon.o \
35		mDNS.o mDNSDebug.o mDNSPosix.o mDNSUNP.o \
36		uDNS.o uds_daemon.o
37LOCAL_SRCS=     $(LOCAL_OBJS:%.o=%.c)
38
39SRCS=		$(LOCAL_SRCS) $(CMN_SRCS)
40OBJS=	 	$(LOCAL_OBJS) $(CMN_OBJS)
41
42
43MDNSFLAGS=	-DNOT_HAVE_DAEMON -DNOT_HAVE_SA_LEN \
44		-DLOG_PERROR=0 -DHAVE_SOLARIS -DHAVE_SOLARIS_ZONES \
45		-D_XPG4_2 -D__EXTENSIONS__ -DHAVE_BROKEN_RECVIF_NAME \
46   		-DHAVE_IPV6=1 -Dasm=__asm -DMDNSD_NOROOT \
47		-DPID_FILE=\"\" -DMDNSD_USER=\"noaccess\" \
48		-DMDNS_VERSIONSTR_NODTS
49
50include	../../../Makefile.cmd
51
52ROOTMANIFESTDIR=	$(ROOTSVCNETWORKDNS)
53$(ROOTMANIFEST)		:= FILEMODE= 444
54
55.PARALLEL:      $(LOCAL_OBJS)
56.WAIT:          $(PROG)
57.KEEP_STATE:
58
59all:	$(PROG)
60
61$(PROG): $(OBJS)
62	$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
63	$(POST_PROCESS)
64
65include ../Makefile.lib
66
67C99MODE = $(C99_ENABLE)
68CPPFLAGS += -D_REENTRANT $(MDNSFLAGS) -I$(CMN_DIR)
69LDLIBS += -lsocket -lnsl
70
71install:	all $(ROOTLIBINETPROG) $(ROOTMANIFEST)
72
73%.o:		$(CMN_DIR)/%.c
74		$(COMPILE.c) $(OUTPUT_OPTION) $<
75		$(POST_PROCESS_O)
76
77check:		$(CHKMANIFEST)
78
79clean:
80	$(RM) $(OBJS)
81
82lint:		lint_SRCS
83
84include ../../../Makefile.targ
85