xref: /titanic_52/usr/src/psm/stand/lib/Makefile.lib (revision 6185db853e024a486ff8837e6784dd290d866112)
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, Version 1.0 only
6# (the "License").  You may not use this file except in compliance
7# with the License.
8#
9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10# or http://www.opensolaris.org/os/licensing.
11# See the License for the specific language governing permissions
12# and limitations under the License.
13#
14# When distributing Covered Code, include this CDDL HEADER in each
15# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16# If applicable, add the following below this CDDL HEADER, with the
17# fields enclosed by brackets "[]" replaced with your own identifying
18# information: Portions Copyright [yyyy] [name of copyright owner]
19#
20# CDDL HEADER END
21#
22#
23#ident	"%Z%%M%	%I%	%E% SMI"
24#
25# Copyright 1994, 2003 Sun Microsystems, Inc.
26# All rights reserved.
27# Use is subject to license terms.
28#
29# psm/stand/lib/Makefile.lib
30
31include $(TOPDIR)/Makefile.master
32include $(TOPDIR)/Makefile.psm
33
34STANDDIR	= $(TOPDIR)/stand
35PSMSTANDDIR	= $(TOPDIR)/psm/stand
36
37SYSHDRDIR	= $(STANDDIR)
38SYSLIBDIR	= $(STANDDIR)/lib/$(MACH)
39
40PSMSYSHDRDIR	= $(PSMSTANDDIR)
41PSMBOOTLIBDIR	= $(PSMSTANDDIR)/lib/boot/$(MACH)
42PSMNAMELIBDIR	= $(PSMSTANDDIR)/lib/names/$(MACH)
43PSMPROMLIBDIR	= $(PSMSTANDDIR)/lib/promif/$(MACH)
44
45#
46# Lint rules (adapted from Makefile.uts)
47#
48LHEAD		= ( $(ECHO) "\n$@";
49LGREP		= grep -v "pointer cast may result in improper alignment"
50LTAIL		= ) 2>&1 | $(LGREP)
51LINT_DEFS	+= -Dlint
52
53#
54# For building lint objects
55#
56LINTFLAGS.c	= -nsxum
57LINTFLAGS.c	+= $(ALWAYS_LINT_DEFS)
58LINTFLAGS64.c	= -nsxum
59LINTFLAGS64.c	+= $(ALWAYS_LINT_DEFS)
60LINT64.c	= $(LINT) $(LINTFLAGS64.c) $(LINT_DEFS) $(CPPFLAGS) -c
61LINT.c		= $(LINT) $(LINTFLAGS.c) $(LINT_DEFS) $(CPPFLAGS) -c
62LINT.s		= $(LINT) $(LINTFLAGS.s) $(LINT_DEFS) $(CPPFLAGS) -c
63
64#
65# For building lint libraries
66#
67LINTFLAGS.lib	= -nsxumy
68LINTFLAGS.lib	+= $(ALWAYS_LINT_DEFS)
69LINT.lib	= $(LINT) $(LINTFLAGS.lib) $(LINT_DEFS) $(CPPFLAGS)
70
71#
72# For complete pass 2 cross-checks
73#
74LINTFLAGS.2	= -nsxm
75LINT.2		= $(LINT) $(LINTFLAGS.2) $(LINT_DEFS) $(CPPFLAGS)
76
77#
78# Simple rule for making objs/%.ln from %.c and %.s
79#
80
81objs/%.ln:	%.c
82	@($(LHEAD) $(LINT.c) $< $(LTAIL))
83	@$(MV) $(@F) $@
84
85objs/%.ln:	%.s
86	@($(LHEAD) $(LINT.c) $< $(LTAIL))
87	@$(MV) $(@F) $@
88
89