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 CPPFLAGS
+= -I
$(SRC
)/uts
/sun4u
62 CPPFLAGS
+= -I
$(SRC
)/cmd
/picl
/plugins
/sun4u
/psvc
/psvcobj
64 LDLIBS
+= -L
$(SRC
)/lib
/libpicl
/$(MACH
) -L
$(SRC
)/lib
/libpicltree
/$(MACH
)
65 LDLIBS
+= -L
$(ROOT
)/usr
/platform
/$(PLATFORM
)/lib
66 LDLIBS
+= -L
$(SRC
)/cmd
/picl
/plugins
/sun4u
/psvc
/psvcobj
67 LDLIBS
+= -R
/usr
/platform
/sun4u
/lib
68 LDLIBS
+= -lc
-lpicltree
-lpicl
-lpsvcobj
70 DYNFLAGS
+= -Wl
,-f
/usr
/platform
/\
$$PLATFORM/lib
/$(DYNLIBPSR
)
79 install := TARGET
= install
80 clean := TARGET
= clean
81 clobber := TARGET
= clobber
84 all: $(LIBS
) $(LIBLINKS
)
86 install: all $(USR_PLAT_PLUGINS_LNECK
) \
87 $(PLAT_PLATFORM
) $(PLAT_LIB_DIR
) $(PLAT_PICL_DIR
) \
88 $(USR_PLAT_PLUGINS_DYNLIBS
) $(USR_PLAT_PLUGINS_LIBLINKS
)
91 $(RM
) $(LIBLINKS
); $(SYMLINK
) $(DYNLIB
) $(LIBLINKS
)
93 _msg
: $(MSGDOMAIN
) $(POFILE
)
94 $(RM
) $(MSGDOMAIN
)/$(POFILE
)
95 $(CP
) $(POFILE
) $(MSGDOMAIN
)/$(POFILE
)
101 # include library targets
102 include $(SRC
)/cmd
/picl
/plugins
/Makefile.targ
103 include $(SRC
)/lib
/Makefile.targ
105 $(ROOT_PLAT_PLUGINDIR
)/%: % $(ROOT_PLAT_PLUGINDIR
)
107 $(RM
) -r
$(ROOT_PLAT_PLUGINDIR
)/$(LIBLINKS
) ;\
108 $(SYMLINK
) .
/$(DYNLIB
) $(ROOT_PLAT_PLUGINDIR
)/$(LIBLINKS
)
117 $(PLAT_PLUGINS_DIRS
):
120 $(USR_PLAT_PLUGINS_DYNLIBS
): $(PLAT_PLUGINS_DIRS
)
122 $(SYMLINK
) $(LNECK_DYNLIB_DIR
)/$(DYNLIB
) $@
124 $(USR_PLAT_PLUGINS_LIBLINKS
): $(PLAT_PLUGINS_DIRS
)
126 $(SYMLINK
) $(LNECK_DYNLIB_DIR
)/$(DYNLIB
) $@
129 @cd
$@
; pwd
; $(MAKE
) $(TARGET
)