xref: /illumos-gate/usr/src/lib/librsc/Makefile.com (revision d8109ce4330e1b8ad6c29f9fccacec969066bb9d)
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# Copyright 2019 OmniOS Community Edition (OmniOSce) Association.
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)
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 $@
56
57.KEEP_STATE:
58
59#
60# build/lint rules
61#
62all:	$(LIBS)
63lint:	lintcheck
64
65#
66# install rules
67#
68$(PLATLIBS)/librsc.so:
69	$(RM) -r $@; $(SYMLINK) librsc.so.1 $@
70
71install:	all $(USR_PSM_LIBS) $(PLATLIBS)/librsc.so \
72		$(LINKED_DIRS) $(LINKED_LIB_DIRS) \
73		$(LINKED_LIBRSC_DIR) $(LINKED_LIBRSC1_DIR)
74
75$(USR_PSM_LIB_DIR)/%: % $(USR_PSM_LIB_DIR)
76	$(INS.file)
77
78$(LINKED_DIRS):	$(USR_PLAT_DIR)
79	-$(INS.dir)
80
81$(LINKED_LIB_DIRS):	$(LINKED_DIRS)
82	-$(INS.dir)
83
84$(LINKED_LIBRSC_DIR): $(USR_PLAT_DIR)
85	-$(INS.slink7)
86
87$(LINKED_LIBRSC1_DIR): $(USR_PLAT_DIR)
88	-$(INS.slink6)
89
90include $(SRC)/lib/Makefile.targ
91