xref: /titanic_41/usr/src/cmd/rexd/Makefile (revision 5fbb41393be5d63f75952b1d72d4df2642d22557)
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
28PROG=		rpc.rexd on
29# where under
30#RPCGEN=		rpcgen
31REXDPROG=	rpc.rexd
32ONPROG	=	on
33
34MANIFEST=	rex.xml
35
36include ../Makefile.cmd
37
38ROOTMANIFESTDIR=	$(ROOTSVCNETWORKRPC)
39
40SRCS=		$(PROG:%=%.c)
41
42#OBJS=		errprintf.o mount_nfs.o rex_xdr.o unix_login.o mntent.o
43TYPEOBJS=	nfs_subr.o
44OBJS=		errprintf.o mount_nfs.o rex.o unix_login.o mntent.o $(TYPEOBJS)
45REXDOBJS=	rpc.rexd.o errprintf.o mount_nfs.o rex.o unix_login.o mntent.o
46ONOBJS= 	on.o sharetab.o where.o rex.o mntent.o
47#WHEREOBJS=	sharetab.o where.o where_main.o mntent.o
48CLEANOBJS=	exportent.o sharetab.o on.o rpc.rexd.o where.o
49#under.o where.o where_main.o
50#UNDEROBJS=	errprintf.o sharetab.o mount_nfs.o
51
52ROOTREXD=	$(ROOTUSRSBIN)
53ROOTON=		$(ROOTBIN)
54ROOTREXDPROG=	$(REXDPROG:%=$(ROOTREXD)/%)
55ROOTONPROG=	$(ONPROG:%=$(ROOTON)/%)
56
57CPPFLAGS =	-I. $(CPPFLAGS.master)
58
59LDLIBS +=	-lsocket -lnsl
60rpc.rexd :=	LDLIBS += -lrpcsvc -lbsm -lpam
61
62TYPESRCS=	../nfs/lib/nfs_subr.c
63
64# install rule
65# don't re-install directories created by Targetdirs
66#$(ROOTREXD)/%: %
67#	$(INS.file)
68#$(ROOTON)/%: %
69#	$(INS.file)
70
71.KEEP_STATE:
72
73all:	$(PROG)
74
75rpc.rexd:	$$@.o $(OBJS)
76	$(LINK.c) -o $@ $@.o $(OBJS) $(LDLIBS)
77	$(POST_PROCESS)
78
79on:	$(ONOBJS)
80	$(LINK.c) -o $@ $(ONOBJS) $(LDLIBS)
81	$(POST_PROCESS)
82
83#under: $$@.o $(UNDEROBJS)
84#	$(LINK.c) -o $@ $@.o $(UNDEROBJS) $(LDLIBS)
85#
86#where: $(WHEREOBJS)
87#	$(LINK.c) -o $@ $(WHEREOBJS) $(LDLIBS)
88#
89install: all $(ROOTREXDPROG) $(ROOTONPROG) $(ROOTMANIFEST)
90
91$(ROOTREXD):	rpc.rexd
92	$(INS.dir)
93$(ROOTON):	on
94	$(INS.dir)
95
96check:	$(CHKMANIFEST)
97
98clean:
99	$(RM) $(OBJS) $(CLEANOBJS) $(PROG)
100
101lint:	 lint_SRCS
102
103include ../Makefile.targ
104
105# derived source files and explicit dependencies
106
107#rex_xdr.o \
108#rex_svc.o \
109#rex_clnt.o:	rex.h rex.c
110#	$(LINK.c) -c -o $@ rex.c
111
112on.o:		rex.h
113
114rpc.rexd.o:		rex.h
115
116unix_login.o:	rex.h
117
118rex.o:		rex.h
119
120nfs_subr.o:	../fs.d/nfs/lib/nfs_subr.c
121	$(COMPILE.c)  ../fs.d/nfs/lib/nfs_subr.c
122