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