xref: /illumos-gate/usr/src/psm/stand/lib/Makefile.lib (revision 45ede40b2394db7967e59f19288fae9b62efd4aa)
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# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
22# Use is subject to license terms.
23#
24# psm/stand/lib/Makefile.lib
25
26include $(TOPDIR)/Makefile.master
27include $(TOPDIR)/Makefile.psm
28
29STANDDIR	= $(TOPDIR)/stand
30PSMSTANDDIR	= $(TOPDIR)/psm/stand
31
32SYSHDRDIR	= $(STANDDIR)
33SYSLIBDIR	= $(STANDDIR)/lib/$(MACH)
34
35PSMSYSHDRDIR	= $(PSMSTANDDIR)
36PSMBOOTLIBDIR	= $(PSMSTANDDIR)/lib/boot/$(MACH)
37PSMNAMELIBDIR	= $(PSMSTANDDIR)/lib/names/$(MACH)
38PSMPROMLIBDIR	= $(PSMSTANDDIR)/lib/promif/$(MACH)
39
40#
41# Lint rules (adapted from Makefile.uts)
42#
43LHEAD		= $(ECHO) "\n$@";
44LTAIL		=
45LINT_DEFS	+= -Dlint
46
47#
48# For building lint objects
49#
50LINTFLAGS.c	= -nsxum -erroff=E_BAD_PTR_CAST_ALIGN
51LINTFLAGS.c	+= $(ALWAYS_LINT_DEFS)
52LINTFLAGS64.c	= -nsxum -erroff=E_BAD_PTR_CAST_ALIGN
53LINTFLAGS64.c	+= $(ALWAYS_LINT_DEFS)
54LINT64.c	= $(LINT) $(LINTFLAGS64.c) $(LINT_DEFS) $(CPPFLAGS) -c
55LINT.c		= $(LINT) $(LINTFLAGS.c) $(LINT_DEFS) $(CPPFLAGS) -c
56LINT.s		= $(LINT) $(LINTFLAGS.s) $(LINT_DEFS) $(CPPFLAGS) -c
57
58#
59# For building lint libraries
60#
61LINTFLAGS.lib	= -nsxumy
62LINTFLAGS.lib	+= $(ALWAYS_LINT_DEFS)
63LINT.lib	= $(LINT) $(LINTFLAGS.lib) $(LINT_DEFS) $(CPPFLAGS)
64
65#
66# For complete pass 2 cross-checks
67#
68LINTFLAGS.2	= -nsxm
69LINT.2		= $(LINT) $(LINTFLAGS.2) $(LINT_DEFS) $(CPPFLAGS)
70
71#
72# Simple rule for making objs/%.ln from %.c and %.s
73#
74
75objs/%.ln:	%.c
76	@($(LHEAD) $(LINT.c) $< $(LTAIL))
77	@$(MV) $(@F) $@
78
79objs/%.ln:	%.s
80	@($(LHEAD) $(LINT.c) $< $(LTAIL))
81	@$(MV) $(@F) $@
82
83