xref: /titanic_44/usr/src/cmd/fs.d/nfs/nfsmapid/Makefile (revision 749f21d359d8fbd020c974a1a5227316221bfc9c)
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, Version 1.0 only
6# (the "License").  You may not use this file except in compliance
7# with the License.
8#
9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10# or http://www.opensolaris.org/os/licensing.
11# See the License for the specific language governing permissions
12# and limitations under the License.
13#
14# When distributing Covered Code, include this CDDL HEADER in each
15# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16# If applicable, add the following below this CDDL HEADER, with the
17# fields enclosed by brackets "[]" replaced with your own identifying
18# information: Portions Copyright [yyyy] [name of copyright owner]
19#
20# CDDL HEADER END
21#
22#
23# Copyright 2005 Sun Microsystems, Inc.
24# All rights reserved.  Use is subject to license terms.
25#
26# ident	"%Z%%M%	%I%	%E% SMI"
27#
28
29FSTYPE=		nfs
30
31TYPEPROG=	nfsmapid
32TESTPROG=	nfsmapid_test
33ATTMK=          $(TYPEPROG)
34
35POFILE= nfsmapid.po
36
37catalog: $(POFILE)
38
39$(POFILE): $(SRCS)
40	$(RM) $@
41	$(COMPILE.cpp) $(SRCS)	> $(POFILE).i
42	$(XGETTEXT) $(XGETFLAGS)	$(POFILE).i
43	sed "/^domain/d"	messages.po     > $@
44	$(RM) $(POFILE).i messages.po
45
46include		../../Makefile.fstype
47
48LDLIBS +=	-lresolv -lnsl -lcmd -lrt -ldtrace
49
50SRCS=		nfsmapid.c nfsmapid_server.c nfsmapid_resolv.c
51DSRC=		nfsmapid_dt.d
52DOBJ=		$(DSRC:%.d=%.o)
53HDRS+=		nfsmapid_resolv.h
54OBJS=		$(SRCS:%.c=%.o)
55CPPFLAGS +=	-I../lib -D_POSIX_PTHREAD_SEMANTICS
56
57$(TYPEPROG):	$(OBJS) $(DSRC)
58		$(COMPILE.d) -s $(DSRC) -o $(DOBJ) $(OBJS)
59		$(LINK.c) -zignore -o $@ $(DOBJ) $(OBJS) $(LDLIBS)
60		$(POST_PROCESS)
61
62$(OBJS):	$(HDRS)
63
64#
65# Test program
66#
67TESTSRCS=	nfsmapid_test.c
68TESTOBJS=	$(TESTSRCS:%.c=%.o)
69TEST_OBJS=	$(TESTOBJS)
70
71$(TESTPROG):	$(TEST_OBJS)
72		$(LINK.c) -o $@ $(TEST_OBJS) $(LDLIBS)
73		$(POST_PROCESS)
74
75all:		$(TYPEPROG) $(TESTPROG)
76
77clean:
78		$(RM) $(OBJS) $(TESTOBJS) $(DOBJ)
79
80lint:		$(SRCS) lint_SRCS
81