xref: /illumos-gate/usr/src/cmd/fs.d/smbclnt/smbutil/Makefile (revision d17be682a2c70b4505d43c830bbd2603da11918d)
14bff34e3Sthurlow#
24bff34e3Sthurlow# CDDL HEADER START
34bff34e3Sthurlow#
44bff34e3Sthurlow# The contents of this file are subject to the terms of the
54bff34e3Sthurlow# Common Development and Distribution License (the "License").
64bff34e3Sthurlow# You may not use this file except in compliance with the License.
74bff34e3Sthurlow#
84bff34e3Sthurlow# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
94bff34e3Sthurlow# or http://www.opensolaris.org/os/licensing.
104bff34e3Sthurlow# See the License for the specific language governing permissions
114bff34e3Sthurlow# and limitations under the License.
124bff34e3Sthurlow#
134bff34e3Sthurlow# When distributing Covered Code, include this CDDL HEADER in each
144bff34e3Sthurlow# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
154bff34e3Sthurlow# If applicable, add the following below this CDDL HEADER, with the
164bff34e3Sthurlow# fields enclosed by brackets "[]" replaced with your own identifying
174bff34e3Sthurlow# information: Portions Copyright [yyyy] [name of copyright owner]
184bff34e3Sthurlow#
194bff34e3Sthurlow# CDDL HEADER END
204bff34e3Sthurlow#
21613a2f6bSGordon Ross
224bff34e3Sthurlow#
23613a2f6bSGordon Ross# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
244bff34e3Sthurlow# Use is subject to license terms.
254bff34e3Sthurlow#
2640c0e231SGordon Ross# Copyright 2018 Nexenta Systems, Inc.  All rights reserved.
275661bb76SJohn Levon# Copyright (c) 2018, Joyent, Inc.
287d815089SGordon Ross#
29613a2f6bSGordon Ross
304bff34e3Sthurlow#
314bff34e3Sthurlow# cmd/fs.d/smbclnt/smbutil/Makefile
324bff34e3Sthurlow#
334bff34e3Sthurlow
344bff34e3SthurlowPROG=		smbutil
354bff34e3Sthurlow
36a6d10110SGordon RossOBJS=   smbutil.o discon.o info.o login.o lookup.o print.o status.o view.o \
3740c0e231SGordon Ross	shares_rpc.o srvsvc1_clnt.o srvsvc1_ndr.o
38613a2f6bSGordon Ross
397d815089SGordon Rossinclude		$(SRC)/cmd/Makefile.cmd
407d815089SGordon Ross
414bff34e3SthurlowPOFILE=	smbutil_all.po
424bff34e3SthurlowPOFILES= $(OBJS:%.o=%.po)
437d815089SGordon Ross
447d815089SGordon RossCLEANFILES +=  srvsvc1_ndr.c
45613a2f6bSGordon RossCLOBBERFILES+=  $(POFILE) $(POFILES)
464bff34e3Sthurlow
47bd0ce624SYuri PankovCSTD= $(CSTD_GNU99)
48613a2f6bSGordon Ross
497d815089SGordon RossLDLIBS += -lmlrpc -lsmbfs -lnsl
50613a2f6bSGordon Ross
514bff34e3SthurlowCPPFLAGS += -I$(SRC)/lib/libsmbfs \
524bff34e3Sthurlow	-I$(SRC)/uts/common/smbclnt -I$(SRC)/uts/common
53613a2f6bSGordon Ross
545661bb76SJohn Levon# not linted
555661bb76SJohn LevonSMATCH=off
565661bb76SJohn Levon
57613a2f6bSGordon Ross# Debugging
58*d17be682SRichard Lowe$(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG
594bff34e3Sthurlow
604bff34e3Sthurlowall:		$(PROG)
614bff34e3Sthurlow
624bff34e3Sthurlow$(PROG):	$(OBJS)
634bff34e3Sthurlow	$(LINK.c) -o $@ $(OBJS) $(LDLIBS)
644bff34e3Sthurlow	$(POST_PROCESS)
654bff34e3Sthurlow
664bff34e3Sthurlowinstall:	all $(ROOTPROG)
674bff34e3Sthurlow
684bff34e3Sthurlow$(ROOTPROG):	$(PROG)
694bff34e3Sthurlow	$(INS.file) $(PROG)
704bff34e3Sthurlow
714bff34e3Sthurlowcatalog: $(POFILE)
724bff34e3Sthurlow
734bff34e3Sthurlow$(POFILE): $(POFILES)
744bff34e3Sthurlow	$(RM) $@
754bff34e3Sthurlow	$(CAT) $(POFILES) > $@
764bff34e3Sthurlow
774bff34e3Sthurlowclean:
787d815089SGordon Ross	$(RM) $(OBJS) $(CLEANFILES)
79613a2f6bSGordon Ross
80613a2f6bSGordon Rossinclude ../../../Makefile.targ
817d815089SGordon Ross
827d815089SGordon Rosssrvsvc1_ndr.c : srvsvc1.ndl
837d815089SGordon Ross	$(NDRGEN) -Y $(ANSI_CPP) $(CPPFLAGS) srvsvc1.ndl
847d815089SGordon Ross
857d815089SGordon Ross.KEEP_STATE:
86