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.
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.
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]
22 # Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 # Use is subject to license terms.
25 # cmd/picl/plugins/sun4u/psvc/psvcplugin/Makefile
27 LIBRARY
= libpsvcplugin.a
32 # include library definitions
33 include $(SRC
)/lib
/Makefile.lib
34 include $(SRC
)/Makefile.psm
36 include $(SRC
)/cmd
/picl
/plugins
/Makefile.com
38 SRCS
= $(OBJECTS
:%.o
=%.c
)
42 ROOT_PLATFORM
= $(USR_PLAT_DIR
)/SUNW
,Sun-Fire-280R
44 USR_PLAT_PLUGINS_LNECK
= $(LIBS
:%=$(ROOT_PLAT_PLUGINDIR
)/%)
46 PLAT_PLATFORM
= $(USR_PLAT_DIR
)/SUNW
,Sun-Fire-880
47 PLAT_PLATFORM
+= $(USR_PLAT_DIR
)/SUNW
,Sun-Fire-480R
48 PLAT_PLATFORM
+= $(USR_PLAT_DIR
)/SUNW
,Sun-Fire-V490
49 PLAT_PLATFORM
+= $(USR_PLAT_DIR
)/SUNW
,Sun-Fire-V890
51 PLAT_LIB_DIR
= $(PLAT_PLATFORM
:%=%/lib
)
53 PLAT_PICL_DIR
= $(PLAT_LIB_DIR
:%=%/picl
)
55 PLAT_PLUGINS_DIRS
= $(PLAT_PICL_DIR
:%=%/plugins
)
57 USR_PLAT_PLUGINS_DYNLIBS
= $(PLAT_PLUGINS_DIRS
:%=%/$(DYNLIB
))
58 USR_PLAT_PLUGINS_LIBLINKS
= $(PLAT_PLUGINS_DIRS
:%=%/$(LIBLINKS
))
59 LNECK_DYNLIB_DIR
= ..
/..
/..
/..
/SUNW
,Sun-Fire-280R
/lib
/picl
/plugins
61 CLEANFILES
= $(LINTOUT
) $(LINTLIB
)
63 CPPFLAGS
+= -I
$(SRC
)/uts
/sun4u
64 CPPFLAGS
+= -I
$(SRC
)/cmd
/picl
/plugins
/sun4u
/psvc
/psvcobj
66 CFLAGS
+= $(CCVERBOSE
)
67 LDLIBS
+= -L
$(SRC
)/lib
/libpicl
/$(MACH
) -L
$(SRC
)/lib
/libpicltree
/$(MACH
)
68 LDLIBS
+= -L
$(ROOT
)/usr
/platform
/$(PLATFORM
)/lib
69 LDLIBS
+= -L
$(SRC
)/cmd
/picl
/plugins
/sun4u
/psvc
/psvcobj
70 LDLIBS
+= -R
/usr
/platform
/sun4u
/lib
71 LDLIBS
+= -lc
-lpicltree
-lpicl
-lpsvcobj
73 DYNFLAGS
+= -Wl
,-f
/usr
/platform
/\
$$PLATFORM/lib
/$(DYNLIBPSR
)
83 install := TARGET
= install
84 clean := TARGET
= clean
85 clobber := TARGET
= clobber
89 all: $(LIBS
) $(LIBLINKS
)
91 install: all $(USR_PLAT_PLUGINS_LNECK
) \
92 $(PLAT_PLATFORM
) $(PLAT_LIB_DIR
) $(PLAT_PICL_DIR
) \
93 $(USR_PLAT_PLUGINS_DYNLIBS
) $(USR_PLAT_PLUGINS_LIBLINKS
)
96 $(RM
) $(LIBLINKS
); $(SYMLINK
) $(DYNLIB
) $(LIBLINKS
)
98 _msg
: $(MSGDOMAIN
) $(POFILE
)
99 $(RM
) $(MSGDOMAIN
)/$(POFILE
)
100 $(CP
) $(POFILE
) $(MSGDOMAIN
)/$(POFILE
)
106 # include library targets
107 include $(SRC
)/cmd
/picl
/plugins
/Makefile.targ
108 include $(SRC
)/lib
/Makefile.targ
110 $(ROOT_PLAT_PLUGINDIR
)/%: % $(ROOT_PLAT_PLUGINDIR
)
112 $(RM
) -r
$(ROOT_PLAT_PLUGINDIR
)/$(LIBLINKS
) ;\
113 $(SYMLINK
) .
/$(DYNLIB
) $(ROOT_PLAT_PLUGINDIR
)/$(LIBLINKS
)
122 $(PLAT_PLUGINS_DIRS
):
125 $(USR_PLAT_PLUGINS_DYNLIBS
): $(PLAT_PLUGINS_DIRS
)
127 $(SYMLINK
) $(LNECK_DYNLIB_DIR
)/$(DYNLIB
) $@
129 $(USR_PLAT_PLUGINS_LIBLINKS
): $(PLAT_PLUGINS_DIRS
)
131 $(SYMLINK
) $(LNECK_DYNLIB_DIR
)/$(DYNLIB
) $@
137 @cd
$@
; pwd
; $(MAKE
) $(TARGET
)