Makefile.com revision 825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi#
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi# CDDL HEADER START
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi#
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi# The contents of this file are subject to the terms of the
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi# Common Development and Distribution License (the "License").
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi# You may not use this file except in compliance with the License.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi#
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi# or http://www.opensolaris.org/os/licensing.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi# See the License for the specific language governing permissions
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi# and limitations under the License.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi#
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi# When distributing Covered Code, include this CDDL HEADER in each
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi# If applicable, add the following below this CDDL HEADER, with the
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi# fields enclosed by brackets "[]" replaced with your own identifying
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi# information: Portions Copyright [yyyy] [name of copyright owner]
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi#
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi# CDDL HEADER END
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi#
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi#
2eeaed14a5e2ed9bd811643ad5bffc3510ca0310robj# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi# Use is subject to license terms.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi#
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi# ident "%Z%%M% %I% %E% SMI"
f808c858fa61e7769218966759510a8b1190dfcfraf#
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiLIBRARY = libtopo.a
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiVERS = .1
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiBUILTINSRCS = \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi cpu.c \
74a31ce69a88d851777ca840d31ec610ce9ecab3timh dev.c \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi hc.c \
b7d3956b92a285d8dac2c7f5f7e28d2ef5347ef8stephh zfs.c \
b7d3956b92a285d8dac2c7f5f7e28d2ef5347ef8stephh fmd.c \
b7d3956b92a285d8dac2c7f5f7e28d2ef5347ef8stephh legacy_hc.c \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi mem.c \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi mod.c \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi pkg.c
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiLIBSRCS = \
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi topo_2xml.c \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi topo_alloc.c \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi topo_builtin.c \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi topo_error.c \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi topo_file.c \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi topo_fmri.c \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi topo_list.c \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi topo_method.c \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi topo_mod.c \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi topo_module.c \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi topo_node.c \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi topo_nvl.c \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi topo_parse.c \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi topo_prop.c \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi topo_protocol.c \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi topo_rtld.c \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi topo_snap.c \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi topo_string.c \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi topo_subr.c \
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj topo_tables.c \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi topo_tree.c \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi topo_xml.c
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiOBJECTS = $(BUILTINSRCS:%.c=%.o) $(LIBSRCS:%.c=%.o)
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiinclude ../../../../Makefile.lib
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiinclude ../../../Makefile.lib
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiSRCS = $(BUILTINSRCS:%.c=../common/%.c) $(LIBSRCS:%.c=../common/%.c)
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiLIBS = $(DYNLIB) $(LINTLIB)
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
f808c858fa61e7769218966759510a8b1190dfcfrafSRCDIR = ../common
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robjCLEANFILES += $(SRCDIR)/topo_error.c $(SRCDIR)/topo_tables.c
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiCPPFLAGS += -I../common -I/usr/include/libxml2 -I.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiCFLAGS += $(CCVERBOSE) $(C_BIGPICFLAGS)
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiCFLAGS += -D_POSIX_PTHREAD_SEMANTICS
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiCFLAGS64 += $(CCVERBOSE) $(C_BIGPICFLAGS)
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiLINTFLAGS = -msux
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiLINTFLAGS64 = -msux -Xarch=$(MACH64:sparcv9=v9)
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi$(DYNLIB) := LDLIBS += \
24db46411fd54f70c35b94bb952eb7ba040e43b4eschrock -lnvpair -lelf -lumem -lxml2 -lkstat -luuid -ldevinfo \
2eeaed14a5e2ed9bd811643ad5bffc3510ca0310robj -lsmbios -lc -ldevid -lipmi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi$(LINTLIB) := SRCS = $(SRCDIR)/$(LINTSRC)
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi$(LINTLIB) := LINTFLAGS = -nsvx
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi$(LINTLIB) := LINTFLAGS64 = -nsvx -Xarch=$(MACH64:sparcv9=v9)
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi$(LINTLIB) := LDLIBS += -lnvpair -lumem -lc
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi.KEEP_STATE:
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiall: $(LIBS)
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindilint: $(LINTLIB) lintcheck
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindipics/%.o: ../$(MACH)/%.c
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi $(COMPILE.c) -o $@ $<
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi $(POST_PROCESS_O)
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi%.o: ../common/%.c
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi $(COMPILE.c) -o $@ $<
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi $(POST_PROCESS_O)
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi../common/topo_error.c: ../common/mkerror.sh ../common/topo_error.h
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi sh ../common/mkerror.sh liberrors < ../common/topo_error.h > $@
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi sh ../common/mkerror.sh properrors < ../common/libtopo.h >> $@
dd566498928f08e7c9a79797a40db893c6a4b9fbvn sh ../common/mkerror.sh methoderrors < ../common/libtopo.h >> $@
c40d7343efa60b18ad1ceb316eb337caeea79046cindi sh ../common/mkerror.sh fmrierrors < ../common/libtopo.h >> $@
c40d7343efa60b18ad1ceb316eb337caeea79046cindi sh ../common/mkerror.sh hdlerrors < ../common/libtopo.h >> $@
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi sh ../common/mkerror.sh moderrors < ../common/topo_mod.h >> $@
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj$(SRCDIR)/topo_tables.c: $(SRCDIR)/mktables.sh $(SRCDIR)/libtopo.h
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj sh $(SRCDIR)/mktables.sh $(SRCDIR)/libtopo.h > $@
825ba0f20a74fd9c5d0d1ce2c195da2cc88a7f77robj
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiinclude ../../../../Makefile.targ
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiinclude ../../../Makefile.targ