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