xref: /titanic_44/usr/src/lib/c_synonyms/Makefile.com (revision 90bcde942a3919300ffc73f98ea903b58386c395)
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 2008 Sun Microsystems, Inc.  All rights reserved.
23# Use is subject to license terms.
24#
25# ident	"%Z%%M%	%I%	%E% SMI"
26#
27
28LIBRARY = c_synonyms.a
29VERS = .1
30
31OBJECTS = synonyms.o
32
33include ../../Makefile.lib
34include ../../Makefile.rootfs
35
36LIBS 		 = $(DYNLIB)
37LDLIBS 		+= -lc
38
39BUILD.SO =	$(LD) -o $@ -G $(DYNFLAGS) $(PICS) $(LDLIBS)
40
41CLEANFILES += synonym_list mapfile-vers
42
43.KEEP_STATE:
44
45all: $(LIBS)
46
47pics/synonyms.o:	pics .WAIT synonym_list
48
49synonym_list:	../syn_common ../syn2_common syn_isa
50	$(CAT) ../syn_common syn_isa | \
51		$(SED) -e '/^#/d' -e '/^$$/d' -e 's/.*/	SYN(&)/' >synonym_list
52	$(CAT) ../syn2_common | \
53		$(SED) -e '/^#/d' -e '/^$$/d' -e 's/.*/	SYN2(&)/' >>synonym_list
54
55$(DYNLIB):	mapfile-vers $(PICS)
56
57mapfile-vers:	../syn_common ../syn2_common syn_isa
58	echo "SUNWprivate_1.1 {\n    global:" >mapfile-vers
59	$(CAT) ../syn_common syn_isa | \
60		$(SED) -e '/^#/d' -e '/^$$/d' -e 's/.*/	_&;/' >>mapfile-vers
61	$(CAT) ../syn2_common | \
62		$(SED) -e '/^#/d' -e '/^$$/d' -e 's/.*/	__&;/' >>mapfile-vers
63	echo "    local:\n	*;\n};" >>mapfile-vers
64
65BUILD.s=	$(AS) $(ASFLAGS) $< -o $@
66
67# include library targets
68include ../../Makefile.targ
69
70MAPFILES =	mapfile-vers
71
72pics/%.o:	%.s
73	$(BUILD.s)
74