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 27TESTPROG = gssdtest 28 29OUTPUT_OPTION = -I. 30 31PROG= gssd 32 33MANIFEST= gss.xml 34 35GSSD_BASEOBJS = gssd.o gssd_proc.o gssd_generic.o gssd_getuid.o 36GSSC_BASEOBJS = gssdtest.o gssd_release_name_and_type.o gssd_clnt_stubs.o \ 37 gssd_handle.o 38 39GD_OBJS = gssd_svc.o 40GC_OBJS = gssd_clnt.o 41G_OBJS = gssd_xdr.o 42GSSDOBJS = $(GSSD_BASEOBJS) $(GD_OBJS) $(G_OBJS) 43GSSCOBJS = $(GSSC_BASEOBJS) $(GC_OBJS) $(G_OBJS) 44 45GSSD_LINTS = $(GSSD_BASEOBJS:.o=.c) 46GSSC_LINTS = $(GSSC_BASEOBJS:.o=.c) 47 48ROBJS = $(GD_OBJS) $(GC_OBJS) $(G_OBJS) 49OBJS = $(GSSD_BASEOBJS) $(GD_OBJS) $(GSSC_BASEOBJS) $(GC_OBJS) $(G_OBJS) 50SRCS = $(OBJS:.o=.c) 51RSRC = $(ROBJS:.o=.c) 52RSRC += gssd.h 53 54CLOBBERFILES += $(TESTPROG) 55 56include ../../Makefile.cmd 57 58ROOTMANIFESTDIR= $(ROOTSVCNETWORKRPC) 59 60TEXT_DOMAIN = SUNW_OST_NETRPC 61POFILE = $(PROG).po 62POFILES = generic.po 63 64# 65# Override $ROOTLIB 66# 67ROOTLIB= $(ROOT)/usr/lib/gss 68 69DIRS= $(ROOTLIB) 70 71CPPFLAGS += -I$(SRC)/uts/common/gssapi/include 72COPTFLAG += $(XESS) #-I$(KINCDIR) 73 74CERRWARN += -_gcc=-Wno-unused-variable 75CERRWARN += -_gcc=-Wno-implicit-function-declaration 76CERRWARN += -_gcc=-Wno-parentheses 77CERRWARN += $(CNOWARN_UNINIT) 78 79# not linted 80SMATCH=off 81 82LDLIBS += -lgss -lnsl 83 84gssd := MAPFILES = $(MAPFILE.INT) $(MAPFILE.NGB) 85gssd := LDFLAGS += $(MAPFILES:%=-M%) 86 87$(GPROGS) := CPPFLAGS += -DSYSV -DSunOS=50 88 89.KEEP_STATE: 90 91all: $(PROG) $(TESTPROG) 92 93$(ROOTLIB): 94 $(INS.dir) 95 96$(ROOTLIB)/%: % 97 $(INS.file) 98 99gssd: $(GSSDOBJS) $$(MAPFILES) 100 $(LINK.c) $(GSSDOBJS) -o $@ $(LDLIBS) 101 $(POST_PROCESS) 102 103gssdtest: $(GSSCOBJS) 104 $(LINK.c) $(GSSCOBJS) -o $@ $(LDLIBS) 105 $(POST_PROCESS) 106 107GSSDX= $(SRC)/uts/common/gssapi/gssd.x 108gssd.x: $(GSSDX) 109 rm -f $@ 110 cp $(GSSDX) $@ 111 112# Rules to generate derived rpcgen files from gssd.x spec file. 113 114# NOTE WELL: There is code in gssd that assumes gssd is NOT 115# multi-threaded. Do NOT add -A to the rpcgen argument list in the 116# Makefile unless you also remove this assumption. 117 118gssd.h: gssd.x 119 $(RM) $@ 120 $(RPCGEN) -M -h gssd.x > $@ 121 122gssd_clnt.c: gssd.x 123 $(RM) $@ 124 $(RPCGEN) -M -l gssd.x > $@ 125 126gssd_svc.c: gssd.x 127 $(RM) $@ 128 $(RPCGEN) -M -m gssd.x > $@ 129 130gssd_xdr.c: gssd.x 131 $(RM) $@ 132 $(RPCGEN) -M -c gssd.x > $@ 133 134$(OBJS): gssd.h 135 136install: all $(DIRS) $(ROOTLIBPROG) $(ROOTMANIFEST) 137 138install_h: 139 140clean: 141 $(RM) $(OBJS) $(RSRC) gssd.x 142 143lint_gssd: 144 $(LINT.c) $(GSSD_LINTS) 145 146lint_gssc: 147 $(LINT.c) $(GSSC_LINTS) 148 149lint: lint_gssd lint_gssc 150 151check: $(CHKMANIFEST) 152 153include ../../Makefile.targ 154 155$(POFILE): $(DERIVED_FILES) .WAIT $(POFILES) 156 $(RM) $@ 157 $(CAT) $(POFILES) > $@ 158 159generic.po: FRC 160 $(RM) messages.po 161 $(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext *.[ch]` 162 $(SED) "/^domain/d" messages.po > $@ 163 $(RM) messages.po 164 165FRC: 166 167