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 26 PROG= rpc.rexd on 27 # where under 28 #RPCGEN= rpcgen 29 REXDPROG= rpc.rexd 30 ONPROG = on 31 32 MANIFEST= rex.xml 33 34 include ../Makefile.cmd 35 36 CERRWARN += -_gcc=-Wno-implicit-function-declaration 37 CERRWARN += -_gcc=-Wno-parentheses 38 CERRWARN += -_gcc=-Wno-unused-variable 39 CERRWARN += -_gcc=-Wno-address 40 CERRWARN += -_gcc=-Wno-unused-function 41 CERRWARN += -_gcc=-Wno-extra 42 43 ROOTMANIFESTDIR= $(ROOTSVCNETWORKRPC) 44 45 SRCS= $(PROG:%=%.c) 46 47 #OBJS= errprintf.o mount_nfs.o rex_xdr.o unix_login.o mntent.o 48 TYPEOBJS= nfs_subr.o 49 OBJS= errprintf.o mount_nfs.o rex.o unix_login.o mntent.o $(TYPEOBJS) 50 REXDOBJS= rpc.rexd.o errprintf.o mount_nfs.o rex.o unix_login.o mntent.o 51 ONOBJS= on.o sharetab.o where.o rex.o mntent.o 52 #WHEREOBJS= sharetab.o where.o where_main.o mntent.o 53 CLEANOBJS= 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 57 ROOTREXD= $(ROOTUSRSBIN) 58 ROOTON= $(ROOTBIN) 59 ROOTREXDPROG= $(REXDPROG:%=$(ROOTREXD)/%) 60 ROOTONPROG= $(ONPROG:%=$(ROOTON)/%) 61 62 CPPFLAGS = -I. $(CPPFLAGS.master) 63 64 LDLIBS += -lsocket -lnsl 65 rpc.rexd := LDLIBS += -lrpcsvc -lbsm -lpam 66 67 TYPESRCS= ../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 78 all: $(PROG) 79 80 rpc.rexd: $$@.o $(OBJS) 81 $(LINK.c) -o $@ $@.o $(OBJS) $(LDLIBS) 82 $(POST_PROCESS) 83 84 on: $(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 # 94 install: all $(ROOTREXDPROG) $(ROOTONPROG) $(ROOTMANIFEST) 95 96 $(ROOTREXD): rpc.rexd 97 $(INS.dir) 98 $(ROOTON): on 99 $(INS.dir) 100 101 check: $(CHKMANIFEST) 102 103 clean: 104 $(RM) $(OBJS) $(CLEANOBJS) $(PROG) 105 106 lint: lint_SRCS 107 108 include ../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 117 on.o: rex.h 118 119 rpc.rexd.o: rex.h 120 121 unix_login.o: rex.h 122 123 rex.o: rex.h 124 125 nfs_subr.o: ../fs.d/nfs/lib/nfs_subr.c 126 $(COMPILE.c) ../fs.d/nfs/lib/nfs_subr.c