Makefile.com revision 7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fe
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
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi#
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi# Use is subject to license terms.
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi#
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi# ident "%Z%%M% %I% %E% SMI"
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiLIBRARY = libtopo.a
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiVERS = .1
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiBUILTINSRCS = \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi cpu.c \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi hc.c \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi mem.c \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi mod.c \
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi pkg.c
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiLIBSRCS = \
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
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiSRCDIR = ../common
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiSPECMAPFILE = $(MAPDIR)/mapfile
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
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi$(DYNLIB) := LDLIBS += -lnvpair -lelf -lumem -lxml2 -lkstat -luuid -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
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi sh ../common/mkerror.sh internal < ../common/topo_error.h > $@
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi sh ../common/mkerror.sh external < ../common/topo_mod.h >> $@
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindi
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiinclude ../../../../Makefile.targ
7aec1d6e253b21f9e9b7ef68b4d81ab9859b51fecindiinclude ../../../Makefile.targ