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# Copyright 2009 Sun Microsystems, Inc. All rights reserved. 23# Use is subject to license terms. 24# 25# cmd/picl/plugins/sun4u/psvc/psvcplugin/Makefile 26# 27LIBRARY= libpsvcplugin.a 28VERS= .1 29 30OBJECTS= psvcplugin.o 31 32# include library definitions 33include $(SRC)/lib/Makefile.lib 34include $(SRC)/Makefile.psm 35 36include $(SRC)/cmd/picl/plugins/Makefile.com 37 38SRCS= $(OBJECTS:%.o=%.c) 39 40LIBS = $(DYNLIB) 41 42ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Fire-280R 43 44USR_PLAT_PLUGINS_LNECK = $(LIBS:%=$(ROOT_PLAT_PLUGINDIR)/%) 45 46PLAT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Fire-880 47PLAT_PLATFORM += $(USR_PLAT_DIR)/SUNW,Sun-Fire-480R 48PLAT_PLATFORM += $(USR_PLAT_DIR)/SUNW,Sun-Fire-V490 49PLAT_PLATFORM += $(USR_PLAT_DIR)/SUNW,Sun-Fire-V890 50 51PLAT_LIB_DIR = $(PLAT_PLATFORM:%=%/lib) 52 53PLAT_PICL_DIR = $(PLAT_LIB_DIR:%=%/picl) 54 55PLAT_PLUGINS_DIRS = $(PLAT_PICL_DIR:%=%/plugins) 56 57USR_PLAT_PLUGINS_DYNLIBS = $(PLAT_PLUGINS_DIRS:%=%/$(DYNLIB)) 58USR_PLAT_PLUGINS_LIBLINKS = $(PLAT_PLUGINS_DIRS:%=%/$(LIBLINKS)) 59LNECK_DYNLIB_DIR = ../../../../SUNW,Sun-Fire-280R/lib/picl/plugins 60 61CPPFLAGS += -I$(SRC)/uts/sun4u 62CPPFLAGS += -I$(SRC)/cmd/picl/plugins/sun4u/psvc/psvcobj 63 64CFLAGS += $(CCVERBOSE) 65LDLIBS += -L$(SRC)/lib/libpicl/$(MACH) -L$(SRC)/lib/libpicltree/$(MACH) 66LDLIBS += -L $(ROOT)/usr/platform/$(PLATFORM)/lib 67LDLIBS += -L$(SRC)/cmd/picl/plugins/sun4u/psvc/psvcobj 68LDLIBS += -R/usr/platform/sun4u/lib 69LDLIBS += -lc -lpicltree -lpicl -lpsvcobj 70 71DYNFLAGS += -Wl,-f/usr/platform/\$$PLATFORM/lib/$(DYNLIBPSR) 72 73.KEEP_STATE: 74 75SUBDIRS= 76 77POFILE= psvcplugin.po 78 79all := TARGET= all 80install := TARGET= install 81clean := TARGET= clean 82clobber := TARGET= clobber 83_msg := TARGET= _msg 84 85all: $(LIBS) $(LIBLINKS) 86 87install: all $(USR_PLAT_PLUGINS_LNECK) \ 88 $(PLAT_PLATFORM) $(PLAT_LIB_DIR) $(PLAT_PICL_DIR) \ 89 $(USR_PLAT_PLUGINS_DYNLIBS) $(USR_PLAT_PLUGINS_LIBLINKS) 90 91$(LIBLINKS): FRC 92 $(RM) $(LIBLINKS); $(SYMLINK) $(DYNLIB) $(LIBLINKS) 93 94_msg: $(MSGDOMAIN) $(POFILE) 95 $(RM) $(MSGDOMAIN)/$(POFILE) 96 $(CP) $(POFILE) $(MSGDOMAIN)/$(POFILE) 97 98$(MSGDOMAIN): 99 $(INS.dir) 100 101 102# include library targets 103include $(SRC)/cmd/picl/plugins/Makefile.targ 104include $(SRC)/lib/Makefile.targ 105 106$(ROOT_PLAT_PLUGINDIR)/%: % $(ROOT_PLAT_PLUGINDIR) 107 $(INS.file) ;\ 108 $(RM) -r $(ROOT_PLAT_PLUGINDIR)/$(LIBLINKS) ;\ 109 $(SYMLINK) ./$(DYNLIB) $(ROOT_PLAT_PLUGINDIR)/$(LIBLINKS) 110 111$(PLAT_PLATFORM): 112 $(INS.dir) 113$(PLAT_LIB_DIR): 114 $(INS.dir) 115$(PLAT_PICL_DIR): 116 $(INS.dir) 117 118$(PLAT_PLUGINS_DIRS): 119 $(INS.dir) 120 121$(USR_PLAT_PLUGINS_DYNLIBS): $(PLAT_PLUGINS_DIRS) 122 $(RM) -r $@ ;\ 123 $(SYMLINK) $(LNECK_DYNLIB_DIR)/$(DYNLIB) $@ 124 125$(USR_PLAT_PLUGINS_LIBLINKS): $(PLAT_PLUGINS_DIRS) 126 $(RM) -r $@ ;\ 127 $(SYMLINK) $(LNECK_DYNLIB_DIR)/$(DYNLIB) $@ 128 129lint : 130 131$(SUBDIRS): FRC 132 @cd $@; pwd; $(MAKE) $(TARGET) 133 134FRC: 135