xref: /illumos-gate/usr/src/cmd/picl/plugins/sun4u/grover/memcfg/Makefile (revision e4b86885570d77af552e9cf94f142f4d744fb8c8)
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# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26# ident	"%Z%%M%	%I%	%E% SMI"
27#
28
29include		$(SRC)/Makefile.psm
30
31LIBRARY=	libpiclmemcfg.a
32VERS=		.1
33
34OBJECTS=	piclmemcfg.o
35
36# include library definitions
37include	$(SRC)/lib/Makefile.lib
38
39ROOT_PLATFORM = $(USR_PLAT_DIR)/SUNW,Sun-Blade-100
40
41include	$(SRC)/cmd/picl/plugins/Makefile.com
42
43SRCS=		$(OBJECTS:%.o=%.c)
44
45LIBS =		$(DYNLIB)
46
47ROOTLIBDIR	= $(ROOT_PLAT_PLUGINDIR)
48ROOTLIBDIR	:= OWNER = root
49ROOTLIBDIR	:= GROUP = sys
50
51LINTSRC =       $(LINTLIB:%.ln=%)
52ROOTLINTDIR =   $(ROOTLIBDIR)
53ROOTLINT =      $(LINTSRC:%=$(ROOTLINTDIR)/%)
54
55CLEANFILES=	$(LINTOUT) $(LINTLIB)
56
57CPPFLAGS +=	-I$(SRC)/cmd/picl/plugins/common/memcfg
58CFLAGS +=	$(CCVERBOSE)
59LDLIBS +=	-L$(SRC)/lib/libpicltree/$(MACH)
60LDLIBS +=	-L$(SRC)/cmd/picl/plugins/common/devtree
61LDLIBS +=	-L$(ROOT)/usr/lib/picl/plugins
62LDLIBS +=	-lc -lpicltree -lpicldevtree
63LDLIBS +=	-R/usr/platform/\$$PLATFORM/lib/picl/plugins:/usr/platform/sun4u/lib/picl/plugins:/usr/lib/picl/plugins
64
65
66LINKED_PLATFORMS	= SUNW,Serverblade1
67
68LINKED_DIRS		= $(LINKED_PLATFORMS:%=$(USR_PLAT_DIR)/%)
69LINKED_LIB_DIRS		= $(LINKED_PLATFORMS:%=$(USR_PLAT_DIR)/%/lib)
70LINKED_PICL_DIRS	= $(LINKED_PLATFORMS:%=$(USR_PLAT_DIR)/%/lib/picl)
71LINKED_PLUGIN_DIRS	= $(LINKED_PLATFORMS:%=$(USR_PLAT_DIR)/%/lib/picl/plugins)
72
73LINKED_PLUGINS_DYNLIBS = $(LINKED_PLUGIN_DIRS:%=%/$(DYNLIB))
74LINKED_PLUGINS_LIBLINKS = $(LINKED_PLUGIN_DIRS:%=%/$(LIBLINKS))
75
76GROVER_DYNLIB_DIR = ../../../../SUNW,Sun-Blade-100/lib/picl/plugins
77
78PLATFORM=	SUNW,Sun-Blade-100
79
80.KEEP_STATE:
81
82SUBDIRS=
83
84all :=		TARGET= all
85install :=	TARGET= install
86clean :=	TARGET= clean
87clobber :=	TARGET= clobber
88lint :=		TARGET= lint
89_msg :=		TARGET= _msg
90
91POFILE=	piclmemcfg.po
92
93all: $(LIBS) $(LIBLINKS)
94
95install:	$(ROOTLIBDIR) all $(ROOTLIBS) $(ROOTLINKS) \
96	$(LINKED_PLUGIN_DIRS) $(LINKED_PLUGINS_DYNLIBS) \
97	$(LINKED_PLUGINS_LIBLINKS)
98
99_msg:	$(MSGDOMAIN) $(POFILE)
100	$(RM) $(MSGDOMAIN)/$(POFILE)
101	$(CP) $(POFILE) $(MSGDOMAIN)
102
103$(MSGDOMAIN):
104	$(INS.dir)
105
106$(LIBLINKS):	FRC
107	$(RM) $@; $(SYMLINK) $(DYNLIB) $@
108
109# Linked platforms directory hierarchy
110$(LINKED_DIRS):
111	$(INS.dir)
112$(LINKED_LIB_DIRS): $(LINKED_DIRS)
113	$(INS.dir)
114$(LINKED_PICL_DIRS): $(LINKED_LIB_DIRS)
115	$(INS.dir)
116$(LINKED_PLUGIN_DIRS): $(LINKED_PICL_DIRS)
117	$(INS.dir)
118
119# Linked platforms links
120$(LINKED_PLUGINS_DYNLIBS): $(LINKED_PLUGIN_DIRS)
121	$(RM) -r $@ ;\
122	$(SYMLINK) $(GROVER_DYNLIB_DIR)/$(DYNLIB) $@
123
124$(LINKED_PLUGINS_LIBLINKS): $(LINKED_PLUGIN_DIRS)
125	$(RM) -r $@ ;\
126	$(SYMLINK) $(GROVER_DYNLIB_DIR)/$(DYNLIB) $@
127
128# include library targets
129include	$(SRC)/cmd/picl/plugins/Makefile.targ
130include	$(SRC)/lib/Makefile.targ
131
132$(ROOTLINTDIR)/%: ../%
133	$(INS.file)
134
135lint :
136	$(LINT.c) $(SRCS)
137
138$(SUBDIRS): FRC
139	@cd $@; pwd; $(MAKE) $(TARGET)
140
141FRC:
142