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# 23# Copyright 2009 Sun Microsystems, Inc. All rights reserved. 24# Use is subject to license terms. 25# 26# Copyright 2021 OmniOS Community Edition (OmniOSce) Association. 27 28SHELL= /usr/bin/ksh93 29 30LIBRARY= libsum.a 31VERS= .1 32 33include ../Makefile.defs 34 35OBJECTS += $(LIBOBJS) 36 37include $(SRC)/lib/Makefile.lib 38include ../../Makefile.ast 39 40MAPFILES= ../mapfile-vers 41 42LIBS= $(DYNLIB) 43 44LDLIBS += -last -lmd -lc 45 46# We use "=" here since using $(CPPFLAGS.master) is very tricky in our 47# case - it MUST come as the last element but future changes in -D options 48# may then cause silent breakage in the AST sources because the last -D 49# option specified overrides previous -D options so we prefer the current 50# way to explicitly list each single flag. 51# Notes: 52CPPFLAGS= \ 53 $(DTEXTDOM) $(DTS_ERRNO) \ 54 -Iast -I. \ 55 -I$(ROOT)/usr/include/ast \ 56 -I$(ROOT)/usr/include \ 57 -D_PACKAGE_ast \ 58 -D_BLD_DLL 59 60CFLAGS += $(ASTCFLAGS) 61CFLAGS64 += $(ASTCFLAGS64) 62 63CERRWARN += -_gcc=-Wno-parentheses 64 65# This codepath is performance-critical 66sparc_COPTFLAG = -xO5 -_cc=-xprefetch=auto,explicit 67sparcv9_COPTFLAG = $(sparc_COPTFLAG) 68i386_COPTFLAG = -_cc=-xO5 -_cc=-xprefetch=auto,explicit 69amd64_COPTFLAG = $(i386_COPTFLAG) 70 71all: install_h .WAIT $(LIBS) 72 73# 74# libsum is not lint-clean yet; fake up a target. (You can use 75# "make lintcheck" to actually run lint; please send all lint fixes 76# upstream (to AT&T) so the next update will pull them into ON.) 77# 78lint: 79 @ print "usr/src/lib/libsum is not lint-clean: skipping" 80 81include $(SRC)/lib/Makefile.targ 82 83pics/%.o: $(ASTSRC)/%.c 84 $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $< 85 $(POST_PROCESS_O) 86 87###################################################################### 88# Header file generation 89 90$(HEADERSRC:%=ast/%): FRC 91 $(MKDIR) -p $(@D) 92 $(CP) $(ASTSRC)/$(@F) $@ 93 94install_h: $(HEADERSRC:%=ast/%) 95 96CLOBBERFILES += ast/* 97 98_feature: FRC 99 $(MAKE) -f Makefile.iffe generate 100 101include ../../Makefile.astmsg 102 103FRC: 104