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