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, Version 1.0 only 6# (the "License"). You may not use this file except in compliance 7# with the License. 8# 9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10# or http://www.opensolaris.org/os/licensing. 11# See the License for the specific language governing permissions 12# and limitations under the License. 13# 14# When distributing Covered Code, include this CDDL HEADER in each 15# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16# If applicable, add the following below this CDDL HEADER, with the 17# fields enclosed by brackets "[]" replaced with your own identifying 18# information: Portions Copyright [yyyy] [name of copyright owner] 19# 20# CDDL HEADER END 21# 22 23# 24# Copyright 2004 Sun Microsystems, Inc. All rights reserved. 25# Use is subject to license terms. 26# 27# Copyright 2015 RackTop Systems. 28# 29 30LIBRARY= libpicldevtree.a 31VERS= .1 32 33OBJECTS= picldevtree.o 34 35# include library definitions 36include $(SRC)/lib/Makefile.lib 37 38include $(SRC)/cmd/picl/plugins/Makefile.com 39 40SRCS= $(OBJECTS:%.o=%.c) 41 42LIBS = $(DYNLIB) 43 44ROOTLIBDIR = $(USR_LIB_PLUGINDIR) 45ROOTETC = $(ROOT)/etc 46ROOTLIB = $(ROOT)/usr/lib 47 48CLOBBERFILES += $(LIBLINKS) 49 50CPPFLAGS += -I$(SRC)/lib/libsysevent -I$(SRC)/uts/common 51 52CFLAGS += $(CCVERBOSE) $(C_PICFLAGS) 53CPPFLAGS += -D_REENTRANT 54LDLIBS += -L$(SRC)/lib/libsysevent -L$(SRC)/lib/libpicltree/$(MACH) 55LDLIBS += -lc -lkstat -ldevinfo -lpicltree -lnvpair 56$(SPARC_BLD)LDLIBS += -R/usr/platform/\$$PLATFORM/lib/picl/plugins 57$(SPARC_BLD)LDLIBS += -R/usr/platform/sun4u/lib/picl/plugins 58 59.KEEP_STATE: 60 61SUBDIRS= 62 63POFILE= picldevtree.po 64 65all := TARGET= all 66install := TARGET= install 67clean := TARGET= clean 68clobber := TARGET= clobber 69_msg := TARGET= _msg 70 71all: $(LIBS) $(LIBLINKS) 72 73install: $(ROOTLIBDIR) all $(ROOTLIBS) $(ROOTLINKS) 74 75_msg: $(MSGDOMAIN) $(POFILE) 76 $(RM) $(MSGDOMAIN)/$(POFILE) 77 $(CP) $(POFILE) $(MSGDOMAIN) 78 79 80$(MSGDOMAIN): 81 $(INS.dir) 82 83$(LIBLINKS): FRC 84 $(RM) $@; $(SYMLINK) $(DYNLIB) $@ 85 86# include library targets 87include $(SRC)/cmd/picl/plugins/Makefile.targ 88include $(SRC)/lib/Makefile.targ 89 90%.so: %.o 91 $(LINK.c) -o $@ $(GSHARED) -h $@ $< $(LDLIBS) 92 93%.o: %.c 94 $(COMPILE.c) -o $@ $< 95 96$(SUBDIRS): FRC 97 @cd $@; pwd; $(MAKE) $(TARGET) 98 99FRC: 100