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