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