xref: /illumos-gate/usr/src/cmd/picl/plugins/sun4u/psvc/psvcpolicy/Makefile (revision fa4a3e77edc40df6d92e8da6fc4961d275e9896d)
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.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 = sun4u
43
44USR_PLAT_PSVCPOL = $(LIBS:%=$(USR_PSM_LIB_DIR)/%)
45
46CPPFLAGS +=	-I$(SRC)/uts/sun4u
47CPPFLAGS +=	-I$(SRC)/cmd/picl/plugins/sun4u/psvc/psvcobj
48
49ZDEFS =
50CFLAGS +=	$(CCVERBOSE)
51LDLIBS +=	$(ZNODEFS)
52LDLIBS +=	-L$(SRC)/lib/libpicl/$(MACH) -L$(SRC)/lib/libpicltree/$(MACH)
53LDLIBS +=	-L$(SRC)/cmd/picl/plugins/sun4u/psvc/psvcobj
54LDLIBS +=	-L$(SRC)/cmd/picl/plugins/sun4u/psvc/psvcplugin
55LDLIBS +=	-lc -lpsvcobj -lpsvcplugin -lpicltree
56
57DYNFLAGS +=	-Wl,-f/usr/platform/\$$PLATFORM/lib/$(DYNLIBPSR)
58DYNFLAGS +=	-R/usr/platform/\$$PLATFORM/lib/picl/plugins:/usr/platform/sun4u/lib/picl/plugins:/usr/lib/picl/plugins:/usr/platform/sun4u/lib
59
60.KEEP_STATE:
61
62SUBDIRS=
63
64POFILE=	psvcpolicy.po
65
66all :=		TARGET= all
67install :=	TARGET= install
68clean :=	TARGET= clean
69clobber :=	TARGET= clobber
70_msg :=		TARGET= _msg
71
72all: $(LIBS) $(LIBLINKS)
73
74install:	all $(USR_PLAT_PSVCPOL)
75
76$(LIBLINKS):	FRC
77	$(RM) $(LIBLINKS); $(SYMLINK) $(DYNLIB) $(LIBLINKS)
78
79
80# include library targets
81include $(SRC)/cmd/picl/plugins/Makefile.targ
82include $(SRC)/lib/Makefile.targ
83
84_msg:	$(MSGDOMAIN) $(POFILE)
85	$(RM) $(MSGDOMAIN)/$(POFILE)
86	$(CP) $(POFILE) $(MSGDOMAIN)/$(POFILE)
87
88$(MSGDOMAIN):
89	$(INS.dir)
90
91$(USR_PSM_LIB_DIR)/%: % $(USR_PSM_LIB_DIR)
92	$(INS.file) ;\
93	$(RM) -r $(USR_PSM_LIB_DIR)/libpsvcpolicy.so; \
94	$(SYMLINK) ./libpsvcpolicy.so$(VERS) $(USR_PSM_LIB_DIR)/libpsvcpolicy.so
95
96lint :
97
98$(SUBDIRS): FRC
99	@cd $@; pwd; $(MAKE) $(TARGET)
100
101FRC:
102