17c478bd9Sstevel@tonic-gate# 224da5b34Srie# CDDL HEADER START 324da5b34Srie# 424da5b34Srie# The contents of this file are subject to the terms of the 524da5b34Srie# Common Development and Distribution License (the "License"). 624da5b34Srie# You may not use this file except in compliance with the License. 724da5b34Srie# 824da5b34Srie# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 924da5b34Srie# or http://www.opensolaris.org/os/licensing. 1024da5b34Srie# See the License for the specific language governing permissions 1124da5b34Srie# and limitations under the License. 1224da5b34Srie# 1324da5b34Srie# When distributing Covered Code, include this CDDL HEADER in each 1424da5b34Srie# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 1524da5b34Srie# If applicable, add the following below this CDDL HEADER, with the 1624da5b34Srie# fields enclosed by brackets "[]" replaced with your own identifying 1724da5b34Srie# information: Portions Copyright [yyyy] [name of copyright owner] 1824da5b34Srie# 1924da5b34Srie# CDDL HEADER END 2024da5b34Srie# 2124da5b34Srie 2224da5b34Srie# 23c2785286Sgtb# Copyright 2008 Sun Microsystems, Inc. All rights reserved. 247c478bd9Sstevel@tonic-gate# Use is subject to license terms. 257c478bd9Sstevel@tonic-gate# 26f3655454SJohn Levon# Copyright 2020 Joyent, Inc. 277c478bd9Sstevel@tonic-gate 287c478bd9Sstevel@tonic-gateTESTPROG = kwarndtest 297c478bd9Sstevel@tonic-gate 307c478bd9Sstevel@tonic-gatePROG= ktkt_warnd 317c478bd9Sstevel@tonic-gateMANIFEST= ktkt_warn.xml 327c478bd9Sstevel@tonic-gate 337c478bd9Sstevel@tonic-gateKWARNDOBJS = kwarnd.o kwarnd_svc.o kwarnd_proc.o kwarnd_generic.o kwarnd_send.o 34c2785286SgtbKWARNTOBJS = kwarndtest.o 35c2785286Sgtb 367c478bd9Sstevel@tonic-gateG_OBJS = kwarnd_xdr.o 377c478bd9Sstevel@tonic-gate 38c2785286SgtbOBJS = $(KWARNDOBJS) $(KWARNTOBJS) $(G_OBJS) 397c478bd9Sstevel@tonic-gateSRCS = $(OBJS:.o=.c) 405c140f91SgtbRSRC = kwarnd_xdr.c kwarnd_svc.c kwarnd.h 417c478bd9Sstevel@tonic-gate 427c478bd9Sstevel@tonic-gateCLOBBERFILES += $(TESTPROG) 437c478bd9Sstevel@tonic-gate 447c478bd9Sstevel@tonic-gateinclude ../../Makefile.cmd 457c478bd9Sstevel@tonic-gateinclude $(SRC)/lib/gss_mechs/mech_krb5/Makefile.mech_krb5 467c478bd9Sstevel@tonic-gate 477c478bd9Sstevel@tonic-gateROOTMANIFESTDIR= $(ROOTSVCNETWORKSECURITY) 487c478bd9Sstevel@tonic-gate 497c478bd9Sstevel@tonic-gatePOFILE = $(PROG).po 507c478bd9Sstevel@tonic-gatePOFILES = generic.po 517c478bd9Sstevel@tonic-gate 527c478bd9Sstevel@tonic-gateCPPFLAGS += -D_REENTRANT 537c478bd9Sstevel@tonic-gate 547014882cSRichard LoweCERRWARN += -_gcc=-Wno-unused-variable 557014882cSRichard LoweCERRWARN += -_gcc=-Wno-unused-function 567014882cSRichard LoweCERRWARN += -_gcc=-Wno-implicit-function-declaration 577014882cSRichard LoweCERRWARN += -_gcc=-Wno-parentheses 587014882cSRichard Lowe 595661bb76SJohn Levon# not linted 605661bb76SJohn LevonSMATCH=off 615661bb76SJohn Levon 627c478bd9Sstevel@tonic-gateCPPFLAGS += -I../../lib/gss_mechs/mech_krb5/include \ 637c478bd9Sstevel@tonic-gate -I$(SRC)/lib/gss_mechs/mech_krb5 \ 647c478bd9Sstevel@tonic-gate -I$(SRC)/lib/gss_mechs/mech_krb5/include \ 657c478bd9Sstevel@tonic-gate -I$(SRC)/uts/common/gssapi/mechs/krb5/include 6624da5b34Srie 6724da5b34Sriektkt_warnd := MAPFILES = $(MAPFILE.INT) $(MAPFILE.NGB) 68*85f4cb87SRichard Lowektkt_warnd := LDFLAGS += $(KRUNPATH) $(MAPFILES:%=-Wl,-M%) 69f3655454SJohn Levonktkt_warnd := LDLIBS += -lnsl 7024da5b34Srie 717c478bd9Sstevel@tonic-gateLDFLAGS += $(KRUNPATH) 72f3655454SJohn LevonLDLIBS += $(KMECHLIB) 737c478bd9Sstevel@tonic-gate 747c478bd9Sstevel@tonic-gate.KEEP_STATE: 757c478bd9Sstevel@tonic-gate 767c478bd9Sstevel@tonic-gateall: $(PROG) $(TESTPROG) 777c478bd9Sstevel@tonic-gate 7824da5b34Srie$(PROG): $(G_OBJS) $(KWARNDOBJS) $$(MAPFILES) 797c478bd9Sstevel@tonic-gate $(LINK.c) $(KWARNDOBJS) $(G_OBJS) -o $@ $(LDLIBS) 807c478bd9Sstevel@tonic-gate $(POST_PROCESS) 817c478bd9Sstevel@tonic-gate 82c2785286Sgtb# the client entry points (kwarn_*_warning) are now avail in mech_krb5.so 83c2785286Sgtb$(TESTPROG): $(KWARNTOBJS) 84c2785286Sgtb $(LINK.c) $(KWARNTOBJS) -o $@ $(LDLIBS) 857c478bd9Sstevel@tonic-gate $(POST_PROCESS) 867c478bd9Sstevel@tonic-gate 877c478bd9Sstevel@tonic-gate# Rules to generate derived rpcgen files from kwarnd.x spec file. 887c478bd9Sstevel@tonic-gate 897c478bd9Sstevel@tonic-gatekwarnd.h: kwarnd.x 907c478bd9Sstevel@tonic-gate $(RM) $@ 917c478bd9Sstevel@tonic-gate $(RPCGEN) -M -h kwarnd.x > $@ 927c478bd9Sstevel@tonic-gate 935c140f91Sgtbkwarnd_svc.c: kwarnd.x 945c140f91Sgtb $(RM) $@ 955c140f91Sgtb $(RPCGEN) -M -m kwarnd.x > $@ 965c140f91Sgtb 977c478bd9Sstevel@tonic-gatekwarnd_xdr.c: kwarnd.x 987c478bd9Sstevel@tonic-gate $(RM) $@ 997c478bd9Sstevel@tonic-gate $(RPCGEN) -M -c kwarnd.x > $@ 1007c478bd9Sstevel@tonic-gate 1017c478bd9Sstevel@tonic-gate$(OBJS): kwarnd.h 1027c478bd9Sstevel@tonic-gate 1037c478bd9Sstevel@tonic-gate# note that nightly depends on having all of the derived 1047c478bd9Sstevel@tonic-gate# .c files built here on 'make install', even though this 1057c478bd9Sstevel@tonic-gate# module doesn't use all of those files. 1067c478bd9Sstevel@tonic-gateinstall: $(KRB5LIBPROG) $(RSRC) $(ROOTMANIFEST) 1077c478bd9Sstevel@tonic-gate 1087c478bd9Sstevel@tonic-gatecheck: $(CHKMANIFEST) 1097c478bd9Sstevel@tonic-gate 1107c478bd9Sstevel@tonic-gateclean: 1117c478bd9Sstevel@tonic-gate $(RM) $(OBJS) $(RSRC) 1127c478bd9Sstevel@tonic-gate 1137c478bd9Sstevel@tonic-gateinclude ../../Makefile.targ 1147c478bd9Sstevel@tonic-gate 1157c478bd9Sstevel@tonic-gate#additional dependencies 1167c478bd9Sstevel@tonic-gate 1177c478bd9Sstevel@tonic-gate$(LIBRARY) : $(OBJS) 1187c478bd9Sstevel@tonic-gate$(DYNLIB) : $(PICS) 1197c478bd9Sstevel@tonic-gate 1207c478bd9Sstevel@tonic-gateFRC: 1217c478bd9Sstevel@tonic-gate 1227c478bd9Sstevel@tonic-gate$(POFILE): $(DERIVED_FILES) .WAIT $(POFILES) 1237c478bd9Sstevel@tonic-gate $(RM) $@ 1247c478bd9Sstevel@tonic-gate $(CAT) $(POFILES) > $@ 1257c478bd9Sstevel@tonic-gate 1267c478bd9Sstevel@tonic-gategeneric.po: FRC 1277c478bd9Sstevel@tonic-gate $(RM) messages.po 1287c478bd9Sstevel@tonic-gate $(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext *.[ch]` 1297c478bd9Sstevel@tonic-gate $(SED) "/^domain/d" messages.po > $@ 1307c478bd9Sstevel@tonic-gate $(RM) messages.po 131