103831d35Sstevel#
203831d35Sstevel# CDDL HEADER START
303831d35Sstevel#
403831d35Sstevel# The contents of this file are subject to the terms of the
503831d35Sstevel# Common Development and Distribution License (the "License").
603831d35Sstevel# 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#
220d63ce2bSvenki# Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
2303831d35Sstevel# Use is subject to license terms.
242bcbf80cSPeter Tribble# Copyright 2020 Peter Tribble.
2503831d35Sstevel#
2603831d35Sstevel
2703831d35Sstevel#
2803831d35Sstevel#	Create default so empty rules don't
2903831d35Sstevel#	confuse make
3003831d35Sstevel#
3103831d35SstevelCLASS		= 32
32241c90a0SRichard LoweUTSBASE		= $(SRC)/uts
3303831d35Sstevel
3403831d35SstevelLIBRARY		= libprtdiag.a
3503831d35SstevelVERS		= .1
3603831d35Sstevel
3703831d35Sstevelinclude $(SRC)/lib/Makefile.lib
3803831d35Sstevelinclude $(SRC)/Makefile.psm
3903831d35Sstevel
40*6fb59094SToomas SoomeCSTD		= $(CSTD_GNU99)
41241c90a0SRichard LoweLIBS		= $(DYNLIB)
4203831d35SstevelIFLAGS		= -I ../../inc -I $(USR_PSM_INCL_DIR)
430d63ce2bSvenkiIFLAGS		+= -I $(SRC)/cmd/picl/plugins/inc
442bcbf80cSPeter TribbleIFLAGS		+= -I $(UTSBASE)/sun4u
4503831d35SstevelIFLAGS		+= -I $(UTSBASE)/sun4u/serengeti
4603831d35SstevelCPPFLAGS	= $(IFLAGS) $(CPPFLAGS.master)
4703831d35SstevelCFLAGS		+= $(CCVERBOSE)
487014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-parentheses
49d3b5f563SJohn LevonCERRWARN	+= $(CNOWARN_UNINIT)
507014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-unused-variable
517014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-unused-value
527014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-unused-label
53aa52b40eSfwLDLIBS		+= -lc -lkstat
5403831d35SstevelDYNFLAGS	+= -Wl,-f/usr/platform/\$$PLATFORM/lib/$(DYNLIBPSR)
5503831d35Sstevel
56f808c858Sraf# There should be a mapfile here
57f808c858SrafMAPFILES =
58f808c858Sraf
5903831d35SstevelSRCDIR		= ../../common
6003831d35Sstevel
6103831d35Sstevel#
6203831d35Sstevel# install rule
6303831d35Sstevel#
6403831d35Sstevel$(USR_PSM_LIB_DIR)/%: % $(USR_PSM_LIB_DIR)
6503831d35Sstevel	$(INS.file) ;\
6603831d35Sstevel	$(RM) -r $(USR_PSM_LIB_DIR)/libprtdiag.so ;\
6703831d35Sstevel	$(SYMLINK) ./libprtdiag.so$(VERS) $(USR_PSM_LIB_DIR)/libprtdiag.so
6803831d35Sstevel
6903831d35Sstevel$(USR_PSM_LIB_DIR)/%:	$(SRCDIR)/%
7003831d35Sstevel	$(INS.file)
7103831d35Sstevel
7203831d35Sstevel#
7303831d35Sstevel# build rules
7403831d35Sstevel#
7503831d35Sstevelobjs/%.o pics/%.o:	../../common/%.c
7603831d35Sstevel	$(COMPILE.c) -o $@ $<
7703831d35Sstevel	$(POST_PROCESS_O)
78