xref: /illumos-gate/usr/src/psm/stand/lib/Makefile.lib (revision 91178d6b)
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
5*91178d6bSBill Moore# Common Development and Distribution License (the "License").
6*91178d6bSBill Moore# 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#
21*91178d6bSBill Moore# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
227c478bd9Sstevel@tonic-gate# Use is subject to license terms.
237c478bd9Sstevel@tonic-gate#
247c478bd9Sstevel@tonic-gate# psm/stand/lib/Makefile.lib
257c478bd9Sstevel@tonic-gate
267c478bd9Sstevel@tonic-gateinclude $(TOPDIR)/Makefile.master
277c478bd9Sstevel@tonic-gateinclude $(TOPDIR)/Makefile.psm
287c478bd9Sstevel@tonic-gate
297c478bd9Sstevel@tonic-gateSTANDDIR	= $(TOPDIR)/stand
307c478bd9Sstevel@tonic-gatePSMSTANDDIR	= $(TOPDIR)/psm/stand
317c478bd9Sstevel@tonic-gate
327c478bd9Sstevel@tonic-gateSYSHDRDIR	= $(STANDDIR)
337c478bd9Sstevel@tonic-gateSYSLIBDIR	= $(STANDDIR)/lib/$(MACH)
347c478bd9Sstevel@tonic-gate
357c478bd9Sstevel@tonic-gatePSMSYSHDRDIR	= $(PSMSTANDDIR)
367c478bd9Sstevel@tonic-gatePSMBOOTLIBDIR	= $(PSMSTANDDIR)/lib/boot/$(MACH)
377c478bd9Sstevel@tonic-gatePSMNAMELIBDIR	= $(PSMSTANDDIR)/lib/names/$(MACH)
387c478bd9Sstevel@tonic-gatePSMPROMLIBDIR	= $(PSMSTANDDIR)/lib/promif/$(MACH)
397c478bd9Sstevel@tonic-gate
407c478bd9Sstevel@tonic-gate#
417c478bd9Sstevel@tonic-gate# Lint rules (adapted from Makefile.uts)
427c478bd9Sstevel@tonic-gate#
43*91178d6bSBill MooreLHEAD		= $(ECHO) "\n$@";
44*91178d6bSBill MooreLTAIL		=
457c478bd9Sstevel@tonic-gateLINT_DEFS	+= -Dlint
467c478bd9Sstevel@tonic-gate
477c478bd9Sstevel@tonic-gate#
487c478bd9Sstevel@tonic-gate# For building lint objects
497c478bd9Sstevel@tonic-gate#
50*91178d6bSBill MooreLINTFLAGS.c	= -nsxum -erroff=E_BAD_PTR_CAST_ALIGN
517c478bd9Sstevel@tonic-gateLINTFLAGS.c	+= $(ALWAYS_LINT_DEFS)
52*91178d6bSBill MooreLINTFLAGS64.c	= -nsxum -erroff=E_BAD_PTR_CAST_ALIGN
537c478bd9Sstevel@tonic-gateLINTFLAGS64.c	+= $(ALWAYS_LINT_DEFS)
547c478bd9Sstevel@tonic-gateLINT64.c	= $(LINT) $(LINTFLAGS64.c) $(LINT_DEFS) $(CPPFLAGS) -c
557c478bd9Sstevel@tonic-gateLINT.c		= $(LINT) $(LINTFLAGS.c) $(LINT_DEFS) $(CPPFLAGS) -c
567c478bd9Sstevel@tonic-gateLINT.s		= $(LINT) $(LINTFLAGS.s) $(LINT_DEFS) $(CPPFLAGS) -c
577c478bd9Sstevel@tonic-gate
587c478bd9Sstevel@tonic-gate#
597c478bd9Sstevel@tonic-gate# For building lint libraries
607c478bd9Sstevel@tonic-gate#
617c478bd9Sstevel@tonic-gateLINTFLAGS.lib	= -nsxumy
627c478bd9Sstevel@tonic-gateLINTFLAGS.lib	+= $(ALWAYS_LINT_DEFS)
637c478bd9Sstevel@tonic-gateLINT.lib	= $(LINT) $(LINTFLAGS.lib) $(LINT_DEFS) $(CPPFLAGS)
647c478bd9Sstevel@tonic-gate
657c478bd9Sstevel@tonic-gate#
667c478bd9Sstevel@tonic-gate# For complete pass 2 cross-checks
677c478bd9Sstevel@tonic-gate#
687c478bd9Sstevel@tonic-gateLINTFLAGS.2	= -nsxm
697c478bd9Sstevel@tonic-gateLINT.2		= $(LINT) $(LINTFLAGS.2) $(LINT_DEFS) $(CPPFLAGS)
707c478bd9Sstevel@tonic-gate
717c478bd9Sstevel@tonic-gate#
727c478bd9Sstevel@tonic-gate# Simple rule for making objs/%.ln from %.c and %.s
737c478bd9Sstevel@tonic-gate#
747c478bd9Sstevel@tonic-gate
757c478bd9Sstevel@tonic-gateobjs/%.ln:	%.c
767c478bd9Sstevel@tonic-gate	@($(LHEAD) $(LINT.c) $< $(LTAIL))
777c478bd9Sstevel@tonic-gate	@$(MV) $(@F) $@
787c478bd9Sstevel@tonic-gate
797c478bd9Sstevel@tonic-gateobjs/%.ln:	%.s
807c478bd9Sstevel@tonic-gate	@($(LHEAD) $(LINT.c) $< $(LTAIL))
817c478bd9Sstevel@tonic-gate	@$(MV) $(@F) $@
827c478bd9Sstevel@tonic-gate
83