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