1# 2# CDDL HEADER START 3# 4# The contents of this file are subject to the terms of the 5# Common Development and Distribution License (the "License"). 6# You may not use this file except in compliance with the License. 7# 8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9# or http://www.opensolaris.org/os/licensing. 10# See the License for the specific language governing permissions 11# and limitations under the License. 12# 13# When distributing Covered Code, include this CDDL HEADER in each 14# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15# If applicable, add the following below this CDDL HEADER, with the 16# fields enclosed by brackets "[]" replaced with your own identifying 17# information: Portions Copyright [yyyy] [name of copyright owner] 18# 19# CDDL HEADER END 20# 21 22# 23# Copyright 2006 Sun Microsystems, Inc. All rights reserved. 24# Use is subject to license terms. 25# 26# ident "%Z%%M% %I% %E% SMI" 27 28LIBRARY = libtopo.a 29VERS = .1 30 31BUILTINSRCS = \ 32 cpu.c \ 33 hc.c \ 34 mem.c \ 35 mod.c \ 36 pkg.c 37 38LIBSRCS = \ 39 topo_alloc.c \ 40 topo_builtin.c \ 41 topo_error.c \ 42 topo_file.c \ 43 topo_fmri.c \ 44 topo_list.c \ 45 topo_method.c \ 46 topo_mod.c \ 47 topo_module.c \ 48 topo_node.c \ 49 topo_nvl.c \ 50 topo_parse.c \ 51 topo_prop.c \ 52 topo_protocol.c \ 53 topo_rtld.c \ 54 topo_snap.c \ 55 topo_string.c \ 56 topo_subr.c \ 57 topo_tree.c \ 58 topo_xml.c 59 60OBJECTS = $(BUILTINSRCS:%.c=%.o) $(LIBSRCS:%.c=%.o) 61 62include ../../../../Makefile.lib 63include ../../../Makefile.lib 64 65SRCS = $(BUILTINSRCS:%.c=../common/%.c) $(LIBSRCS:%.c=../common/%.c) 66LIBS = $(DYNLIB) $(LINTLIB) 67 68SRCDIR = ../common 69SPECMAPFILE = $(MAPDIR)/mapfile 70 71CLEANFILES += ../common/topo_error.c 72 73CPPFLAGS += -I../common -I/usr/include/libxml2 -I. 74CFLAGS += $(CCVERBOSE) $(C_BIGPICFLAGS) 75CFLAGS += -D_POSIX_PTHREAD_SEMANTICS 76CFLAGS64 += $(CCVERBOSE) $(C_BIGPICFLAGS) 77 78LINTFLAGS = -msux 79LINTFLAGS64 = -msux -Xarch=$(MACH64:sparcv9=v9) 80 81$(DYNLIB) := LDLIBS += -lnvpair -lelf -lumem -lxml2 -lkstat -luuid -lc 82 83$(LINTLIB) := SRCS = $(SRCDIR)/$(LINTSRC) 84$(LINTLIB) := LINTFLAGS = -nsvx 85$(LINTLIB) := LINTFLAGS64 = -nsvx -Xarch=$(MACH64:sparcv9=v9) 86$(LINTLIB) := LDLIBS += -lnvpair -lumem -lc 87 88.KEEP_STATE: 89 90all: $(LIBS) 91 92lint: $(LINTLIB) lintcheck 93 94pics/%.o: ../$(MACH)/%.c 95 $(COMPILE.c) -o $@ $< 96 $(POST_PROCESS_O) 97 98%.o: ../common/%.c 99 $(COMPILE.c) -o $@ $< 100 $(POST_PROCESS_O) 101 102../common/topo_error.c: ../common/mkerror.sh ../common/topo_error.h 103 sh ../common/mkerror.sh internal < ../common/topo_error.h > $@ 104 sh ../common/mkerror.sh external < ../common/topo_mod.h >> $@ 105 106include ../../../../Makefile.targ 107include ../../../Makefile.targ 108