xref: /titanic_41/usr/src/lib/libdll/Makefile.com (revision 7014882c6a3672fd0e5d60200af8643ae53c5928)
1da2e3ebdSchin#
2da2e3ebdSchin# CDDL HEADER START
3da2e3ebdSchin#
4da2e3ebdSchin# The contents of this file are subject to the terms of the
5da2e3ebdSchin# Common Development and Distribution License (the "License").
6da2e3ebdSchin# You may not use this file except in compliance with the License.
7da2e3ebdSchin#
8da2e3ebdSchin# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9da2e3ebdSchin# or http://www.opensolaris.org/os/licensing.
10da2e3ebdSchin# See the License for the specific language governing permissions
11da2e3ebdSchin# and limitations under the License.
12da2e3ebdSchin#
13da2e3ebdSchin# When distributing Covered Code, include this CDDL HEADER in each
14da2e3ebdSchin# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15da2e3ebdSchin# If applicable, add the following below this CDDL HEADER, with the
16da2e3ebdSchin# fields enclosed by brackets "[]" replaced with your own identifying
17da2e3ebdSchin# information: Portions Copyright [yyyy] [name of copyright owner]
18da2e3ebdSchin#
19da2e3ebdSchin# CDDL HEADER END
20da2e3ebdSchin#
217c2fbfb3SApril Chin
22da2e3ebdSchin#
2334f9b3eeSRoland Mainz# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
24da2e3ebdSchin# Use is subject to license terms.
25da2e3ebdSchin#
26da2e3ebdSchin
277c2fbfb3SApril ChinSHELL=/usr/bin/ksh93
28da2e3ebdSchin
29da2e3ebdSchinLIBRARY=	libdll.a
30da2e3ebdSchinVERS=		.1
31da2e3ebdSchin
32da2e3ebdSchinOBJECTS= \
33da2e3ebdSchin	dlfcn.o \
34da2e3ebdSchin	dllfind.o \
35da2e3ebdSchin	dlllook.o \
36da2e3ebdSchin	dllnext.o \
3734f9b3eeSRoland Mainz	dllopen.o \
38da2e3ebdSchin	dllplug.o \
39da2e3ebdSchin	dllscan.o
40da2e3ebdSchin
41da2e3ebdSchininclude ../../Makefile.astmsg
42da2e3ebdSchin
43da2e3ebdSchininclude ../../Makefile.lib
44da2e3ebdSchin
45da2e3ebdSchin# mapfile-vers does not live with the sources in in common/ to make
46da2e3ebdSchin# automated code updates easier.
47da2e3ebdSchinMAPFILES=       ../mapfile-vers
48da2e3ebdSchin
497c2fbfb3SApril Chin# Set common AST build flags (e.g. C99/XPG6, needed to support the math stuff)
50da2e3ebdSchininclude ../../../Makefile.ast
51da2e3ebdSchin
52da2e3ebdSchinLIBS =		$(DYNLIB) $(LINTLIB)
537c2fbfb3SApril Chin
547c2fbfb3SApril ChinLDLIBS += \
557c2fbfb3SApril Chin	-last \
567c2fbfb3SApril Chin	-lc
577c2fbfb3SApril Chin
58da2e3ebdSchin$(LINTLIB) :=	SRCS = $(SRCDIR)/$(LINTSRC)
59da2e3ebdSchin
60da2e3ebdSchinSRCDIR =	../common
61da2e3ebdSchin
62da2e3ebdSchin# We use "=" here since using $(CPPFLAGS.master) is very tricky in our
63da2e3ebdSchin# case - it MUST come as the last element but future changes in -D options
64da2e3ebdSchin# may then cause silent breakage in the AST sources because the last -D
65da2e3ebdSchin# option specified overrides previous -D options so we prefer the current
66da2e3ebdSchin# way to explicitly list each single flag.
67da2e3ebdSchin# Notes:
68da2e3ebdSchin#   - "-D_BLD_DLL" comes from ${mam_cc_DLL} in Mamfile
69da2e3ebdSchinCPPFLAGS = \
70da2e3ebdSchin	$(DTEXTDOM) $(DTS_ERRNO) \
71da2e3ebdSchin	$(DLLPLATFORMCPPFLAGS) \
72da2e3ebdSchin	-I. \
73da2e3ebdSchin	-I$(ROOT)/usr/include/ast \
7434f9b3eeSRoland Mainz	-I$(ROOT)/usr/include \
75da2e3ebdSchin	'-DCONF_LIBSUFFIX=".so"' \
76da2e3ebdSchin	'-DCONF_LIBPREFIX="lib"' \
77da2e3ebdSchin	-D_BLD_dll \
78da2e3ebdSchin	-D_PACKAGE_ast \
79da2e3ebdSchin	-D_BLD_DLL
80da2e3ebdSchin
81da2e3ebdSchinCFLAGS += \
827c2fbfb3SApril Chin	$(ASTCFLAGS)
83da2e3ebdSchinCFLAGS64 += \
847c2fbfb3SApril Chin	$(ASTCFLAGS64)
85da2e3ebdSchin
86*7014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-parentheses
87*7014882cSRichard LoweCERRWARN	+= -_gcc=-Wno-uninitialized
88*7014882cSRichard Lowe
89da2e3ebdSchin.KEEP_STATE:
90da2e3ebdSchin
91da2e3ebdSchinall: $(LIBS)
92da2e3ebdSchin
93da2e3ebdSchin#
94da2e3ebdSchin# libdll is not lint-clean yet; fake up a target.  (You can use
95da2e3ebdSchin# "make lintcheck" to actually run lint; please send all lint fixes
96da2e3ebdSchin# upstream (to AT&T) so the next update will pull them into ON.)
97da2e3ebdSchin#
98da2e3ebdSchinlint:
99da2e3ebdSchin	@ print "usr/src/lib/libdll is not lint-clean: skipping"
100da2e3ebdSchin
101da2e3ebdSchininclude ../../Makefile.targ
102