xref: /illumos-gate/usr/src/lib/libprtdiag/Makefile.com (revision 03831d35f7499c87d51205817c93e9a8d42c4bae)
1*03831d35Sstevel#
2*03831d35Sstevel# CDDL HEADER START
3*03831d35Sstevel#
4*03831d35Sstevel# The contents of this file are subject to the terms of the
5*03831d35Sstevel# Common Development and Distribution License (the "License").
6*03831d35Sstevel# You may not use this file except in compliance with the License.
7*03831d35Sstevel#
8*03831d35Sstevel# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*03831d35Sstevel# or http://www.opensolaris.org/os/licensing.
10*03831d35Sstevel# See the License for the specific language governing permissions
11*03831d35Sstevel# and limitations under the License.
12*03831d35Sstevel#
13*03831d35Sstevel# When distributing Covered Code, include this CDDL HEADER in each
14*03831d35Sstevel# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*03831d35Sstevel# If applicable, add the following below this CDDL HEADER, with the
16*03831d35Sstevel# fields enclosed by brackets "[]" replaced with your own identifying
17*03831d35Sstevel# information: Portions Copyright [yyyy] [name of copyright owner]
18*03831d35Sstevel#
19*03831d35Sstevel# CDDL HEADER END
20*03831d35Sstevel#
21*03831d35Sstevel#
22*03831d35Sstevel# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
23*03831d35Sstevel# Use is subject to license terms.
24*03831d35Sstevel#
25*03831d35Sstevel# ident	"%Z%%M%	%I%	%E% SMI"
26*03831d35Sstevel#
27*03831d35Sstevel
28*03831d35Sstevel#
29*03831d35Sstevel#	Create default so empty rules don't
30*03831d35Sstevel#	confuse make
31*03831d35Sstevel#
32*03831d35SstevelCLASS		= 32
33*03831d35SstevelUTSBASE 	= $(SRC)/uts
34*03831d35Sstevel
35*03831d35SstevelLIBRARY		= libprtdiag.a
36*03831d35SstevelVERS		= .1
37*03831d35Sstevel
38*03831d35Sstevelinclude $(SRC)/lib/Makefile.lib
39*03831d35Sstevelinclude $(SRC)/Makefile.psm
40*03831d35Sstevel
41*03831d35SstevelLIBS		= $(DYNLIB) $(LINTLIB)
42*03831d35SstevelIFLAGS		= -I ../../inc -I $(USR_PSM_INCL_DIR)
43*03831d35SstevelIFLAGS		+= -I $(UTSBASE)/sun4u
44*03831d35SstevelIFLAGS		+= -I $(UTSBASE)/sun4u/sunfire
45*03831d35SstevelIFLAGS		+= -I $(UTSBASE)/sun4u/serengeti
46*03831d35SstevelCPPFLAGS	= $(IFLAGS) $(CPPFLAGS.master)
47*03831d35SstevelCFLAGS		+= $(CCVERBOSE)
48*03831d35SstevelLDLIBS		+= -lc -lkstat
49*03831d35SstevelDYNFLAGS	+= -Wl,-f/usr/platform/\$$PLATFORM/lib/$(DYNLIBPSR)
50*03831d35Sstevel
51*03831d35SstevelSRCDIR		= ../../common
52*03831d35Sstevel$(LINTLIB)	:= SRCS = $(SRCDIR)/$(LINTSRC)
53*03831d35SstevelUSR_PSMLINT=	$(LINTSRC:%=$(USR_PSM_LIB_DIR)/%)
54*03831d35Sstevel
55*03831d35Sstevel#
56*03831d35Sstevel# install rule
57*03831d35Sstevel#
58*03831d35Sstevel$(USR_PSM_LIB_DIR)/%: % $(USR_PSM_LIB_DIR)
59*03831d35Sstevel	$(INS.file) ;\
60*03831d35Sstevel	$(RM) -r $(USR_PSM_LIB_DIR)/libprtdiag.so ;\
61*03831d35Sstevel	$(SYMLINK) ./libprtdiag.so$(VERS) $(USR_PSM_LIB_DIR)/libprtdiag.so
62*03831d35Sstevel
63*03831d35Sstevel$(USR_PSM_LIB_DIR)/%:	$(SRCDIR)/%
64*03831d35Sstevel	$(INS.file)
65*03831d35Sstevel
66*03831d35Sstevel#
67*03831d35Sstevel# build rules
68*03831d35Sstevel#
69*03831d35Sstevelobjs/%.o pics/%.o:	../../common/%.c
70*03831d35Sstevel	$(COMPILE.c) -o $@ $<
71*03831d35Sstevel	$(POST_PROCESS_O)
72