xref: /illumos-gate/usr/src/lib/librt/Makefile.com (revision 7c478bd9)
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, Version 1.0 only
6# (the "License").  You may not use this file except in compliance
7# with the License.
8#
9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10# or http://www.opensolaris.org/os/licensing.
11# See the License for the specific language governing permissions
12# and limitations under the License.
13#
14# When distributing Covered Code, include this CDDL HEADER in each
15# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16# If applicable, add the following below this CDDL HEADER, with the
17# fields enclosed by brackets "[]" replaced with your own identifying
18# information: Portions Copyright [yyyy] [name of copyright owner]
19#
20# CDDL HEADER END
21#
22#
23# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26# ident	"%Z%%M%	%I%	%E% SMI"
27#
28# lib/librt/Makefile.com
29
30LIBRARY=	librt.a
31VERS=		.1
32
33OBJECTS=	\
34	aio.o		\
35	clock_timer.o	\
36	fdatasync.o	\
37	mqueue.o	\
38	pos4.o		\
39	pos4obj.o	\
40	sched.o		\
41	sem.o		\
42	shm.o		\
43	sigrt.o
44
45include ../../Makefile.lib
46include ../../Makefile.rootfs
47
48LIBS =		$(DYNLIB) $(LINTLIB)
49LDLIBS += 	-laio -lmd5 -lc
50$(LINTLIB) :=	SRCS = $(SRCDIR)/$(LINTSRC)
51
52SRCDIR=		../common
53MAPDIR=		../spec/$(TRANSMACH)
54SPECMAPFILE=	$(MAPDIR)/mapfile
55
56ROOTLINTDIR64=	$(ROOTLIBDIR64)
57ROOTLINKS64=    $(ROOTLIBDIR64)/$(LIBLINKS)
58
59CFLAGS	+=	$(CCVERBOSE)
60CPPFLAGS +=	-D_REENTRANT -I../../common/inc
61
62#
63# If and when somebody gets around to messaging this, CLOBBERFILE should not
64# be cleared (so that any .po file will be clobbered.
65#
66CLOBBERFILES=	test
67
68.KEEP_STATE:
69
70all: $(LIBS)
71
72lint: lintcheck
73
74# install rule for 64 bit lint library target
75$(ROOTLINTDIR64)/%.ln:	%.ln
76	$(INS.file)
77	cd $(ROOTLINTDIR64); \
78		$(RM) llib-lposix4.ln ; \
79		$(SYMLINK) ./llib-lrt.ln llib-lposix4.ln ;
80
81# install rule for lint library target
82$(ROOTLINTDIR)/%.ln:	%.ln
83	$(INS.file)
84	cd $(ROOTLINTDIR); \
85		$(RM) llib-lposix4 ; \
86		$(SYMLINK) ./llib-lrt llib-lposix4 ; \
87		$(RM) llib-lposix4.ln ; \
88		$(SYMLINK) ./llib-lrt.ln llib-lposix4.ln ;
89
90include ../../Makefile.targ
91
92# install rules for 32-bit librt.so in /usr/lib
93$(ROOTLINKS) := INS.liblink= \
94	$(RM) $@; $(SYMLINK) $(LIBLINKPATH)$(LIBLINKS)$(VERS) $@; \
95		cd $(ROOTLIBDIR); \
96		$(RM)  libposix4.so$(VERS) libposix4.so; \
97		$(SYMLINK) librt.so$(VERS) libposix4.so$(VERS); \
98		$(SYMLINK) libposix4.so$(VERS) libposix4.so;
99
100# install rules for 64-bit librt.so in /usr/lib/sparcv9
101$(ROOTLIBDIR64)/$(LIBLINKS) := INS.liblink64 = \
102	-$(RM) $@; \
103	cd $(ROOTLIBDIR64); \
104	$(RM) libposix4.so$(VERS) libposix4.so ; \
105	$(SYMLINK) $(LIBLINKS)$(VERS) $(LIBLINKS); \
106	$(SYMLINK) librt.so$(VERS) libposix4.so$(VERS); \
107	$(SYMLINK) libposix4.so$(VERS) libposix4.so
108
109