xref: /titanic_44/usr/src/cmd/fs.d/nfs/nfsmapid/Makefile (revision 1e4c938b57d1656808e4112127ff1dce3eba5314)
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
35COMMON    =	nfs_resolve.o
36SRCS	  =	nfsmapid.c ../lib/nfs_resolve.c nfsmapid_server.c
37DSRC	  =	nfsmapid_dt.d
38DOBJ	  =	$(DSRC:%.d=%.o)
39OBJS	  =	nfsmapid.o nfsmapid_server.o $(COMMON)
40CPPFLAGS +=	-I../lib -D_POSIX_PTHREAD_SEMANTICS
41
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
50nfs_resolve.o:	../lib/nfs_resolve.c
51		$(COMPILE.c) ../lib/nfs_resolve.c
52
53TESTSRCS  =	nfsmapid_test.c
54TESTOBJS  =	$(TESTSRCS:%.c=%.o)
55TEST_OBJS =	$(TESTOBJS)
56
57$(TESTPROG):	$(TEST_OBJS)
58		$(LINK.c) -o $@ $(TEST_OBJS) $(LDLIBS)
59		$(POST_PROCESS)
60
61POFILE	  =	nfsmapid.po
62catalog:	$(POFILE)
63
64$(POFILE):	$(SRCS)
65		$(RM) $@
66		$(COMPILE.cpp) $(SRCS) > $@.i
67		$(XGETTEXT) $(XGETFLAGS) $@.i
68		sed "/^domain/d" messages.po > $@
69		$(RM) $@.i messages.po
70
71clean:
72		$(RM) $(OBJS) $(TESTPROG) $(TESTOBJS) $(DOBJ) $(POFILE)
73
74lint:		$(SRCS) lint_SRCS
75