xref: /titanic_50/usr/src/cmd/sgs/libconv/Makefile.targ (revision 99f63845ee65f89a523460ce4b6b0603a06eceb7)
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
55aefb655Srie# Common Development and Distribution License (the "License").
65aefb655Srie# 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#
215aefb655Srie
225aefb655Srie#
236a074c93Sab196087# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
245aefb655Srie# Use is subject to license terms.
257c478bd9Sstevel@tonic-gate#
267c478bd9Sstevel@tonic-gate# ident	"%Z%%M%	%I%	%E% SMI"
277c478bd9Sstevel@tonic-gate#
287c478bd9Sstevel@tonic-gate
297c478bd9Sstevel@tonic-gatepics/%.o:	../common/%.c
307c478bd9Sstevel@tonic-gate		$(COMPILE.c) -o $@ $<
317c478bd9Sstevel@tonic-gate		$(POST_PROCESS_O)
327c478bd9Sstevel@tonic-gate
337c478bd9Sstevel@tonic-gatepics/%.o:	%.s
347c478bd9Sstevel@tonic-gate		$(COMPILE.s) -o $@ $<
357c478bd9Sstevel@tonic-gate		$(POST_PROCESS_O)
367c478bd9Sstevel@tonic-gate
375aefb655Sriepics/%32.o:	../common/%.c
385aefb655Srie		$(COMPILE.c) -o $@ $<
395aefb655Srie		$(POST_PROCESS_O)
405aefb655Srie
415aefb655Sriepics/%64.o:	../common/%.c
425aefb655Srie		$(COMPILE.c) -D_ELF64 -o $@ $<
435aefb655Srie		$(POST_PROCESS_O)
445aefb655Srie
457c478bd9Sstevel@tonic-gatepics/elfcap.o:	$(ELFCAP)/elfcap.c
46*99f63845Sab196087		$(COMPILE.c) -o $@ $(ELFCAP)/elfcap.c
477c478bd9Sstevel@tonic-gate		$(POST_PROCESS_O)
487c478bd9Sstevel@tonic-gate
496a074c93Sab196087# This rule generates the report_bufsize.h include file used by libconv
506a074c93Sab196087# code to ensure that their private buffer size calculations agree with
516a074c93Sab196087# the public values exposed in sgs/include/conv.h. The limit value
526a074c93Sab196087# supplied must be larger than the largest buffer used in libconv. There
536a074c93Sab196087# is little penalty for making it very large, because the header file is
546a074c93Sab196087# only included in error situations where the compilation will fail.
556a074c93Sab196087#
566a074c93Sab196087# We make this depend on Makefile.targ, because a change to Makefile.targ
576a074c93Sab196087# can change the limit, in which case we want to force everything to rebuild.
586a074c93Sab196087report_bufsize.h:	../Makefile.targ
596a074c93Sab196087		perl ../../tools/libconv_mk_report_bufsize.pl 2000
606a074c93Sab196087
617c478bd9Sstevel@tonic-gate../common/%.c:	%_msg.h
627c478bd9Sstevel@tonic-gate
636a074c93Sab196087%_msg.h:	$(SGSMSG) ../common/%.msg report_bufsize.h
647c478bd9Sstevel@tonic-gate		$(SGSMSG) $(SGSMSGFLAGS) -l -h $@ -d $@ $<
657c478bd9Sstevel@tonic-gate
667c478bd9Sstevel@tonic-gate$(SGSMSG):	FRC
677c478bd9Sstevel@tonic-gate		@ cd $(SGSTOOLS)/$(MACH); pwd; $(MAKE) catalog
687c478bd9Sstevel@tonic-gate		@ pwd
697c478bd9Sstevel@tonic-gate
707c478bd9Sstevel@tonic-gatevernote.s:	bld_vernote $(ONLDREADME)
717c478bd9Sstevel@tonic-gate		./bld_vernote $(VERNOTE_DEBUG) -R $(ONLDREADME) \
727c478bd9Sstevel@tonic-gate			-r "$(RELEASE)" -o $@
737c478bd9Sstevel@tonic-gate
747c478bd9Sstevel@tonic-gatebld_vernote:	../common/bld_vernote.ksh
757c478bd9Sstevel@tonic-gate		$(RM) -f $@
767c478bd9Sstevel@tonic-gate		cp ../common/bld_vernote.ksh $@
777c478bd9Sstevel@tonic-gate		chmod a+x $@
787c478bd9Sstevel@tonic-gate
797c478bd9Sstevel@tonic-gate$(LIBRARY):	pics $$(PICS)
807c478bd9Sstevel@tonic-gate		@ $(RM) $(LIBRARY)
817c478bd9Sstevel@tonic-gate		$(AR) $(ARFLAGS) $@ $(PICS)
827c478bd9Sstevel@tonic-gate		$(POST_PROCESS_A)
837c478bd9Sstevel@tonic-gate
847c478bd9Sstevel@tonic-gatechkmsg:		$(LINTSRCS)
857c478bd9Sstevel@tonic-gate		sh $(CHKMSG) $(CHKMSGFLAGS) $(LINTSRCS)
867c478bd9Sstevel@tonic-gate
875aefb655Srie.PARALLEL:	$(LINTOUT32) $(LINTOUT64) $(LINTLIB32) $(LINTLIB64)
887c478bd9Sstevel@tonic-gate
895aefb655Srielint:		$(LINTLIB32) $(LINTOUT32) $(LINTLIB64) $(LINTOUT64) \
905aefb655Srie		    .WAIT $(SGSLINTOUT)
917c478bd9Sstevel@tonic-gate
927c478bd9Sstevel@tonic-gatecatalog:
937c478bd9Sstevel@tonic-gate
947c478bd9Sstevel@tonic-gatepics:
957c478bd9Sstevel@tonic-gate		-@mkdir -p $@
967c478bd9Sstevel@tonic-gate
977c478bd9Sstevel@tonic-gateclobber:	clean
987c478bd9Sstevel@tonic-gate		-$(RM) $(LIBRARY) $(CLOBBERFILES)
997c478bd9Sstevel@tonic-gate
1007c478bd9Sstevel@tonic-gateclean:
1017c478bd9Sstevel@tonic-gate		-$(RM) $(PICS) $(CLEANFILES)
1027c478bd9Sstevel@tonic-gate
1037c478bd9Sstevel@tonic-gatedelete:
1047c478bd9Sstevel@tonic-gate
1057c478bd9Sstevel@tonic-gateinclude		$(SRC)/cmd/sgs/Makefile.targ
106