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