xref: /illumos-gate/usr/src/cmd/picl/plugins/sun4u/daktari/psvcpolicy/Makefile (revision 54925bf60766fbb4f1f2d7c843721406a7b7a3fb)
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 (the "License").
6# You may not use this file except in compliance with the License.
7#
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.
12#
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]
18#
19# CDDL HEADER END
20#
21#
22# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25# ident	"%Z%%M%	%I%	%E% SMI"
26#
27# cmd/picl/plugins/sun4u/daktari/psvcpolicy/Makefile
28#
29LIBRARY=	libpsvcpolicy_psr.a
30VERS=		.1
31
32OBJECTS=	psvcpolicy.o
33
34# include library definitions
35include $(SRC)/lib/Makefile.lib
36include $(SRC)/Makefile.psm
37
38include $(SRC)/cmd/picl/plugins/Makefile.com
39
40SRCS=		$(OBJECTS:%.o=%.c)
41
42LIBS =		$(DYNLIB)
43
44PLATFORM =		SUNW,Sun-Fire-880
45DYNFLAGS_PLAT =		/usr/platform/\$$PLATFORM/lib/picl/plugins
46DYNFLAGS_SUN4U =	/usr/platform/sun4u/lib/picl/plugins
47DYNFLAGS_COM =		/usr/lib/picl/plugins
48
49CLEANFILES=	$(LINTOUT) $(LINTLIB)
50
51CPPFLAGS +=	-I$(SRC)/uts/sun4u
52CPPFLAGS += 	-I$(ROOT)/usr/platform/sun4u/include
53CPPFLAGS +=	-I$(SRC)/cmd/picl/plugins/sun4u/psvc/psvcobj
54CPPFLAGS +=	-D_REENTRANT
55
56ZDEFS  =
57CFLAGS +=	$(CCVERBOSE)
58LDLIBS +=	-L$(ROOT)/usr/lib
59LDLIBS +=	-L$(SRC)/lib/libpicl/$(MACH) -L$(SRC)/lib/libpicltree/$(MACH)
60LDLIBS +=	-L$(SRC)/cmd/picl/plugins/sun4u/psvc/psvcobj
61LDLIBS +=	-L$(SRC)/cmd/picl/plugins/sun4u/psvc/psvcplugin
62DYNFLAGS +=	-R$(DYNFLAGS_PLAT):$(DYNFLAGS_SUN4U):$(DYNFLAGS_COM)
63
64LDLIBS +=	-lpicltree -lpsvcobj -lpsvcplugin
65LDLIBS +=	-lc -ldevice -lcfgadm
66
67LINTFLAGS +=
68
69.KEEP_STATE:
70
71PLATLIBS= $(USR_PLAT_DIR)/$(PLATFORM)/lib/
72
73UTSBASE= $(SRC)/uts
74
75SUBDIRS=
76
77POFILE=	psvcpolicy.po
78POFILE_RENAME=	psvcpolicy_dak.po
79
80all :=		TARGET= all
81install :=	TARGET= install
82clean :=	TARGET= clean
83clobber :=	TARGET= clobber
84lint :=		TARGET= lint
85_msg :=		TARGET= _msg
86
87all: $(LIBS) $(LIBLINKS)
88
89install:	all $(USR_PSM_LIBS)
90
91$(USR_PSM_LIB_DIR):
92	@cd $(UTSBASE)/sun4u/daktari; pwd; $(MAKE) $(USR_PSM_LIB_DIR)
93
94$(LIBLINKS):	FRC
95	$(RM) $(LIBLINKS); $(SYMLINK) $(DYNLIB) $(LIBLINKS)
96
97_msg:	$(MSGDOMAIN) $(POFILE)
98	$(RM) $(MSGDOMAIN)/$(POFILE)
99	$(CP) $(POFILE) $(MSGDOMAIN)/$(POFILE_RENAME)
100
101$(MSGDOMAIN):
102	$(INS.dir)
103
104
105# include library targets
106include $(SRC)/cmd/picl/plugins/Makefile.targ
107include $(SRC)/lib/Makefile.targ
108
109$(USR_PSM_LIB_DIR)/%: % $(USR_PSM_LIB_DIR)
110	$(INS.file) ;\
111	$(RM) -r $(USR_PSM_LIB_DIR)/libpsvcpolicy_psr.so; \
112	$(SYMLINK) ./libpsvcpolicy_psr.so$(VERS) $(USR_PSM_LIB_DIR)/libpsvcpolicy_psr.so
113
114lint :
115	$(LINT.c) $(SRCS)
116
117$(SUBDIRS): FRC
118	@cd $@; pwd; $(MAKE) $(TARGET)
119
120FRC:
121