xref: /illumos-gate/usr/src/cmd/cmd-inet/usr.bin/rdist/Makefile (revision 689b9301078f0c35c7f198fcee8032a0d30eff3a)
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 2009 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25# Copyright (c) 2018, Joyent, Inc.
26
27PROG=	rdist
28OBJS=	docmd.o expand.o lookup.o main.o server.o
29KCMDOBJS=	kcmd.o
30YOBJS=	gram.o
31SRCS=	$(OBJS:.o=.c) $(CMDINETCOMMONDIR)/$(KCMDOBJS:.o=.c)
32YSRCS=	$(YOBJS:.o=.y)
33
34include ../../../Makefile.cmd
35include ../../Makefile.cmd-inet
36
37CPPFLAGS +=	-DSYSV -DSTRNET -DBSD_COMP
38LDLIBS +=	-lsocket -lnsl
39LDFLAGS +=	$(MAPFILE.NGB:%=-Wl,-M%)
40
41include  $(SRC)/lib/gss_mechs/mech_krb5/Makefile.mech_krb5
42LDFLAGS += $(KRUNPATH) -L$(ROOT)$(KLIBDIR_DO) -L$(ROOT)$(KLIBDIR_GL)
43LDLIBS +=  -lnsl -lmech_krb5
44CPPFLAGS += -I. -I$(CMDINETCOMMONDIR) \
45		-I$(SRC)/lib/gss_mechs/mech_krb5 \
46		-I$(SRC)/uts/common/gssapi/mechs/krb5/include \
47		-I$(SRC)/lib/gss_mechs/mech_krb5/include \
48		-I$(SRC)/lib/gss_mechs/mech_krb5/include/krb5
49
50CERRWARN +=	-_gcc=-Wno-implicit-function-declaration
51CERRWARN +=	-_gcc=-Wno-unused-variable
52CERRWARN +=	-_gcc=-Wno-unused-function
53CERRWARN +=	-_gcc=-Wno-unused-label
54CERRWARN +=	-_gcc=-Wno-parentheses
55CERRWARN +=	-_gcc=-Wno-clobbered
56CERRWARN +=	$(CNOWARN_UNINIT)
57
58# not linted
59SMATCH=off
60
61ROOTSYMLINK=	$(ROOT)/usr/ucb/$(PROG)
62
63# conditional assignments
64$(ROOTPROG) :=      FILEMODE=       04555
65
66.KEEP_STATE:
67
68all: $(PROG)
69
70$(PROG): $(OBJS) $(KCMDOBJS) $(YOBJS) $(MAPFILE.NGB)
71	$(LINK.c) $(OBJS) $(KCMDOBJS) $(YOBJS) -o $@ $(LDLIBS)
72	$(POST_PROCESS)
73
74install: all $(ROOTPROG) $(ROOTSYMLINK)
75
76$(ROOTSYMLINK):
77	$(RM) $@; $(SYMLINK) ../bin/$(PROG) $@
78
79clean:
80	$(RM) $(OBJS) $(KCMDOBJS) $(YOBJS)
81
82include ../../../Makefile.targ
83