xref: /illumos-gate/usr/src/lib/librsc/Makefile.com (revision 78801af7286cd73dbc996d470f789e75993cf15d)
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)
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)
63
64#
65# install rules
66#
67$(PLATLIBS)/librsc.so:
68	$(RM) -r $@; $(SYMLINK) librsc.so.1 $@
69
70install:	all $(USR_PSM_LIBS) $(PLATLIBS)/librsc.so \
71		$(LINKED_DIRS) $(LINKED_LIB_DIRS) \
72		$(LINKED_LIBRSC_DIR) $(LINKED_LIBRSC1_DIR)
73
74$(USR_PSM_LIB_DIR)/%: % $(USR_PSM_LIB_DIR)
75	$(INS.file)
76
77$(LINKED_DIRS):	$(USR_PLAT_DIR)
78	-$(INS.dir)
79
80$(LINKED_LIB_DIRS):	$(LINKED_DIRS)
81	-$(INS.dir)
82
83$(LINKED_LIBRSC_DIR): $(USR_PLAT_DIR)
84	-$(INS.slink7)
85
86$(LINKED_LIBRSC1_DIR): $(USR_PLAT_DIR)
87	-$(INS.slink6)
88
89include $(SRC)/lib/Makefile.targ
90