xref: /illumos-gate/usr/src/cmd/gss/gssd/Makefile (revision d17be682)
17c478bd9Sstevel@tonic-gate#
27c478bd9Sstevel@tonic-gate# CDDL HEADER START
37c478bd9Sstevel@tonic-gate#
47c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the
5a192e900Samaguire# Common Development and Distribution License (the "License").
6a192e900Samaguire# You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate#
87c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate# and limitations under the License.
127c478bd9Sstevel@tonic-gate#
137c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate#
197c478bd9Sstevel@tonic-gate# CDDL HEADER END
207c478bd9Sstevel@tonic-gate#
217c478bd9Sstevel@tonic-gate#
221f03f049SPeter Shoults# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
237c478bd9Sstevel@tonic-gate# Use is subject to license terms.
247c478bd9Sstevel@tonic-gate#
255661bb76SJohn Levon# Copyright (c) 2018, Joyent, Inc.
267c478bd9Sstevel@tonic-gate
277c478bd9Sstevel@tonic-gateTESTPROG = gssdtest
287c478bd9Sstevel@tonic-gate
297c478bd9Sstevel@tonic-gateOUTPUT_OPTION = -I.
307c478bd9Sstevel@tonic-gate
317c478bd9Sstevel@tonic-gatePROG= gssd
327c478bd9Sstevel@tonic-gate
337c478bd9Sstevel@tonic-gateMANIFEST=	gss.xml
347c478bd9Sstevel@tonic-gate
357c478bd9Sstevel@tonic-gateGSSD_BASEOBJS = gssd.o gssd_proc.o gssd_generic.o gssd_getuid.o
367c478bd9Sstevel@tonic-gateGSSC_BASEOBJS = gssdtest.o gssd_release_name_and_type.o gssd_clnt_stubs.o \
377c478bd9Sstevel@tonic-gate		gssd_handle.o
387c478bd9Sstevel@tonic-gate
397c478bd9Sstevel@tonic-gateGD_OBJS	= gssd_svc.o
407c478bd9Sstevel@tonic-gateGC_OBJS	= gssd_clnt.o
415661bb76SJohn LevonG_OBJS	= gssd_xdr.o
427c478bd9Sstevel@tonic-gateGSSDOBJS = $(GSSD_BASEOBJS) $(GD_OBJS) $(G_OBJS)
437c478bd9Sstevel@tonic-gateGSSCOBJS = $(GSSC_BASEOBJS) $(GC_OBJS) $(G_OBJS)
447c478bd9Sstevel@tonic-gate
457c478bd9Sstevel@tonic-gateROBJS	= $(GD_OBJS) $(GC_OBJS) $(G_OBJS)
467c478bd9Sstevel@tonic-gateOBJS	= $(GSSD_BASEOBJS) $(GD_OBJS) $(GSSC_BASEOBJS) $(GC_OBJS) $(G_OBJS)
477c478bd9Sstevel@tonic-gateSRCS	= $(OBJS:.o=.c)
487c478bd9Sstevel@tonic-gateRSRC	= $(ROBJS:.o=.c)
49*85f4cb87SRichard LoweRSRC	+= gssd.h
507c478bd9Sstevel@tonic-gate
517c478bd9Sstevel@tonic-gateCLOBBERFILES += $(TESTPROG)
527c478bd9Sstevel@tonic-gate
537c478bd9Sstevel@tonic-gateinclude ../../Makefile.cmd
547c478bd9Sstevel@tonic-gate
557c478bd9Sstevel@tonic-gateROOTMANIFESTDIR=	$(ROOTSVCNETWORKRPC)
567c478bd9Sstevel@tonic-gate
577c478bd9Sstevel@tonic-gateTEXT_DOMAIN = SUNW_OST_NETRPC
587c478bd9Sstevel@tonic-gatePOFILE = $(PROG).po
597c478bd9Sstevel@tonic-gatePOFILES = generic.po
607c478bd9Sstevel@tonic-gate
617c478bd9Sstevel@tonic-gate#
627c478bd9Sstevel@tonic-gate# Override $ROOTLIB
637c478bd9Sstevel@tonic-gate#
647c478bd9Sstevel@tonic-gateROOTLIB=	$(ROOT)/usr/lib/gss
657c478bd9Sstevel@tonic-gate
667c478bd9Sstevel@tonic-gateDIRS=	$(ROOTLIB)
677c478bd9Sstevel@tonic-gate
687c478bd9Sstevel@tonic-gateCPPFLAGS += -I$(SRC)/uts/common/gssapi/include
697c478bd9Sstevel@tonic-gate
707014882cSRichard LoweCERRWARN += -_gcc=-Wno-unused-variable
717014882cSRichard LoweCERRWARN += -_gcc=-Wno-implicit-function-declaration
727014882cSRichard LoweCERRWARN += -_gcc=-Wno-parentheses
73d3b5f563SJohn LevonCERRWARN += $(CNOWARN_UNINIT)
747014882cSRichard Lowe
755661bb76SJohn Levon# not linted
765661bb76SJohn LevonSMATCH=off
775661bb76SJohn Levon
787c478bd9Sstevel@tonic-gateLDLIBS += -lgss -lnsl
797c478bd9Sstevel@tonic-gate
8024da5b34Sriegssd :=	MAPFILES = $(MAPFILE.INT) $(MAPFILE.NGB)
81*85f4cb87SRichard Lowegssd :=	LDFLAGS += $(MAPFILES:%=-Wl,-M%)
8224da5b34Srie
83*85f4cb87SRichard Lowe$(GPROGS) := CPPFLAGS += -DSYSV -DSunOS=50
847c478bd9Sstevel@tonic-gate
857c478bd9Sstevel@tonic-gate.KEEP_STATE:
867c478bd9Sstevel@tonic-gate
877c478bd9Sstevel@tonic-gateall: $(PROG) $(TESTPROG)
887c478bd9Sstevel@tonic-gate
897c478bd9Sstevel@tonic-gate$(ROOTLIB):
907c478bd9Sstevel@tonic-gate	$(INS.dir)
917c478bd9Sstevel@tonic-gate
927c478bd9Sstevel@tonic-gate$(ROOTLIB)/%:	%
937c478bd9Sstevel@tonic-gate	$(INS.file)
947c478bd9Sstevel@tonic-gate
9524da5b34Sriegssd:	$(GSSDOBJS) $$(MAPFILES)
967c478bd9Sstevel@tonic-gate	$(LINK.c) $(GSSDOBJS) -o $@ $(LDLIBS)
977c478bd9Sstevel@tonic-gate	$(POST_PROCESS)
987c478bd9Sstevel@tonic-gate
99*85f4cb87SRichard Lowegssdtest:	$(GSSCOBJS)
1007c478bd9Sstevel@tonic-gate	$(LINK.c) $(GSSCOBJS) -o $@ $(LDLIBS)
1017c478bd9Sstevel@tonic-gate	$(POST_PROCESS)
1027c478bd9Sstevel@tonic-gate
1037c478bd9Sstevel@tonic-gateGSSDX=	$(SRC)/uts/common/gssapi/gssd.x
1047c478bd9Sstevel@tonic-gategssd.x:	$(GSSDX)
1057c478bd9Sstevel@tonic-gate	rm -f $@
1067c478bd9Sstevel@tonic-gate	cp $(GSSDX) $@
1077c478bd9Sstevel@tonic-gate
1087c478bd9Sstevel@tonic-gate#  Rules to generate derived rpcgen files from gssd.x spec file.
1097c478bd9Sstevel@tonic-gate
1101f03f049SPeter Shoults# NOTE WELL: There is code in gssd that assumes gssd is NOT
1111f03f049SPeter Shoults# multi-threaded.  Do NOT add -A to the rpcgen argument list in the
1121f03f049SPeter Shoults# Makefile unless you also remove this assumption.
1131f03f049SPeter Shoults
1147c478bd9Sstevel@tonic-gategssd.h:        gssd.x
1157c478bd9Sstevel@tonic-gate	$(RM) $@
1167c478bd9Sstevel@tonic-gate	$(RPCGEN) -M -h gssd.x > $@
1177c478bd9Sstevel@tonic-gate
1187c478bd9Sstevel@tonic-gategssd_clnt.c:   gssd.x
1197c478bd9Sstevel@tonic-gate	$(RM) $@
1207c478bd9Sstevel@tonic-gate	$(RPCGEN) -M -l gssd.x > $@
1217c478bd9Sstevel@tonic-gate
1227c478bd9Sstevel@tonic-gategssd_svc.c:    gssd.x
1237c478bd9Sstevel@tonic-gate	$(RM) $@
1247c478bd9Sstevel@tonic-gate	$(RPCGEN) -M -m gssd.x > $@
1257c478bd9Sstevel@tonic-gate
1267c478bd9Sstevel@tonic-gategssd_xdr.c:    gssd.x
1277c478bd9Sstevel@tonic-gate	$(RM) $@
1287c478bd9Sstevel@tonic-gate	$(RPCGEN) -M -c gssd.x > $@
1297c478bd9Sstevel@tonic-gate
1307c478bd9Sstevel@tonic-gate$(OBJS): gssd.h
1317c478bd9Sstevel@tonic-gate
1327c478bd9Sstevel@tonic-gateinstall: all $(DIRS) $(ROOTLIBPROG) $(ROOTMANIFEST)
1337c478bd9Sstevel@tonic-gate
1347c478bd9Sstevel@tonic-gateinstall_h:
1357c478bd9Sstevel@tonic-gate
1367c478bd9Sstevel@tonic-gateclean:
1377c478bd9Sstevel@tonic-gate	$(RM) $(OBJS) $(RSRC) gssd.x
1387c478bd9Sstevel@tonic-gate
1397c478bd9Sstevel@tonic-gatecheck:	$(CHKMANIFEST)
1407c478bd9Sstevel@tonic-gate
1417c478bd9Sstevel@tonic-gateinclude ../../Makefile.targ
1427c478bd9Sstevel@tonic-gate
1437c478bd9Sstevel@tonic-gate$(POFILE): $(DERIVED_FILES) .WAIT $(POFILES)
1447c478bd9Sstevel@tonic-gate	$(RM) $@
1457c478bd9Sstevel@tonic-gate	$(CAT) $(POFILES) > $@
1467c478bd9Sstevel@tonic-gate
1477c478bd9Sstevel@tonic-gategeneric.po: FRC
1487c478bd9Sstevel@tonic-gate	$(RM) messages.po
1497c478bd9Sstevel@tonic-gate	$(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext *.[ch]`
1507c478bd9Sstevel@tonic-gate	$(SED) "/^domain/d" messages.po > $@
1517c478bd9Sstevel@tonic-gate	$(RM) messages.po
1527c478bd9Sstevel@tonic-gate
1537c478bd9Sstevel@tonic-gateFRC:
1547c478bd9Sstevel@tonic-gate
155