xref: /onnv-gate/usr/src/cmd/cmd-inet/usr.bin/rdist/Makefile (revision 10207:87c40ea3fc4b)
10Sstevel@tonic-gate#
20Sstevel@tonic-gate# CDDL HEADER START
30Sstevel@tonic-gate#
40Sstevel@tonic-gate# The contents of this file are subject to the terms of the
54271Srie# Common Development and Distribution License (the "License").
64271Srie# You may not use this file except in compliance with the License.
70Sstevel@tonic-gate#
80Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
90Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
100Sstevel@tonic-gate# See the License for the specific language governing permissions
110Sstevel@tonic-gate# and limitations under the License.
120Sstevel@tonic-gate#
130Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
140Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
150Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
160Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
170Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
180Sstevel@tonic-gate#
190Sstevel@tonic-gate# CDDL HEADER END
200Sstevel@tonic-gate#
210Sstevel@tonic-gate#
22*10207SJames.McPherson@Sun.COM# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
230Sstevel@tonic-gate# Use is subject to license terms.
240Sstevel@tonic-gate#
250Sstevel@tonic-gate# cmd/cmd-inet/usr.bin/rdist/Makefile
260Sstevel@tonic-gate
270Sstevel@tonic-gatePROG=	rdist
280Sstevel@tonic-gateOBJS=	docmd.o expand.o lookup.o main.o server.o
290Sstevel@tonic-gateKCMDOBJS=	kcmd.o
300Sstevel@tonic-gateYOBJS=	gram.o
310Sstevel@tonic-gateSRCS=	$(OBJS:.o=.c) $(CMDINETCOMMONDIR)/$(KCMDOBJS:.o=.c)
320Sstevel@tonic-gateYSRCS=	$(YOBJS:.o=.y)
330Sstevel@tonic-gate
340Sstevel@tonic-gateinclude ../../../Makefile.cmd
350Sstevel@tonic-gateinclude ../../Makefile.cmd-inet
360Sstevel@tonic-gate
370Sstevel@tonic-gateCPPFLAGS +=	-DSYSV -DSTRNET -DBSD_COMP
380Sstevel@tonic-gateLDLIBS +=	-lsocket -lnsl
396543SrieLDFLAGS +=	$(MAPFILE.NGB:%=-M%)
400Sstevel@tonic-gate
410Sstevel@tonic-gateinclude  $(SRC)/lib/gss_mechs/mech_krb5/Makefile.mech_krb5
420Sstevel@tonic-gateLDFLAGS += $(KRUNPATH) -L$(ROOT)$(KLIBDIR_DO) -L$(ROOT)$(KLIBDIR_GL)
430Sstevel@tonic-gateLDLIBS +=  -lnsl -lmech_krb5
440Sstevel@tonic-gateCPPFLAGS += -I. -I$(CMDINETCOMMONDIR) \
450Sstevel@tonic-gate		-I$(SRC)/lib/gss_mechs/mech_krb5 \
460Sstevel@tonic-gate		-I$(SRC)/uts/common/gssapi/mechs/krb5/include \
470Sstevel@tonic-gate		-I$(SRC)/lib/gss_mechs/mech_krb5/include \
480Sstevel@tonic-gate		-I$(SRC)/lib/gss_mechs/mech_krb5/include/krb5
490Sstevel@tonic-gate
500Sstevel@tonic-gateROOTSYMLINK=	$(ROOT)/usr/ucb/$(PROG)
510Sstevel@tonic-gate
520Sstevel@tonic-gate# conditional assignments
530Sstevel@tonic-gate$(ROOTPROG) :=      FILEMODE=       04555
540Sstevel@tonic-gate
550Sstevel@tonic-gate.KEEP_STATE:
560Sstevel@tonic-gate
570Sstevel@tonic-gateall: $(PROG)
580Sstevel@tonic-gate
594271Srie$(PROG): $(OBJS) $(KCMDOBJS) $(YOBJS) $(MAPFILE.NGB)
600Sstevel@tonic-gate	$(LINK.c) $(OBJS) $(KCMDOBJS) $(YOBJS) -o $@ $(LDLIBS)
610Sstevel@tonic-gate	$(POST_PROCESS)
620Sstevel@tonic-gate
630Sstevel@tonic-gateinstall: all $(ROOTPROG) $(ROOTSYMLINK)
640Sstevel@tonic-gate
650Sstevel@tonic-gate$(ROOTSYMLINK):
660Sstevel@tonic-gate	$(RM) $@; $(SYMLINK) ../bin/$(PROG) $@
670Sstevel@tonic-gate
680Sstevel@tonic-gateclean:
690Sstevel@tonic-gate	$(RM) $(OBJS) $(KCMDOBJS) $(YOBJS)
700Sstevel@tonic-gate
710Sstevel@tonic-gatelint:
720Sstevel@tonic-gate	$(YACC.y) $(YSRCS)
730Sstevel@tonic-gate	$(LINT.c) $(SRCS) y.tab.c $(LDLIBS)
740Sstevel@tonic-gate	$(RM) y.tab.c
750Sstevel@tonic-gate
760Sstevel@tonic-gate
770Sstevel@tonic-gateinclude ../../../Makefile.targ
78