xref: /illumos-gate/usr/src/lib/librt/Makefile.com (revision 0c44d0008f52b6a42b9c01d3b344661217520a68)
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# lib/librt/Makefile.com
28
29LIBRARY=	librt.a
30VERS=		.1
31
32OBJECTS=	\
33	aio.o		\
34	clock_timer.o	\
35	fallocate.o	\
36	fdatasync.o	\
37	mqueue.o	\
38	pos4.o		\
39	pos4obj.o	\
40	sched.o		\
41	sem.o		\
42	shm.o		\
43	sigev_thread.o	\
44	sigrt.o		\
45	thread_pool.o
46
47include ../../Makefile.lib
48include ../../Makefile.rootfs
49
50LIBS =		$(DYNLIB) $(LINTLIB)
51LDLIBS += 	-laio -lc
52$(LINTLIB) :=	SRCS = $(SRCDIR)/$(LINTSRC)
53
54SRCDIR=		../common
55MAPDIR=		../spec/$(TRANSMACH)
56SPECMAPFILE=	$(MAPDIR)/mapfile
57
58ROOTLINTDIR64=	$(ROOTLIBDIR64)
59ROOTLINKS64=    $(ROOTLIBDIR64)/$(LIBLINKS)
60
61# Setting LIBRT_DEBUG = -DDEBUG (make LIBRT_DEBUG=-DDEBUG ...)
62# enables ASSERT() checking in the library.
63# This is automatically enabled for DEBUG builds, not for non-debug builds.
64LIBRT_DEBUG =
65$(NOT_RELEASE_BUILD)LIBRT_DEBUG = -DDEBUG
66
67CFLAGS	+=	$(CCVERBOSE)
68CPPFLAGS +=	$(LIBRT_DEBUG) -D_REENTRANT -I../../common/inc
69
70#
71# If and when somebody gets around to messaging this, CLOBBERFILE should not
72# be cleared (so that any .po file will be clobbered.
73#
74CLOBBERFILES=	test
75
76.KEEP_STATE:
77
78all: $(LIBS) fnamecheck
79
80lint: lintcheck
81
82# install rule for 64 bit lint library target
83$(ROOTLINTDIR64)/%.ln:	%.ln
84	$(INS.file)
85	cd $(ROOTLINTDIR64); \
86		$(RM) llib-lposix4.ln ; \
87		$(SYMLINK) ./llib-lrt.ln llib-lposix4.ln ;
88
89# install rule for lint library target
90$(ROOTLINTDIR)/%.ln:	%.ln
91	$(INS.file)
92	cd $(ROOTLINTDIR); \
93		$(RM) llib-lposix4 ; \
94		$(SYMLINK) ./llib-lrt llib-lposix4 ; \
95		$(RM) llib-lposix4.ln ; \
96		$(SYMLINK) ./llib-lrt.ln llib-lposix4.ln ;
97
98include ../../Makefile.targ
99
100# install rules for 32-bit librt.so in /usr/lib
101$(ROOTLINKS) := INS.liblink= \
102	$(RM) $@; $(SYMLINK) $(LIBLINKPATH)$(LIBLINKS)$(VERS) $@; \
103		cd $(ROOTLIBDIR); \
104		$(RM)  libposix4.so$(VERS) libposix4.so; \
105		$(SYMLINK) librt.so$(VERS) libposix4.so$(VERS); \
106		$(SYMLINK) libposix4.so$(VERS) libposix4.so;
107
108# install rules for 64-bit librt.so in /usr/lib/sparcv9
109$(ROOTLIBDIR64)/$(LIBLINKS) := INS.liblink64 = \
110	-$(RM) $@; \
111	cd $(ROOTLIBDIR64); \
112	$(RM) libposix4.so$(VERS) libposix4.so ; \
113	$(SYMLINK) $(LIBLINKS)$(VERS) $(LIBLINKS); \
114	$(SYMLINK) librt.so$(VERS) libposix4.so$(VERS); \
115	$(SYMLINK) libposix4.so$(VERS) libposix4.so
116
117