7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin#
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin# CDDL HEADER START
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin#
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin# The contents of this file are subject to the terms of the
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin# Common Development and Distribution License (the "License").
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin# You may not use this file except in compliance with the License.
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin#
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin# or http://www.opensolaris.org/os/licensing.
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin# See the License for the specific language governing permissions
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin# and limitations under the License.
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin#
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin# When distributing Covered Code, include this CDDL HEADER in each
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin# If applicable, add the following below this CDDL HEADER, with the
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin# fields enclosed by brackets "[]" replaced with your own identifying
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin# information: Portions Copyright [yyyy] [name of copyright owner]
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin#
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin# CDDL HEADER END
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin#
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin#
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin# Use is subject to license terms.
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin#
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin
7c2fbfb345896881c631598ee3852ce9ce33fb07April ChinSHELL=/usr/bin/ksh93
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin
7c2fbfb345896881c631598ee3852ce9ce33fb07April ChinLIBRARY= libsum.a
7c2fbfb345896881c631598ee3852ce9ce33fb07April ChinVERS= .1
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin
7c2fbfb345896881c631598ee3852ce9ce33fb07April ChinOBJECTS= \
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin sumlib.o
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chininclude ../../Makefile.astmsg
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chininclude ../../Makefile.lib
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin# mapfile-vers does not live with the sources in in common/ to make
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin# automated code updates easier.
7c2fbfb345896881c631598ee3852ce9ce33fb07April ChinMAPFILES= ../mapfile-vers
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin# Set common AST build flags (e.g. C99/XPG6, needed to support the math stuff)
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chininclude ../../../Makefile.ast
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin
7c2fbfb345896881c631598ee3852ce9ce33fb07April ChinLIBS = $(DYNLIB) $(LINTLIB)
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin
7c2fbfb345896881c631598ee3852ce9ce33fb07April ChinLDLIBS += \
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin -last \
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin -lmd \
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin -lc
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin$(LINTLIB) := SRCS = $(SRCDIR)/$(LINTSRC)
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin
7c2fbfb345896881c631598ee3852ce9ce33fb07April ChinSRCDIR = ../common
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin# We use "=" here since using $(CPPFLAGS.master) is very tricky in our
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin# case - it MUST come as the last element but future changes in -D options
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin# may then cause silent breakage in the AST sources because the last -D
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin# option specified overrides previous -D options so we prefer the current
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin# way to explicitly list each single flag.
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin# Notes:
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin# - "-D_BLD_DLL" comes from ${mam_cc_DLL} in Mamfile
7c2fbfb345896881c631598ee3852ce9ce33fb07April ChinCPPFLAGS = \
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin $(DTEXTDOM) $(DTS_ERRNO) \
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin -Isrc/lib/libsum \
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin -I$(ROOT)/usr/include/ast \
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz -I$(ROOT)/usr/include \
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin -D_PACKAGE_ast \
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin -D_BLD_DLL
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin
7c2fbfb345896881c631598ee3852ce9ce33fb07April ChinCFLAGS += \
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin $(ASTCFLAGS)
7c2fbfb345896881c631598ee3852ce9ce33fb07April ChinCFLAGS64 += \
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin $(ASTCFLAGS64)
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin
7014882c6a3672fd0e5d60200af8643ae53c5928Richard LoweCERRWARN += -_gcc=-Wno-parentheses
7014882c6a3672fd0e5d60200af8643ae53c5928Richard Lowe
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz# This codepath is performance-critical
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainzsparc_COPTFLAG=-xO5 -_cc=-xprefetch=auto,explicit
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainzsparcv9_COPTFLAG=-xO5 -_cc=-xprefetch=auto,explicit
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainzi386_COPTFLAG=-_cc=-xO5 -_cc=-xprefetch=auto,explicit
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainzamd64_COPTFLAG=-_cc=-xO5 -_cc=-xprefetch=auto,explicit
34f9b3eef6fdadbda0a846aa4d68691ac40eace5Roland Mainz
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin# Suppress this one warning as the fix would break old gcc, which upstream
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin# still supports. This needs a better fix (later).
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chinpics/sumlib.o := CERRWARN += -erroff=E_CONST_PROMOTED_UNSIGNED_LONG
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin.KEEP_STATE:
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chinall: $(LIBS)
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin#
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin# libsum is not lint-clean yet; fake up a target. (You can use
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin# "make lintcheck" to actually run lint; please send all lint fixes
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin# upstream (to AT&T) so the next update will pull them into ON.)
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin#
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chinlint:
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin @ print "usr/src/lib/libsum is not lint-clean: skipping"
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chininclude ../../Makefile.targ