5432N/A#
5432N/A## CDDL HEADER START
5432N/A#
5432N/A# The contents of this file are subject to the terms of the
5432N/A# Common Development and Distribution License (the "License").
5432N/A# You may not use this file except in compliance with the License.
5432N/A#
5432N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5432N/A# or http://www.opensolaris.org/os/licensing.
5432N/A# See the License for the specific language governing permissions
5432N/A# and limitations under the License.
5432N/A#
5432N/A# When distributing Covered Code, include this CDDL HEADER in each
5432N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5432N/A# If applicable, add the following below this CDDL HEADER, with the
5432N/A# fields enclosed by brackets "[]" replaced with your own identifying
5432N/A# information: Portions Copyright [yyyy] [name of copyright owner]
5432N/A#
5432N/A# CDDL HEADER END
5432N/A#
5680N/A
5680N/A#
5432N/A# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
5432N/A#
6510N/Aexport PARFAIT_BUILD=no
5680N/ACOMPILER= gcc
5432N/A
6510N/Ainclude ../../../make-rules/shared-macros.mk
5432N/A
5432N/ACOMPONENT_DIR := $(shell pwd)/..
5432N/A
5432N/ACOMPONENT_PRE_BUILD_ACTION = \
5432N/A ( $(MKDIR) build/$(MACH) ; \
5432N/A $(MKDIR) build/$(MACH64) )
5432N/A
5432N/AOBJECTS = cxa_finalize-32.o cxa_finalize-64.o \
5432N/A cxa_finalize_pic-32.o cxa_finalize_pic-64.o
5432N/A
6510N/Ainclude $(WS_MAKE_RULES)/common.mk
6510N/A
6510N/AGCC_VERSION := 4.9
6510N/A
6510N/A# We need GCC version 4.9, and not another version.
6510N/ACC=/usr/gcc/$(GCC_VERSION)/bin/gcc
6510N/ACXX=/usr/gcc/$(GCC_VERSION)/bin/g++
5432N/A
5432N/ARELEASE_LIST=Debug+Asserts+Checks Debug+Asserts Debug Release+Debug Release Unoptimized
5432N/A
6510N/A# Keep CFLAGS simple and generic.
5432N/ACFLAGS = -g -O2 -std=c99 -Wall -Wextra -Wcast-align
5432N/AARCH = $(shell uname -p)
5432N/A
5432N/Aifeq ($(ARCH),sparc)
5432N/A CFLAGS += -mtune=ultrasparc -mcpu=ultrasparc -mvis
5432N/Aendif
5432N/A
5432N/Aifeq ($(ARCH),i386)
6510N/A CFLAGS += -mtune=opteron -march=opteron -mno-sse3 -mno-ssse3
5432N/Aendif
5432N/A
5432N/Aall:: $(OBJECTS)
5432N/A
5432N/Acxa_finalize-32.o: cxa_finalize.c
5432N/A $(CC) -m32 $(CFLAGS) -c $< -o $@
5432N/A
5432N/Acxa_finalize_pic-32.o: cxa_finalize.c
5432N/A $(CC) -m32 $(CFLAGS) -fPIC -c $< -o $@
5432N/A
5432N/Acxa_finalize-64.o: cxa_finalize.c
5432N/A $(CC) -m64 $(CFLAGS) -c $< -o $@
5432N/A
5432N/Acxa_finalize_pic-64.o: cxa_finalize.c
5432N/A $(CC) -m64 $(CFLAGS) -fPIC -c $< -o $@
5432N/A
5432N/Acxa_atexit-32.o: cxa_atexit.c
5432N/A $(CC) -m32 $(CFLAGS) -c $< -o $@
5432N/A
5432N/Acxa_atexit-64.o: cxa_atexit.c
5432N/A $(CC) -m64 $(CFLAGS) -c $< -o $@
5432N/A
5432N/Aclean::
5432N/A rm -f $(OBJECTS)
5432N/A
5432N/Acheck:: build
5432N/A $(MKDIR) build/$(MACH)
5432N/A $(MKDIR) build/$(MACH64)
5432N/A
5432N/Abuild: all
5432N/A
5432N/Ainstall: build
5432N/A $(MKDIR) $(PROTOUSRLIBDIR)/clang
5432N/A $(MKDIR) $(PROTOUSRLIBDIR)/clang/$(MACH64)
5432N/A $(CP) cxa_finalize-32.o \
5432N/A $(PROTOUSRLIBDIR)/clang/cxa_finalize.o
5432N/A $(CP) cxa_finalize_pic-32.o \
5432N/A $(PROTOUSRLIBDIR)/clang/cxa_finalize_pic.o
5432N/A $(CP) cxa_finalize-64.o \
5432N/A $(PROTOUSRLIBDIR)/clang/$(MACH64)/cxa_finalize.o
5432N/A $(CP) cxa_finalize_pic-64.o \
5432N/A $(PROTOUSRLIBDIR)/clang/$(MACH64)/cxa_finalize_pic.o
5432N/A list='$(RELEASE_LIST)'; for f in $$list; do \
5432N/A if test -d $(BUILD_DIR_32)/$$f/lib ; then \
5432N/A echo "Installing cxa_finalize in $(BUILD_DIR_32)/$$f/lib..." ; \
5432N/A $(MKDIR) $(BUILD_DIR_32)/$$f/lib/$(MACH64) ; \
5432N/A $(CP) cxa_finalize-32.o \
5432N/A $(BUILD_DIR_32)/$$f/lib/cxa_finalize.o ; \
5432N/A $(CP) cxa_finalize_pic-32.o \
5432N/A $(BUILD_DIR_32)/$$f/lib/cxa_finalize_pic.o ; \
5432N/A $(CP) cxa_finalize-64.o \
5432N/A $(BUILD_DIR_32)/$$f/lib/$(MACH64)/cxa_finalize.o ; \
5432N/A $(CP) cxa_finalize_pic-64.o \
5432N/A $(BUILD_DIR_32)/$$f/lib/$(MACH64)/cxa_finalize_pic.o ; \
5432N/A fi ; \
5432N/A if test -d $(BUILD_DIR_64)/$$f/lib ; then \
5432N/A echo "Installing cxa_finalize in $(BUILD_DIR_64)/$$f/lib..." ; \
5432N/A $(MKDIR) $(BUILD_DIR_64)/$$f/lib/$(MACH64) ; \
5432N/A $(CP) cxa_finalize-32.o \
5432N/A $(BUILD_DIR_64)/$$f/lib/cxa_finalize.o ; \
5432N/A $(CP) cxa_finalize_pic-32.o \
5432N/A $(BUILD_DIR_64)/$$f/lib/cxa_finalize_pic.o ; \
5432N/A $(CP) cxa_finalize-64.o \
5432N/A $(BUILD_DIR_64)/$$f/lib/$(MACH64)/cxa_finalize.o ; \
5432N/A $(CP) cxa_finalize_pic-64.o \
5432N/A $(BUILD_DIR_64)/$$f/lib/$(MACH64)/cxa_finalize_pic.o ; \
5432N/A fi ; \
5432N/A done
5432N/A
5680N/Atest: $(NO_TESTS)
5432N/A
5680N/Asystem-test: $(NO_TESTS)
5432N/A