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