103831d35Sstevel#
203831d35Sstevel# CDDL HEADER START
303831d35Sstevel#
403831d35Sstevel# The contents of this file are subject to the terms of the
5f808c858Sraf# Common Development and Distribution License (the "License").
6f808c858Sraf# You may not use this file except in compliance with the License.
703831d35Sstevel#
803831d35Sstevel# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
903831d35Sstevel# or http://www.opensolaris.org/os/licensing.
1003831d35Sstevel# See the License for the specific language governing permissions
1103831d35Sstevel# and limitations under the License.
1203831d35Sstevel#
1303831d35Sstevel# When distributing Covered Code, include this CDDL HEADER in each
1403831d35Sstevel# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1503831d35Sstevel# If applicable, add the following below this CDDL HEADER, with the
1603831d35Sstevel# fields enclosed by brackets "[]" replaced with your own identifying
1703831d35Sstevel# information: Portions Copyright [yyyy] [name of copyright owner]
1803831d35Sstevel#
1903831d35Sstevel# CDDL HEADER END
2003831d35Sstevel#
2103831d35Sstevel#
2224fe0b3bSjmcp# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
2303831d35Sstevel# Use is subject to license terms.
24*2bcbf80cSPeter Tribble# Copyright 2020 Peter Tribble.
2503831d35Sstevel#
2603831d35Sstevel
2703831d35SstevelLIBRARY= libprtdiag_psr.a
2803831d35SstevelVERS= .1
2903831d35Sstevel
3003831d35Sstevel#
3103831d35Sstevel# PSR_MACH is defined sun4u so previous sun4u platforms can still continue
3203831d35Sstevel# to use sun4u libraries but sun4v platforms can override it to use sun4v
3303831d35Sstevel# libraries.
3403831d35Sstevel#
3503831d35SstevelPSR_MACH= sun4u
3603831d35Sstevel#
37*2bcbf80cSPeter Tribble# PLATFORM_OBJECTS is defined in ./desktop ./wgs Makefiles
3803831d35Sstevel#
3903831d35SstevelOBJECTS= $(PLATFORM_OBJECTS)
4003831d35Sstevel
4103831d35Sstevel# include library definitions
4203831d35Sstevelinclude $(SRC)/lib/Makefile.lib
4303831d35Sstevelinclude $(SRC)/Makefile.psm
4403831d35Sstevel
4503831d35SstevelSRCS=		$(OBJECTS:%.o=./common/%.c)
4603831d35Sstevel
4703831d35SstevelLIBS = $(DYNLIB)
4803831d35Sstevel
49f808c858Sraf# There should be a mapfile here
50f808c858SrafMAPFILES =
51f808c858Sraf
5203831d35SstevelCFLAGS +=	$(CCVERBOSE)
537014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-unused-variable
547014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-parentheses
557014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-unused-value
567014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-unused-function
57d3b5f563SJohn LevonCERRWARN +=	$(CNOWARN_UNINIT)
587014882cSRichard LoweCERRWARN +=	-_gcc=-Wno-address
59*2bcbf80cSPeter TribbleIFLAGS +=	-I $(UTSBASE)/sun4u
6003831d35SstevelCPPFLAGS =	$(IFLAGS) $(CPPFLAGS.master)
6103831d35SstevelLDLIBS +=	-L $(ROOT)/usr/platform/$(PSR_MACH)/lib -lprtdiag -lc
6203831d35SstevelDYNFLAGS +=	-R /usr/platform/$(PSR_MACH)/lib
6324fe0b3bSjmcpINS.slink6=	$(RM) -r $@; $(SYMLINK) ../../$(PLATFORM)/lib/libprtdiag_psr.so.1 $@
6403831d35Sstevel
6503831d35Sstevel.KEEP_STATE:
6603831d35Sstevel
6703831d35Sstevelall: $(LIBS)
6803831d35Sstevel
6903831d35Sstevel
7003831d35Sstevel# include library targets
7103831d35Sstevelinclude $(SRC)/lib/Makefile.targ
7203831d35Sstevel
7303831d35Sstevelobjs/%.o pics/%.o: ./common/%.c
7403831d35Sstevel	$(COMPILE.c) -o $@ $<
7503831d35Sstevel	$(POST_PROCESS_O)
76