xref: /titanic_41/usr/src/cmd/cmd-inet/usr.bin/rdist/Makefile (revision 7c478bd95313f5f23a4c958a745db2134aa03244)
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, Version 1.0 only
6# (the "License").  You may not use this file except in compliance
7# with the License.
8#
9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10# or http://www.opensolaris.org/os/licensing.
11# See the License for the specific language governing permissions
12# and limitations under the License.
13#
14# When distributing Covered Code, include this CDDL HEADER in each
15# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16# If applicable, add the following below this CDDL HEADER, with the
17# fields enclosed by brackets "[]" replaced with your own identifying
18# information: Portions Copyright [yyyy] [name of copyright owner]
19#
20# CDDL HEADER END
21#
22#
23# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26# ident	"%Z%%M%	%I%	%E% SMI"
27#
28# cmd/cmd-inet/usr.bin/rdist/Makefile
29
30PROG=	rdist
31OBJS=	docmd.o expand.o lookup.o main.o server.o
32KCMDOBJS=	kcmd.o
33YOBJS=	gram.o
34SRCS=	$(OBJS:.o=.c) $(CMDINETCOMMONDIR)/$(KCMDOBJS:.o=.c)
35YSRCS=	$(YOBJS:.o=.y)
36
37include ../../../Makefile.cmd
38include ../../Makefile.cmd-inet
39
40CPPFLAGS +=	-DSYSV -DSTRNET -DBSD_COMP
41LDLIBS +=	-lsocket -lnsl
42LDFLAGS +=	$(ZLAZYLOAD)
43
44include  $(SRC)/lib/gss_mechs/mech_krb5/Makefile.mech_krb5
45LDFLAGS += $(KRUNPATH) -L$(ROOT)$(KLIBDIR_DO) -L$(ROOT)$(KLIBDIR_GL)
46LDLIBS +=  -lnsl -lmech_krb5
47CPPFLAGS += -I. -I$(CMDINETCOMMONDIR) \
48		-I$(SRC)/lib/gss_mechs/mech_krb5 \
49		-I$(SRC)/uts/common/gssapi/mechs/krb5/include \
50		-I$(SRC)/lib/gss_mechs/mech_krb5/include \
51		-I$(SRC)/lib/gss_mechs/mech_krb5/include/krb5
52
53ROOTSYMLINK=	$(ROOT)/usr/ucb/$(PROG)
54
55# conditional assignments
56$(ROOTPROG) :=      FILEMODE=       04555
57$(ROOTPROG) :=      OWNER=          root
58
59.KEEP_STATE:
60
61all: $(PROG)
62
63$(PROG): $(OBJS) $(KCMDOBJS) $(YOBJS)
64	$(LINK.c) $(OBJS) $(KCMDOBJS) $(YOBJS) -o $@ $(LDLIBS)
65	$(POST_PROCESS)
66
67install: all $(ROOTPROG) $(ROOTSYMLINK)
68
69$(ROOTSYMLINK):
70	$(RM) $@; $(SYMLINK) ../bin/$(PROG) $@
71
72clean:
73	$(RM) $(OBJS) $(KCMDOBJS) $(YOBJS)
74
75lint:
76	$(YACC.y) $(YSRCS)
77	$(LINT.c) $(SRCS) y.tab.c $(LDLIBS)
78	$(RM) y.tab.c
79
80
81include ../../../Makefile.targ
82