1#****************************************************************************** 2# Copyright (c) 2007-2011, Intel Corp. 3# All rights reserved. 4# 5# Redistribution and use in source and binary forms, with or without 6# modification, are permitted provided that the following conditions are met: 7# 8# * Redistributions of source code must retain the above copyright notice, 9# this list of conditions and the following disclaimer. 10# * Redistributions in binary form must reproduce the above copyright 11# notice, this list of conditions and the following disclaimer in the 12# documentation and/or other materials provided with the distribution. 13# * Neither the name of Intel Corporation nor the names of its contributors 14# may be used to endorse or promote products derived from this software 15# without specific prior written permission. 16# 17# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 21# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27# THE POSSIBILITY OF SUCH DAMAGE. 28#***************************************************************************** 29 30# Makefile for the readtest program - tests for the Intel(r) 31# Decimal Floating-Point Math Library 32 33ifeq ($(CALL_BY_REF),1) 34COPT1 = -DDECIMAL_CALL_BY_REFERENCE=1 35else 36COPT1 = -DDECIMAL_CALL_BY_REFERENCE=0 37endif 38 39ifeq ($(GLOBAL_RND),1) 40COPT2 = -DDECIMAL_GLOBAL_ROUNDING=1 41else 42COPT2 = -DDECIMAL_GLOBAL_ROUNDING=0 43endif 44 45ifeq ($(GLOBAL_FLAGS),1) 46COPT3 = -DDECIMAL_GLOBAL_EXCEPTION_FLAGS=1 47else 48COPT3 = -DDECIMAL_GLOBAL_EXCEPTION_FLAGS=0 49endif 50 51ifeq ($(BID_BIG_ENDIAN),1) 52COPT4 = -DBID_BIG_ENDIAN=1 53else 54COPT4 = -UBID_BIG_ENDIAN 55endif 56 57ifeq ($(HPUX_OS),1) 58ifeq ($(DD64),1) 59COPT5 = -DHPUX_OS +DD64 60else 61COPT5 = -DHPUX_OS +DD32 62endif 63else 64COPT5 = -UHPUX_OS 65endif 66 67ifeq ($(UNCHANGED_BINARY_FLAGS),1) 68COPT6 = -DUNCHANGED_BINARY_STATUS_FLAGS 69else 70COPT6 = 71endif 72 73ifeq ($(OS_TYPE),LINUX) 74CC = 75ifeq ($(HPUX_OS),1) 76COPT = +Ofenvaccess 77else 78ifeq ($(CC),icc) 79COPT = -Werror -Qoption,cpp,--extended_float_types 80else 81COPT = -Werror 82endif 83endif 84 85CFLAGS = -O0 -D__intptr_t_defined -DLINUX $(COPT) $(COPT1) $(COPT2) $(COPT3) $(COPT4) $(COPT5) $(COPT6) $(COPT_ADD) $(DEFINES) 86EXE = 87OBJ = .o 88LIBEXT = .a 89RM = rm -f 90LMOPT = -lm 91 92else 93CC = icl 94ifeq ($(CC),icl) 95COPT = -D_CRT_SECURE_NO_DEPRECATE -Qlong_double -Qoption,cpp,--extended_float_types -Qpc80 96LMOPT = 97else 98COPT = -D_CRT_SECURE_NO_DEPRECATE -DBID_MS_FLAGS 99ifeq ($(OS_TYPE),WIN_IA64) 100LMOPT = bufferoverflowU.lib 101else 102LMOPT = 103endif 104endif 105CFLAGS = -Od -I./ -D__intptr_t_defined -DWINDOWS /nologo $(COPT) $(COPT1) $(COPT2) $(COPT3) $(COPT4) $(COPT6) $(COPT_ADD) $(DEFINES) 106EXE = .exe 107OBJ = .obj 108LIBEXT = .lib 109RM = del 110 111endif 112 113BID_LIB = ../LIBRARY/libbid$(LIBEXT) 114 115default : readtest$(EXE) 116 117%$(OBJ) : %.c 118 $(CC) -c $(CFLAGS) $< 119 120clean: 121 $(RM) *$(OBJ) 122 $(RM) readtest$(EXE) 123 124readtest$(EXE): readtest.c readtest.h test_bid_conf.h test_bid_functions.h $(BID_LIB) 125 $(CC) $(CFLAGS) -o readtest$(EXE) readtest.c $(BID_LIB) $(LMOPT) 126 127