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# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26# ident	"%Z%%M%	%I%	%E% SMI"
27#
28
29LIBRARY= libprtdiag_psr.a
30VERS= .1
31
32#
33# PSR_MACH is defined sun4u so previous sun4u platforms can still continue
34# to use sun4u libraries but sun4v platforms can override it to use sun4v
35# libraries.
36#
37PSR_MACH= sun4u
38#
39# PLATFORM_OBJECTS is defined in ./desktop ./wgs ./sunfire ./starfire Makefiles
40#
41OBJECTS= $(PLATFORM_OBJECTS)
42
43# include library definitions
44include $(SRC)/lib/Makefile.lib
45include $(SRC)/Makefile.psm
46
47SRCS=		$(OBJECTS:%.o=./common/%.c)
48
49LIBS = $(DYNLIB)
50
51CFLAGS +=	$(CCVERBOSE)
52IFLAGS +=	-I $(UTSBASE)/sun4u
53IFLAGS +=	-I $(UTSCLOSED)/sun4u
54IFLAGS +=	-I $(UTSCLOSED)/sun4u/sunfire -I $(UTSBASE)/sun4u/sunfire
55CPPFLAGS =	$(IFLAGS) $(CPPFLAGS.master)
56LDLIBS +=	-L $(ROOT)/usr/platform/$(PSR_MACH)/lib -lprtdiag -lc
57DYNFLAGS +=	-R /usr/platform/$(PSR_MACH)/lib
58INS.slink6=	$(RM) -r $@; $(SYMLINK) ../../$(PLATFORM)/lib/libprtdiag_psr.so.1 $@ $(CHOWNLINK) $(CHGRPLINK)
59
60.KEEP_STATE:
61
62all: $(LIBS)
63
64lint:	lintcheck
65
66# include library targets
67include $(SRC)/lib/Makefile.targ
68
69objs/%.o pics/%.o: ./common/%.c
70	$(COMPILE.c) -o $@ $<
71	$(POST_PROCESS_O)
72