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