xref: /onnv-gate/usr/src/lib/gss_mechs/mech_dh/backend/Makefile (revision 7514:24478c5e37d8)
10Sstevel@tonic-gate#
20Sstevel@tonic-gate# CDDL HEADER START
30Sstevel@tonic-gate#
40Sstevel@tonic-gate# The contents of this file are subject to the terms of the
5*7514SJohn.Sonnenschein@Sun.COM# Common Development and Distribution License (the "License").
6*7514SJohn.Sonnenschein@Sun.COM# You may not use this file except in compliance with the License.
70Sstevel@tonic-gate#
80Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
90Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
100Sstevel@tonic-gate# See the License for the specific language governing permissions
110Sstevel@tonic-gate# and limitations under the License.
120Sstevel@tonic-gate#
130Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
140Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
150Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
160Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
170Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
180Sstevel@tonic-gate#
190Sstevel@tonic-gate# CDDL HEADER END
200Sstevel@tonic-gate#
21*7514SJohn.Sonnenschein@Sun.COM
220Sstevel@tonic-gate#
23*7514SJohn.Sonnenschein@Sun.COM# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
240Sstevel@tonic-gate# Use is subject to license terms.
250Sstevel@tonic-gate#
260Sstevel@tonic-gate# lib/gss_mechs/mech_dh/backend/Makefile
270Sstevel@tonic-gate#
280Sstevel@tonic-gatePROTOCOL_DIR = mech
290Sstevel@tonic-gateSUBDIRS = $(MACH) $(BUILD64) $(MACH64)
300Sstevel@tonic-gate
310Sstevel@tonic-gatePROTO_FILE = dhmech_prot.x
320Sstevel@tonic-gateDERIVED_FILES = mech/dhmech_prot.h mech/xdr_token.c
330Sstevel@tonic-gateCLEANFILES += $(DERIVED_FILES)
340Sstevel@tonic-gate
350Sstevel@tonic-gate# include library definitions
360Sstevel@tonic-gateinclude ../../../Makefile.lib
370Sstevel@tonic-gate
380Sstevel@tonic-gateTEXT_DOMAIN =	SUNW_OST_NETRPC
390Sstevel@tonic-gatePOFILES =	generic.po
400Sstevel@tonic-gatePOFILE = mech_dh.po
410Sstevel@tonic-gate
420Sstevel@tonic-gateSED=    sed
430Sstevel@tonic-gateGREP=   grep
440Sstevel@tonic-gate
450Sstevel@tonic-gateall :=          TARGET= all
460Sstevel@tonic-gateclean :=        TARGET= clean
470Sstevel@tonic-gateclobber :=      TARGET= clobber
480Sstevel@tonic-gatedelete :=       TARGET= delete
490Sstevel@tonic-gateinstall :=      TARGET= install
500Sstevel@tonic-gatelint :=         TARGET= lint
510Sstevel@tonic-gatecatalog :=      TARGET= catalog
520Sstevel@tonic-gatepackage :=      TARGET= package
530Sstevel@tonic-gate_msg :=		TARGET= _msg
540Sstevel@tonic-gate
550Sstevel@tonic-gate.KEEP_STATE:
560Sstevel@tonic-gateall:            $(DERIVED_FILES) .WAIT $(SUBDIRS)
570Sstevel@tonic-gate
580Sstevel@tonic-gateinstall:        $(DERIVED_FILES) .WAIT $(SUBDIRS)
590Sstevel@tonic-gate
600Sstevel@tonic-gateclean clobber delete lint catalog package:      $(SUBDIRS)
610Sstevel@tonic-gate
620Sstevel@tonic-gate#
630Sstevel@tonic-gate# Rules for building the derived files
640Sstevel@tonic-gate#
650Sstevel@tonic-gatemech/xdr_token.c: $(PROTOCOL_DIR)/dhmech_prot.x
660Sstevel@tonic-gate	$(RPCGEN) -c $(PROTOCOL_DIR)/dhmech_prot.x |\
670Sstevel@tonic-gate	$(SED) -e 's!$(PROTOCOL_DIR)/dhmech_prot.h!dhmech_prot.h!' > $@
680Sstevel@tonic-gate
690Sstevel@tonic-gatemech/dhmech_prot.h: mech/dhmech_prot.x
700Sstevel@tonic-gate	$(RPCGEN) -h $(PROTOCOL_DIR)/dhmech_prot.x > $@
710Sstevel@tonic-gate
720Sstevel@tonic-gate# include library targets
730Sstevel@tonic-gateinclude ../../../Makefile.targ
740Sstevel@tonic-gate
750Sstevel@tonic-gate# EXPORT DELETE START
760Sstevel@tonic-gate# Special target to clean up the source tree for export distribution
770Sstevel@tonic-gate# Warning: This target changes the source tree
780Sstevel@tonic-gateEXPORT_SRC:
790Sstevel@tonic-gate	$(RM) Makefile+ Makefile.com+ mech/crypto.c+ mech/dhmech.c+
800Sstevel@tonic-gate	$(SED) -e "/^# EXPORT DELETE START/,/^# EXPORT DELETE END/d"	\
810Sstevel@tonic-gate			< Makefile > Makefile+
820Sstevel@tonic-gate	$(MV) Makefile+ Makefile
830Sstevel@tonic-gate	$(SED) -e "/^# EXPORT DELETE START/,/^# EXPORT DELETE END/d"	\
840Sstevel@tonic-gate			< Makefile.com > Makefile.com+
850Sstevel@tonic-gate	$(MV) Makefile.com+ Makefile.com
860Sstevel@tonic-gate	$(SED) -e "/EXPORT DELETE START/,/EXPORT DELETE END/d" \
870Sstevel@tonic-gate		< mech/crypto.c > mech/crypto.c+
880Sstevel@tonic-gate	$(MV) mech/crypto.c+ mech/crypto.c
890Sstevel@tonic-gate	$(SED) -e "/EXPORT DELETE START/,/EXPORT DELETE END/d" \
900Sstevel@tonic-gate		< mech/dhmech.c > mech/dhmech.c+
910Sstevel@tonic-gate	$(MV) mech/dhmech.c+ mech/dhmech.c
920Sstevel@tonic-gate	$(CHMOD) 444 Makefile Makefile.com mech/crypto.c mech/dhmech.c
930Sstevel@tonic-gate
940Sstevel@tonic-gate# CRYPT DELETE START
950Sstevel@tonic-gateCRYPT_SRC:
960Sstevel@tonic-gate	$(RM) Makefile+ Makefile.com+ mech/dhmech.c+
970Sstevel@tonic-gate	$(SED) -e "/^# CRYPT DELETE START/,/^# CRYPT DELETE END/d"	\
980Sstevel@tonic-gate			< Makefile				\
990Sstevel@tonic-gate	   | $(SED) -e "/EXPORT DELETE/d"				\
1000Sstevel@tonic-gate			> Makefile+
1010Sstevel@tonic-gate	$(MV) Makefile+ Makefile
1020Sstevel@tonic-gate	$(SED) -e "/^# CRYPT DELETE START/,/^# CRYPT DELETE END/d"	\
1030Sstevel@tonic-gate			< Makefile.com				\
1040Sstevel@tonic-gate	   | $(SED) -e "/EXPORT DELETE/d"				\
1050Sstevel@tonic-gate			> Makefile.com+
1060Sstevel@tonic-gate	$(MV) Makefile.com+ Makefile.com
1070Sstevel@tonic-gate	$(SED) -e "/CRYPT DELETE START/,/CRYPT DELETE END/d" \
1080Sstevel@tonic-gate			< mech/dhmech.c > mech/dhmech.c+
1090Sstevel@tonic-gate	$(MV) mech/dhmech.c+ mech/dhmech.c
1100Sstevel@tonic-gate	$(CHMOD) 444 Makefile Makefile.com mech/dhmech.c
1110Sstevel@tonic-gate
1120Sstevel@tonic-gate# CRYPT DELETE END
1130Sstevel@tonic-gate# EXPORT DELETE END
1140Sstevel@tonic-gate
1150Sstevel@tonic-gate_msg: $(MSGDOMAIN) $(POFILE)
1160Sstevel@tonic-gate	$(RM) $(MSGDOMAIN)/$(POFILE)
1170Sstevel@tonic-gate	$(CP) $(POFILE) $(MSGDOMAIN)
1180Sstevel@tonic-gate
1190Sstevel@tonic-gate$(POFILE): $(DERIVED_FILES) .WAIT $(POFILES)
1200Sstevel@tonic-gate	$(RM) $@
1210Sstevel@tonic-gate	$(CAT) $(POFILES) > $@
1220Sstevel@tonic-gate
1230Sstevel@tonic-gategeneric.po:
1240Sstevel@tonic-gate	$(RM) messages.po
1250Sstevel@tonic-gate	$(XGETTEXT) $(XGETFLAGS) `$(GREP) -l gettext mech/*.[ch]`
1260Sstevel@tonic-gate	$(SED) "/^domain/d" messages.po > $@
1270Sstevel@tonic-gate	$(RM) messages.po
1280Sstevel@tonic-gate
1290Sstevel@tonic-gate$(MSGDOMAIN):
1300Sstevel@tonic-gate	$(INS.dir)
1310Sstevel@tonic-gate
1320Sstevel@tonic-gate$(MACH) $(MACH64):      FRC
1330Sstevel@tonic-gate	@cd $@; pwd; $(MAKE) $(TARGET)
1340Sstevel@tonic-gate
1350Sstevel@tonic-gateFRC:
136