xref: /titanic_44/usr/src/cmd/fs.d/nfs/nfsmapid/Makefile (revision dd5829d1456ba00e6f704e6a88e7eaae608e3c1b)
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#
22# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25# ident	"%Z%%M%	%I%	%E% SMI"
26#
27
28FSTYPE	  =	nfs
29TYPEPROG  =	nfsmapid
30TESTPROG  =	nfsmapid_test
31ATTMK	  =	$(TYPEPROG)
32
33include		../../Makefile.fstype
34
35LDLIBS   +=	-L$(ROOT)/usr/lib/nfs -R/usr/lib/nfs
36LDLIBS   +=	-lnsl -lmapid -ldoor -ldtrace -lidmap
37SRCS	  =	nfsmapid.c nfsmapid_server.c
38DSRC	  =	nfsmapid_dt.d
39DOBJ	  =	$(DSRC:%.d=%.o)
40OBJS	  =	$(SRCS:%.c=%.o)
41CPPFLAGS +=	-I../lib -D_POSIX_PTHREAD_SEMANTICS
42
43all:		$(TYPEPROG) $(TESTPROG)
44
45$(TYPEPROG):	$(OBJS) $(DSRC)
46		$(COMPILE.d) -s $(DSRC) -o $(DOBJ) $(OBJS)
47		$(LINK.c) $(ZIGNORE) -o $@ $(DOBJ) $(OBJS) $(LDLIBS)
48		$(POST_PROCESS)
49
50TESTSRCS  =	nfsmapid_test.c
51TESTOBJS  =	$(TESTSRCS:%.c=%.o)
52TEST_OBJS =	$(TESTOBJS)
53
54$(TESTPROG):	$(TEST_OBJS)
55		$(LINK.c) -o $@ $(TEST_OBJS) $(LDLIBS)
56		$(POST_PROCESS)
57
58POFILE	  =	nfsmapid.po
59catalog:	$(POFILE)
60
61$(POFILE):	$(SRCS)
62		$(RM) $@
63		$(COMPILE.cpp) $(SRCS) > $@.i
64		$(XGETTEXT) $(XGETFLAGS) $@.i
65		sed "/^domain/d" messages.po > $@
66		$(RM) $@.i messages.po
67
68clean:
69		$(RM) $(OBJS) $(TESTPROG) $(TESTOBJS) $(DOBJ) $(POFILE)
70
71lint:		$(SRCS) lint_SRCS
72