xref: /titanic_44/usr/src/lib/librsc/Makefile.com (revision 587032cf0967234b39ccb50adca936a367841063)
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# lib/librsc/Makefile.com
29#
30
31LIBRARY= librsc.a
32VERS= .1
33
34# PLATFORM_OBJECTS is defined in platform Makefile
35OBJECTS= $(PLATFORM_OBJECTS)
36
37include $(SRC)/lib/Makefile.lib
38include $(SRC)/Makefile.psm
39
40CPPFLAGS +=	$(PLATINCS)
41
42LINKED_DIRS	= $(LINKED_PLATFORMS:%=$(USR_PLAT_DIR)/%)
43LINKED_LIB_DIRS	= $(LINKED_PLATFORMS:%=$(USR_PLAT_DIR)/%/lib)
44LINKED_LIBRSC_DIR	= \
45	$(LINKED_PLATFORMS:%=$(USR_PLAT_DIR)/%/lib/librsc.so)
46LINKED_LIBRSC1_DIR	= \
47	$(LINKED_PLATFORMS:%=$(USR_PLAT_DIR)/%/lib/librsc.so.1)
48LINKED_LLIBLRSC_DIR 	= \
49	$(LINKED_PLATFORMS:%=$(USR_PLAT_DIR)/%/lib/llib-lrsc.ln)
50
51SRCDIR =	common
52LIBS = $(DYNLIB) $(LINTLIB)
53CFLAGS +=	$(CCVERBOSE)
54LDLIBS +=	-lc
55PLATLIBS =	$(USR_PLAT_DIR)/$(PLATFORM)/lib/
56INS.slink6=	$(RM) -r $@; $(SYMLINK) ../../$(PLATFORM)/lib/librsc.so.1 $@ $(CHOWNLINK) $(CHGRPLINK)
57INS.slink7=	$(RM) -r $@; $(SYMLINK) ../../$(PLATFORM)/lib/librsc.so $@ $(CHOWNLINK) $(CHGRPLINK)
58INS.slink8=	$(RM) -r $@; $(SYMLINK) ../../$(PLATFORM)/lib/llib-lrsc.ln $@ $(CHOWNLINK) $(CHGRPLINK)
59
60.KEEP_STATE:
61
62#
63# build/lint rules
64#
65all:	$(LIBS)
66lint:	lintcheck
67
68#
69# install rules
70#
71$(PLATLIBS)/librsc.so:
72	$(RM) -r $@; $(SYMLINK) librsc.so.1 $@ $(CHOWNLINK) $(CHGRPLINK)
73
74install:	all $(USR_PSM_LIBS) $(PLATLIBS)/librsc.so \
75		$(LINKED_DIRS) $(LINKED_LIB_DIRS) \
76		$(LINKED_LIBRSC_DIR) $(LINKED_LIBRSC1_DIR) \
77		$(LINKED_LLIBLRSC_DIR)
78
79$(USR_PSM_LIB_DIR)/%: % $(USR_PSM_LIB_DIR)
80	$(INS.file)
81
82$(LINKED_DIRS):	$(USR_PLAT_DIR)
83	-$(INS.dir.root.sys)
84
85$(LINKED_LIB_DIRS):	$(LINKED_DIRS)
86	-$(INS.dir.root.sys)
87
88$(LINKED_LIBRSC_DIR): $(USR_PLAT_DIR)
89	-$(INS.slink7)
90
91$(LINKED_LIBRSC1_DIR): $(USR_PLAT_DIR)
92	-$(INS.slink6)
93
94$(LINKED_LLIBLRSC_DIR): $(USR_PLAT_DIR)
95	-$(INS.slink8)
96
97include $(SRC)/lib/Makefile.targ
98