xref: /titanic_50/usr/src/cmd/cmd-inet/usr.bin/rdist/Makefile (revision 275c9da86e89f8abf71135cf63d9fc23671b2e60)
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# ident	"%Z%%M%	%I%	%E% SMI"
26#
27# cmd/cmd-inet/usr.bin/rdist/Makefile
28
29PROG=	rdist
30OBJS=	docmd.o expand.o lookup.o main.o server.o
31KCMDOBJS=	kcmd.o
32YOBJS=	gram.o
33SRCS=	$(OBJS:.o=.c) $(CMDINETCOMMONDIR)/$(KCMDOBJS:.o=.c)
34YSRCS=	$(YOBJS:.o=.y)
35
36include ../../../Makefile.cmd
37include ../../Makefile.cmd-inet
38
39CPPFLAGS +=	-DSYSV -DSTRNET -DBSD_COMP
40LDLIBS +=	-lsocket -lnsl
41LDFLAGS +=	$(ZLAZYLOAD) $(MAPFILE.NGB:%=-M%)
42
43include  $(SRC)/lib/gss_mechs/mech_krb5/Makefile.mech_krb5
44LDFLAGS += $(KRUNPATH) -L$(ROOT)$(KLIBDIR_DO) -L$(ROOT)$(KLIBDIR_GL)
45LDLIBS +=  -lnsl -lmech_krb5
46CPPFLAGS += -I. -I$(CMDINETCOMMONDIR) \
47		-I$(SRC)/lib/gss_mechs/mech_krb5 \
48		-I$(SRC)/uts/common/gssapi/mechs/krb5/include \
49		-I$(SRC)/lib/gss_mechs/mech_krb5/include \
50		-I$(SRC)/lib/gss_mechs/mech_krb5/include/krb5
51
52ROOTSYMLINK=	$(ROOT)/usr/ucb/$(PROG)
53
54# conditional assignments
55$(ROOTPROG) :=      FILEMODE=       04555
56$(ROOTPROG) :=      OWNER=          root
57
58.KEEP_STATE:
59
60all: $(PROG)
61
62$(PROG): $(OBJS) $(KCMDOBJS) $(YOBJS) $(MAPFILE.NGB)
63	$(LINK.c) $(OBJS) $(KCMDOBJS) $(YOBJS) -o $@ $(LDLIBS)
64	$(POST_PROCESS)
65
66install: all $(ROOTPROG) $(ROOTSYMLINK)
67
68$(ROOTSYMLINK):
69	$(RM) $@; $(SYMLINK) ../bin/$(PROG) $@
70
71clean:
72	$(RM) $(OBJS) $(KCMDOBJS) $(YOBJS)
73
74lint:
75	$(YACC.y) $(YSRCS)
76	$(LINT.c) $(SRCS) y.tab.c $(LDLIBS)
77	$(RM) y.tab.c
78
79
80include ../../../Makefile.targ
81