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