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