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