Makefile.com revision c40d7343efa60b18ad1ceb316eb337caeea79046
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#
dd566498928f08e7c9a79797a40db893c6a4b9fbvn# Copyright 2007 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 \
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 \
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
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiCLEANFILES += ../common/topo_error.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 += \
0eb822a1c0c2bea495647510b75f77f0e57633ebcindi -lnvpair -lelf -lumem -lxml2 -lkstat -luuid -ldevinfo -lsmbios -lc
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
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiinclude ../../../../Makefile.targ
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiinclude ../../../Makefile.targ