xref: /titanic_44/usr/src/lib/librsc/Makefile.com (revision a38ddfee9c8c6b6c5a2947ff52fd2338362a4444)
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 (the "License").
6# You may not use this file except in compliance with the License.
7#
8# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9# or http://www.opensolaris.org/os/licensing.
10# See the License for the specific language governing permissions
11# and limitations under the License.
12#
13# When distributing Covered Code, include this CDDL HEADER in each
14# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15# If applicable, add the following below this CDDL HEADER, with the
16# fields enclosed by brackets "[]" replaced with your own identifying
17# information: Portions Copyright [yyyy] [name of copyright owner]
18#
19# CDDL HEADER END
20#
21#
22# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25# ident	"%Z%%M%	%I%	%E% SMI"
26#
27
28LIBRARY= librsc.a
29VERS= .1
30
31# PLATFORM_OBJECTS is defined in platform Makefile
32OBJECTS= $(PLATFORM_OBJECTS)
33
34include $(SRC)/lib/Makefile.lib
35include $(SRC)/Makefile.psm
36
37CPPFLAGS +=	$(PLATINCS)
38
39LINKED_DIRS	= $(LINKED_PLATFORMS:%=$(USR_PLAT_DIR)/%)
40LINKED_LIB_DIRS	= $(LINKED_PLATFORMS:%=$(USR_PLAT_DIR)/%/lib)
41LINKED_LIBRSC_DIR	= \
42	$(LINKED_PLATFORMS:%=$(USR_PLAT_DIR)/%/lib/librsc.so)
43LINKED_LIBRSC1_DIR	= \
44	$(LINKED_PLATFORMS:%=$(USR_PLAT_DIR)/%/lib/librsc.so.1)
45LINKED_LLIBLRSC_DIR 	= \
46	$(LINKED_PLATFORMS:%=$(USR_PLAT_DIR)/%/lib/llib-lrsc.ln)
47
48# There should be a mapfile here
49MAPFILES =
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