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.
26 include $(SRC
)/Makefile.psm
28 LIBRARY
= libpiclmemcfg.a
33 # include library definitions
34 include $(SRC
)/lib
/Makefile.lib
36 ROOT_PLATFORM
= $(USR_PLAT_DIR
)/SUNW
,Sun-Blade-100
38 include $(SRC
)/cmd
/picl
/plugins
/Makefile.com
40 SRCS
= $(OBJECTS
:%.o
=%.c
)
44 ROOTLIBDIR
= $(ROOT_PLAT_PLUGINDIR
)
46 LINTSRC
= $(LINTLIB
:%.ln
=%)
47 ROOTLINTDIR
= $(ROOTLIBDIR
)
48 ROOTLINT
= $(LINTSRC
:%=$(ROOTLINTDIR
)/%)
50 CLEANFILES
= $(LINTOUT
) $(LINTLIB
)
52 CPPFLAGS
+= -I
$(SRC
)/cmd
/picl
/plugins
/common
/memcfg
53 CFLAGS
+= $(CCVERBOSE
)
54 LDLIBS
+= -L
$(SRC
)/lib
/libpicltree
/$(MACH
)
55 LDLIBS
+= -L
$(SRC
)/cmd
/picl
/plugins
/common
/devtree
56 LDLIBS
+= -L
$(ROOT
)/usr
/lib
/picl
/plugins
57 LDLIBS
+= -lc
-lpicltree
-lpicldevtree
58 LDLIBS
+= -R
/usr
/platform
/\
$$PLATFORM/lib
/picl
/plugins
:/usr
/platform
/sun4u
/lib
/picl
/plugins
:/usr
/lib
/picl
/plugins
61 LINKED_PLATFORMS
= SUNW
,Serverblade1
63 LINKED_DIRS
= $(LINKED_PLATFORMS
:%=$(USR_PLAT_DIR
)/%)
64 LINKED_LIB_DIRS
= $(LINKED_PLATFORMS
:%=$(USR_PLAT_DIR
)/%/lib
)
65 LINKED_PICL_DIRS
= $(LINKED_PLATFORMS
:%=$(USR_PLAT_DIR
)/%/lib
/picl
)
66 LINKED_PLUGIN_DIRS
= $(LINKED_PLATFORMS
:%=$(USR_PLAT_DIR
)/%/lib
/picl
/plugins
)
68 LINKED_PLUGINS_DYNLIBS
= $(LINKED_PLUGIN_DIRS
:%=%/$(DYNLIB
))
69 LINKED_PLUGINS_LIBLINKS
= $(LINKED_PLUGIN_DIRS
:%=%/$(LIBLINKS
))
71 GROVER_DYNLIB_DIR
= ..
/..
/..
/..
/SUNW
,Sun-Blade-100
/lib
/picl
/plugins
73 PLATFORM
= SUNW
,Sun-Blade-100
80 install := TARGET
= install
81 clean := TARGET
= clean
82 clobber := TARGET
= clobber
88 all: $(LIBS
) $(LIBLINKS
)
90 install: $(ROOTLIBDIR
) all $(ROOTLIBS
) $(ROOTLINKS
) \
91 $(LINKED_PLUGIN_DIRS
) $(LINKED_PLUGINS_DYNLIBS
) \
92 $(LINKED_PLUGINS_LIBLINKS
)
94 _msg
: $(MSGDOMAIN
) $(POFILE
)
95 $(RM
) $(MSGDOMAIN
)/$(POFILE
)
96 $(CP
) $(POFILE
) $(MSGDOMAIN
)
102 $(RM
) $@
; $(SYMLINK
) $(DYNLIB
) $@
104 # Linked platforms directory hierarchy
107 $(LINKED_LIB_DIRS
): $(LINKED_DIRS
)
109 $(LINKED_PICL_DIRS
): $(LINKED_LIB_DIRS
)
111 $(LINKED_PLUGIN_DIRS
): $(LINKED_PICL_DIRS
)
114 # Linked platforms links
115 $(LINKED_PLUGINS_DYNLIBS
): $(LINKED_PLUGIN_DIRS
)
117 $(SYMLINK
) $(GROVER_DYNLIB_DIR
)/$(DYNLIB
) $@
119 $(LINKED_PLUGINS_LIBLINKS
): $(LINKED_PLUGIN_DIRS
)
121 $(SYMLINK
) $(GROVER_DYNLIB_DIR
)/$(DYNLIB
) $@
123 # include library targets
124 include $(SRC
)/cmd
/picl
/plugins
/Makefile.targ
125 include $(SRC
)/lib
/Makefile.targ
127 $(ROOTLINTDIR
)/%: ..
/%
134 @cd
$@
; pwd
; $(MAKE
) $(TARGET
)