xref: /titanic_50/usr/src/lib/fm/topo/libtopo/Makefile.com (revision 494f7e12a62129ef191a15f9dfde6b7abe3bf510)
17aec1d6eScindi#
27aec1d6eScindi# CDDL HEADER START
37aec1d6eScindi#
47aec1d6eScindi# The contents of this file are subject to the terms of the
57aec1d6eScindi# Common Development and Distribution License (the "License").
67aec1d6eScindi# You may not use this file except in compliance with the License.
77aec1d6eScindi#
87aec1d6eScindi# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97aec1d6eScindi# or http://www.opensolaris.org/os/licensing.
107aec1d6eScindi# See the License for the specific language governing permissions
117aec1d6eScindi# and limitations under the License.
127aec1d6eScindi#
137aec1d6eScindi# When distributing Covered Code, include this CDDL HEADER in each
147aec1d6eScindi# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157aec1d6eScindi# If applicable, add the following below this CDDL HEADER, with the
167aec1d6eScindi# fields enclosed by brackets "[]" replaced with your own identifying
177aec1d6eScindi# information: Portions Copyright [yyyy] [name of copyright owner]
187aec1d6eScindi#
197aec1d6eScindi# CDDL HEADER END
207aec1d6eScindi#
217aec1d6eScindi#
22f6e214c7SGavin Maltby# Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
237aec1d6eScindi#
247aec1d6eScindi
257aec1d6eScindiLIBRARY = libtopo.a
267aec1d6eScindiVERS = .1
277aec1d6eScindi
287aec1d6eScindiBUILTINSRCS = \
297aec1d6eScindi	cpu.c \
3074a31ce6Stimh	dev.c \
31b7d3956bSstephh	fmd.c \
3295efa359SEric Schrock	hc.c \
33b7d3956bSstephh	legacy_hc.c \
347aec1d6eScindi	mem.c \
357aec1d6eScindi	mod.c \
3695efa359SEric Schrock	pkg.c \
3795efa359SEric Schrock	svc.c \
38f6e214c7SGavin Maltby	sw.c \
3995efa359SEric Schrock	zfs.c
407aec1d6eScindi
417aec1d6eScindiLIBSRCS = \
420eb822a1Scindi	topo_2xml.c \
437aec1d6eScindi	topo_alloc.c \
447aec1d6eScindi	topo_builtin.c \
457aec1d6eScindi	topo_error.c \
467aec1d6eScindi	topo_file.c \
477aec1d6eScindi	topo_fmri.c \
487aec1d6eScindi	topo_list.c \
497aec1d6eScindi	topo_method.c \
507aec1d6eScindi	topo_mod.c \
517aec1d6eScindi	topo_module.c \
527aec1d6eScindi	topo_node.c \
537aec1d6eScindi	topo_nvl.c \
547aec1d6eScindi	topo_parse.c \
557aec1d6eScindi	topo_prop.c \
567aec1d6eScindi	topo_protocol.c \
577aec1d6eScindi	topo_rtld.c \
587aec1d6eScindi	topo_snap.c \
597aec1d6eScindi	topo_string.c \
607aec1d6eScindi	topo_subr.c \
61825ba0f2Srobj	topo_tables.c \
627aec1d6eScindi	topo_tree.c \
637aec1d6eScindi	topo_xml.c
647aec1d6eScindi
657aec1d6eScindiOBJECTS = $(BUILTINSRCS:%.c=%.o) $(LIBSRCS:%.c=%.o)
667aec1d6eScindi
677aec1d6eScindiinclude ../../../../Makefile.lib
687aec1d6eScindiinclude ../../../Makefile.lib
697aec1d6eScindi
707aec1d6eScindiSRCS = $(BUILTINSRCS:%.c=../common/%.c) $(LIBSRCS:%.c=../common/%.c)
717aec1d6eScindiLIBS = $(DYNLIB) $(LINTLIB)
727aec1d6eScindi
737aec1d6eScindiSRCDIR =	../common
747aec1d6eScindi
75825ba0f2SrobjCLEANFILES += $(SRCDIR)/topo_error.c $(SRCDIR)/topo_tables.c
767aec1d6eScindi
77*494f7e12SKeith M WesolowskiCPPFLAGS += -I../common -I$(ADJUNCT_PROTO)/usr/include/libxml2 -I.
787aec1d6eScindiCFLAGS += $(CCVERBOSE) $(C_BIGPICFLAGS)
797aec1d6eScindiCFLAGS += -D_POSIX_PTHREAD_SEMANTICS
807aec1d6eScindiCFLAGS64 += $(CCVERBOSE) $(C_BIGPICFLAGS)
817014882cSRichard LoweCERRWARN += -_gcc=-Wno-uninitialized
827014882cSRichard LoweCERRWARN += -_gcc=-Wno-switch
837014882cSRichard LoweCERRWARN += -_gcc=-Wno-parentheses
847aec1d6eScindi
857aec1d6eScindiLINTFLAGS = -msux
860bb07399SNick ToddLINTFLAGS64 = -msux -m64
877aec1d6eScindi
880eb822a1Scindi$(DYNLIB)  := LDLIBS += \
8924db4641Seschrock	-lnvpair -lelf -lumem -lxml2 -lkstat -luuid -ldevinfo \
9095efa359SEric Schrock	-lsmbios -lc -ldevid -lipmi -lscf
917aec1d6eScindi
927aec1d6eScindi$(LINTLIB) := SRCS = $(SRCDIR)/$(LINTSRC)
937aec1d6eScindi$(LINTLIB) := LINTFLAGS = -nsvx
940bb07399SNick Todd$(LINTLIB) := LINTFLAGS64 = -nsvx -m64
957aec1d6eScindi$(LINTLIB) := LDLIBS += -lnvpair -lumem -lc
967aec1d6eScindi
977aec1d6eScindi.KEEP_STATE:
987aec1d6eScindi
997aec1d6eScindiall: $(LIBS)
1007aec1d6eScindi
1017aec1d6eScindilint: $(LINTLIB) lintcheck
1027aec1d6eScindi
1037aec1d6eScindipics/%.o: ../$(MACH)/%.c
1047aec1d6eScindi	$(COMPILE.c) -o $@ $<
1057aec1d6eScindi	$(POST_PROCESS_O)
1067aec1d6eScindi
1077aec1d6eScindi%.o: ../common/%.c
1087aec1d6eScindi	$(COMPILE.c) -o $@ $<
1097aec1d6eScindi	$(POST_PROCESS_O)
1107aec1d6eScindi
1117aec1d6eScindi../common/topo_error.c: ../common/mkerror.sh ../common/topo_error.h
1120eb822a1Scindi	sh ../common/mkerror.sh liberrors < ../common/topo_error.h > $@
1130eb822a1Scindi	sh ../common/mkerror.sh properrors < ../common/libtopo.h >> $@
114dd566498Svn83148	sh ../common/mkerror.sh methoderrors < ../common/libtopo.h >> $@
115c40d7343Scindi	sh ../common/mkerror.sh fmrierrors < ../common/libtopo.h >> $@
116c40d7343Scindi	sh ../common/mkerror.sh hdlerrors < ../common/libtopo.h >> $@
1170eb822a1Scindi	sh ../common/mkerror.sh moderrors < ../common/topo_mod.h >> $@
1187aec1d6eScindi
119825ba0f2Srobj$(SRCDIR)/topo_tables.c: $(SRCDIR)/mktables.sh $(SRCDIR)/libtopo.h
120825ba0f2Srobj	sh $(SRCDIR)/mktables.sh $(SRCDIR)/libtopo.h > $@
121825ba0f2Srobj
1227aec1d6eScindiinclude ../../../../Makefile.targ
1237aec1d6eScindiinclude ../../../Makefile.targ
124