xref: /onnv-gate/usr/src/cmd/fs.d/nfs/nfsmapid/Makefile (revision 11291:80bdcd03e626)
10Sstevel@tonic-gate#
20Sstevel@tonic-gate# CDDL HEADER START
30Sstevel@tonic-gate#
40Sstevel@tonic-gate# The contents of this file are subject to the terms of the
51741Srmesta# Common Development and Distribution License (the "License").
61741Srmesta# You may not use this file except in compliance with the License.
70Sstevel@tonic-gate#
80Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
90Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
100Sstevel@tonic-gate# See the License for the specific language governing permissions
110Sstevel@tonic-gate# and limitations under the License.
120Sstevel@tonic-gate#
130Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
140Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
150Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
160Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
170Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
180Sstevel@tonic-gate#
190Sstevel@tonic-gate# CDDL HEADER END
200Sstevel@tonic-gate#
210Sstevel@tonic-gate#
2210314SRod.Evans@Sun.COM# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
232248Sraf# Use is subject to license terms.
240Sstevel@tonic-gate#
250Sstevel@tonic-gate
261741SrmestaFSTYPE	  =	nfs
271741SrmestaTYPEPROG  =	nfsmapid
281741SrmestaTESTPROG  =	nfsmapid_test
291741SrmestaATTMK	  =	$(TYPEPROG)
300Sstevel@tonic-gate
310Sstevel@tonic-gateinclude		../../Makefile.fstype
320Sstevel@tonic-gate
331741SrmestaLDLIBS   +=	-L$(ROOT)/usr/lib/nfs -R/usr/lib/nfs
3410314SRod.Evans@Sun.COMLDLIBS   +=	-lnsl -lmapid -ldtrace -lidmap
35*11291SRobert.Thurlow@Sun.COMCOMMON    =	nfs_resolve.o
36*11291SRobert.Thurlow@Sun.COMSRCS	  =	nfsmapid.c ../lib/nfs_resolve.c nfsmapid_server.c
371741SrmestaDSRC	  =	nfsmapid_dt.d
381741SrmestaDOBJ	  =	$(DSRC:%.d=%.o)
39*11291SRobert.Thurlow@Sun.COMOBJS	  =	nfsmapid.o nfsmapid_server.o $(COMMON)
401741SrmestaCPPFLAGS +=	-I../lib -D_POSIX_PTHREAD_SEMANTICS
410Sstevel@tonic-gate
42*11291SRobert.Thurlow@Sun.COM
431741Srmestaall:		$(TYPEPROG) $(TESTPROG)
440Sstevel@tonic-gate
450Sstevel@tonic-gate$(TYPEPROG):	$(OBJS) $(DSRC)
460Sstevel@tonic-gate		$(COMPILE.d) -s $(DSRC) -o $(DOBJ) $(OBJS)
474271Srie		$(LINK.c) $(ZIGNORE) -o $@ $(DOBJ) $(OBJS) $(LDLIBS)
480Sstevel@tonic-gate		$(POST_PROCESS)
490Sstevel@tonic-gate
50*11291SRobert.Thurlow@Sun.COMnfs_resolve.o:	../lib/nfs_resolve.c
51*11291SRobert.Thurlow@Sun.COM		$(COMPILE.c) ../lib/nfs_resolve.c
52*11291SRobert.Thurlow@Sun.COM
531741SrmestaTESTSRCS  =	nfsmapid_test.c
541741SrmestaTESTOBJS  =	$(TESTSRCS:%.c=%.o)
551741SrmestaTEST_OBJS =	$(TESTOBJS)
560Sstevel@tonic-gate
570Sstevel@tonic-gate$(TESTPROG):	$(TEST_OBJS)
580Sstevel@tonic-gate		$(LINK.c) -o $@ $(TEST_OBJS) $(LDLIBS)
590Sstevel@tonic-gate		$(POST_PROCESS)
600Sstevel@tonic-gate
611741SrmestaPOFILE	  =	nfsmapid.po
621741Srmestacatalog:	$(POFILE)
631741Srmesta
641741Srmesta$(POFILE):	$(SRCS)
651741Srmesta		$(RM) $@
661741Srmesta		$(COMPILE.cpp) $(SRCS) > $@.i
671741Srmesta		$(XGETTEXT) $(XGETFLAGS) $@.i
681741Srmesta		sed "/^domain/d" messages.po > $@
691741Srmesta		$(RM) $@.i messages.po
700Sstevel@tonic-gate
710Sstevel@tonic-gateclean:
721741Srmesta		$(RM) $(OBJS) $(TESTPROG) $(TESTOBJS) $(DOBJ) $(POFILE)
730Sstevel@tonic-gate
740Sstevel@tonic-gatelint:		$(SRCS) lint_SRCS
75