1# ##############################################################################
2# ==============================================================================
3#  Copyright (c) 2007-2011, Intel Corp.
4#  All rights reserved.
5#
6#  Redistribution and use in source and binary forms, with or without
7#  modification, are permitted provided that the following conditions are met:
8#
9#    * Redistributions of source code must retain the above copyright notice,
10#      this list of conditions and the following disclaimer.
11#    * Redistributions in binary form must reproduce the above copyright
12#      notice, this list of conditions and the following disclaimer in the
13#      documentation and/or other materials provided with the distribution.
14#    * Neither the name of Intel Corporation nor the names of its contributors
15#      may be used to endorse or promote products derived from this software
16#      without specific prior written permission.
17#
18#  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19#  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20#  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21#  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
22#  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23#  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24#  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25#  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26#  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27#  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
28#  THE POSSIBILITY OF SUCH DAMAGE.
29# ==============================================================================
30# ##############################################################################
31# ==============================================================================
32
33# Makefile for math functions for the Intel(r)
34# Decimal Floating-Point Math Library
35
36HELP_TEXT := \
37@\
38@=======================================================================\
39@\
40@This makefile has the following standard (.PHONY) targets:\
41@\
42@    top           The default target. Can be modified via the symbol\
43@                      TOP. The default value is \'lib\'\
44@    lib           Builds the bid library in LIB_DIR directory\
45@    help          Prints this message\
46@    package       Creates a .tar file of the interesting sources\
47@    cleanLib      Deletes all BID library object files\
48@    realCleanLib  Deletes all BID library object files and the library \
49@    cleanBinary   Deletes all binary trancendental support object files\
50@    clean         Implies realCleanLib, cleanBinary \
51@\
52@\
53@Useful command line symbols \
54@\
55@    USE_COMPILER_F128_TYPE	'true' will use the compiler intrinsic\
56@				128-bit floating point type. Otherwise\
57@				use an internal 128-bit floating point\
58@				emulation. Default is 'true'\
59@    USE_COMPILER_F128_TYPE	'true' will use the compiler intrinsic\
60@				80-bit floating point type. Otherwise\
61@				use the selected 128-bit choice. The\
62@				default is 'true'\
63@    IML_MAKEFILE_PRE		Path to local makefile definitions\
64@                               is \$$(TSRC_DIR)/readtest.known_errors\
65@    Others to follow\
66@=======================================================================\
67
68# ==============================================================================
69# Define the default directory structure
70# ==============================================================================
71
72BID_SRC_ROOT ?= .
73SRC_DIR      ?= $(BID_SRC_ROOT)/src
74TSRC_DIR     ?= $(BID_SRC_ROOT)/tests
75F128_DIR     ?= $(BID_SRC_ROOT)/float128
76OBJ_DIR      ?= $(BID_SRC_ROOT)
77GEN_DIR      ?= $(BID_SRC_ROOT)
78TOBJ_DIR     ?= $(BID_SRC_ROOT)
79EXE_DIR      ?= $(OBJ_DIR)
80LIB_DIR      ?= $(OBJ_DIR)
81RES_DIR      ?= $(BID_SRC_ROOT)
82
83include makefile.iml_head
84
85BID_SRC_ROOT := $(BID_SRC_ROOT)
86SRC_DIR      := $(SRC_DIR)
87TSRC_DIR     := $(TSRC_DIR)
88F128_DIR     := $(F128_DIR)
89OBJ_DIR      := $(OBJ_DIR)
90GEN_DIR      := $(GEN_DIR)
91TOBJ_DIR     := $(TOBJ_DIR)
92EXE_DIR      := $(EXE_DIR)
93LIB_DIR      := $(LIB_DIR)
94RES_DIR      := $(RES_DIR)
95
96# =============================================================================
97# Cancel implict rules
98# =============================================================================
99
100%   : %.o
101%.o : %.c
102
103# =============================================================================
104# Set up the default compilation and preprocessing flags.
105# =============================================================================
106
107_CFLAGS_INC    := -I$(SRC_DIR)
108_CFLAGS_CONFIG :=
109_CFLAGS_OS     := $(call HostOsTypeSelect, -DLINUX, -DWINDOWS)
110_CFLAGS_ARCH   := $(call HostArchTypeSelect,-Dia32,-DITANIUM -Dia64, -Defi2)
111_CFLAGS_CC     :=
112_CFLAGS_OPT    :=
113
114ifeq ($(BID_BIG_ENDIAN),true)
115    _CFLAGS_CONFIG += -DBID_BIG_ENDIAN=1
116endif
117
118ifeq ($(HPUX),1)
119    _CFLAGS_OPT += -DHPUX_OS=1 +Ofenvaccess
120ifeq ($(DD64),1)
121    _CFLAGS_OPT += +DD64 -DHPUX_OS_64
122else
123ifeq ($(DD32),1)
124    _CFLAGS_OPT += +DD32
125endif
126endif
127endif
128
129ifeq ($(IS_INTEL_CC),true)
130    ifeq ($(CC_NAME),icl)
131        _CFLAGS_CC += /Qlong-double /Qpc80 /Qstd=c99
132    endif
133endif
134
135ifeq ($(IS_INTEL_CC),true)
136    _USE_COMPILER_F128_TYPE := true
137    _USE_COMPILER_F80_TYPE  := true
138else
139    _USE_COMPILER_F128_TYPE := false
140    _USE_COMPILER_F80_TYPE  := false
141endif
142
143USE_COMPILER_F128_TYPE ?= $(_USE_COMPILER_F128_TYPE)
144USE_COMPILER_F80_TYPE  ?= $(_USE_COMPILER_F80_TYPE)
145
146ifneq ($(USE_COMPILER_F128_TYPE),true)
147    _CFLAGS_CONFIG += -DUSE_COMPILER_F128_TYPE=0
148else
149    _CFLAGS_CONFIG += -DUSE_COMPILER_F128_TYPE=1
150    ifeq ($(IS_INTEL_CC),true)
151        _CFLAGS_CC += -Qoption,cpp,--extended_float_types
152    endif
153endif
154
155ifneq ($(strip $(USE_COMPILER_F80_TYPE)),true)
156    _CFLAGS_CONFIG += -DUSE_COMPILER_F80_TYPE=0
157else
158    _CFLAGS_CONFIG += -DUSE_COMPILER_F80_TYPE=1
159endif
160
161# =============================================================================
162# Assemble all of the CFLAG parts and override values
163# =============================================================================
164
165CFLAGS_AUX    ?= $(_CFLAGS_AUX)
166CFLAGS_OPT    ?= $(_CFLAGS_OPT)
167CFLAGS_CC     ?= $(_CFLAGS_CC)
168CFLAGS_ARCH   ?= $(_CFLAGS_ARCH)
169CFLAGS_OS     ?= $(_CFLAGS_OS)
170CFLAGS_INC    ?= $(_CFLAGS_INC)
171CFLAGS_CONFIG ?= $(_CFLAGS_CONFIG)
172
173CFLAGS        ?= $(foreach n,INC CONFIG OS ARCH CC OPT AUX,$(CFLAGS_$n))
174# get rid of extra blank characters
175CFLAGS        := $(foreach n,$(CFLAGS),$n)
176
177#========================================================================
178#   Added BID build options (used for open source release)
179#========================================================================
180
181ifneq ($(DFP_WRAP),1)
182    override DFP_WRAP := 0
183endif
184
185ifneq ($(CALL_BY_REF),1)
186    override CALL_BY_REF := 0
187else
188    override DFP_WRAP := 0
189endif
190
191ifneq ($(GLOBAL_RND),1)
192    override GLOBAL_RND := 0
193    override DFP_WRAP := 0
194endif
195
196ifneq ($(GLOBAL_FLAGS),1)
197    override GLOBAL_FLAGS := 0
198    override DFP_WRAP := 0
199endif
200
201BID_BLD_FLAGS := -DDECIMAL_CALL_BY_REFERENCE=$(CALL_BY_REF)	\
202                 -DDECIMAL_GLOBAL_ROUNDING=$(GLOBAL_RND)	\
203                 -DDECIMAL_GLOBAL_EXCEPTION_FLAGS=$(GLOBAL_FLAGS)
204
205ifeq ($(UNCHANGED_BINARY_FLAGS),1)
206    BID_BLD_FLAGS += -DUNCHANGED_BINARY_STATUS_FLAGS
207endif
208
209ifeq ($(IS_INTEL_CC),true)
210ifeq ($(DFP_WRAP),1)
211    BID_BLD_FLAGS += -D__DFP_WRAPPERS_ON=1
212endif
213endif
214
215
216# =============================================================================
217# Set up default target
218# =============================================================================
219
220TOP ?= lib
221
222.PHONY : top
223top : $(TOP)
224
225.PHONY :  default
226
227# =============================================================================
228# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
229# =============================================================================
230# Targets for building the BID library
231# =============================================================================
232# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
233# =============================================================================
234
235# =============================================================================
236# The BID transcendental functions assume the existence of a corresponding
237# binary transcendental function. If such a function is not available on the
238# target system, then we need to provide it as part of the the BID library.
239# If the binary functions are missing, it is usually the 128-bit quad precision
240# routines. Below, we create the list of quad functions that are required by
241# the BID package
242# =============================================================================
243
244F128_NAMES := $(addprefix dpml_ux_, bid bessel cbrt erf exp int inv_hyper  \
245                                    inv_trig lgamma log mod powi pow sqrt \
246                                    trig ops ops_64 )                      \
247               dpml_four_over_pi dpml_exception sqrt_tab_t
248
249F128_OBJS  := $(call PrefixSuffix, $(OBJ_DIR)/, $(F128_NAMES), .$O )
250
251# =============================================================================
252# For some systems, some of the double precision binary transcendentals are
253# missing. Again, here we create the list of missing functions
254# =============================================================================
255
256ifeq ($(IML_HOST_OS)_$(CC_NAME),WINNT_cl)
257
258    F53_NAMES  := $(call PrefixSuffix,dpml_, asinh acosh cbrt erf erfc expm1 \
259                    exp10 exp2 lgamma log1p tgamma rt_lgamma,_t) \
260                         dpml_pow_t_table dpml_cbrt_t_table \
261                         dpml_special_exp_t
262    ifeq ($(IML_HOST_ARCH),IA32)
263        F53_NAMES += dpml_log2_t
264    endif
265    F53_OBJS   := $(call PrefixSuffix,$(OBJ_DIR)/, $(F53_NAMES), .$O)
266
267endif
268
269# =============================================================================
270# Define the contents of the library
271#
272#	BID_COMMON_LIBM	Transcendental function routines that are supported in
273#                          32, 64 and 128 bit forms and include bid_trans.h
274#                          rather than bid_internal.h
275#	BID_COMMON_OPS	Decimal operation routines that are supported in
276#                          32, 64 and 128 bit forms and include bid_internal.h
277#	COMMON          Decimal operation routines that are supported in
278#                          32, 64 and 128 bit forms but don't have a 'bid'
279#                          prefix
280#	BID_<n>		Routines that are supported in only <n> bit forms
281#	BID		Generic bid routines not specifically related to
282#                          data type length
283#       BID_MISC	Required files that don't begin with the 'bid'
284#                       prefix
285#
286# =============================================================================
287
288BID_COMMON_LIBM := \
289	acos acosh asin asinh atan atan2 atanh cbrt cos cosh erf erfc exp    \
290	exp10 exp2 expm1 hypot lgamma log log10 log1p log2 pow sin sinh tan  \
291	tanh tgamma
292
293BID_COMMON_OPS := \
294        add compare div fdimd fma fmod frexp ldexp llrintd logb logbd lrintd \
295	lround minmax modf mul nearbyintd next nexttowardd noncomp quantexpd \
296        quantize rem round_integral scalb scalbl sqrt string to_int16        \
297        to_int32 to_int64 to_int8 to_uint16 to_uint32 to_uint64 to_uint8
298
299COMMON  := strtod wcstod
300
301BID_32  := sub to_bid128 to_bid64
302
303BID_64  := to_bid128
304
305BID_128 := 2_str_tables
306
307BID     := \
308        binarydecimal convert_data decimal_data decimal_globals dpd \
309        feclearexcept fegetexceptflag feraiseexcept fesetexceptflag \
310        fetestexcept flag_operations from_int round
311
312BID_MISC := bid128
313
314BID_TRANS_OBJS := \
315	$(call CrossCat5, $(OBJ_DIR)/bid,64 128,_,$(BID_COMMON_LIBM),.$O)
316
317BID_INTERNAL_OBJS := \
318	$(call CrossCat5, $(OBJ_DIR)/bid,32 64 128,_,$(BID_COMMON_OPS),.$O) \
319	$(call CrossCat4, $(OBJ_DIR)/,$(COMMON),32 64 128,.$O)              \
320	$(call CrossCat3, $(OBJ_DIR)/bid32_, $(BID_COMMON_LIBM),.$O)        \
321	$(call CrossCat5, $(OBJ_DIR)/bid32_, $(BID_32),.$O)                 \
322	$(call CrossCat3, $(OBJ_DIR)/bid64_, $(BID_64),.$O)                 \
323	$(call CrossCat3, $(OBJ_DIR)/bid128_,$(BID_128),.$O)                \
324	$(call CrossCat3, $(OBJ_DIR)/bid_,   $(BID),.$O)                    \
325	$(call CrossCat3, $(OBJ_DIR)/,       $(BID_MISC),.$O)
326
327ALL_BID_OBJS := $(BID_TRANS_OBJS) $(BID_INTERNAL_OBJS)
328
329ifneq ($(strip $(USE_COMPILER_F128_TYPE)),true)
330
331   # ==========================================================================
332   # Include the necessary binary transcendental routines that are not
333   # available on the target system
334   # ==========================================================================
335
336   ALL_BID_OBJS := $(ALL_BID_OBJS) $(F128_OBJS) $(F53_OBJS)
337
338endif
339
340$(ALL_BID_OBJS)           :: $(OBJ_DIR)/.directory_exists
341
342$(OBJ_DIR)/bid_b2d.$O      :: $(SRC_DIR)/bid_b2d.h
343$(OBJ_DIR)/strtod32.$O     :: $(SRC_DIR)/bid_strtod.h
344$(OBJ_DIR)/bid64_fma.$O    :: $(SRC_DIR)/bid_inline_add.h
345$(OBJ_DIR)/bid32_string.$O :: $(SRC_DIR)/bid128_2_str_macros.h
346$(OBJ_DIR)/bid32_string.$O :: $(SRC_DIR)/bid128_2_str.h
347$(OBJ_DIR)/bid32_sqrt.$O   :: $(SRC_DIR)/bid_sqrt_macros.h
348$(OBJ_DIR)/bid32_div.$O    :: $(SRC_DIR)/bid_div_macros.h
349
350$(BID_TRANS_OBJS)    :: $(OBJ_DIR)/%.$O : $(SRC_DIR)/%.c $(SRC_DIR)/bid_trans.h
351	$(CC) -c $(FO)$@ $(CFLAGS) $(BID_BLD_FLAGS) $<
352
353
354$(BID_INTERNAL_OBJS) :: $(OBJ_DIR)/%.$O : $(SRC_DIR)/%.c \
355                        $(SRC_DIR)/bid_internal.h
356	$(CC) -c $(FO)$@ $(CFLAGS) $(BID_BLD_FLAGS) $<
357
358$(SRC_DIR)/bid_trans.h : $(SRC_DIR)/bid_internal.h
359	touch $@
360
361$(SRC_DIR)/bid_internal.h : $(SRC_DIR)/bid_conf.h $(SRC_DIR)/bid_functions.h
362	touch $@
363
364ifeq ($(CC),gcc)
365$(SRC_DIR)/bid_functions.h : $(SRC_DIR)/bid_gcc_intrinsics.h
366	touch $@
367endif
368
369BID_LIB = $(LIB_DIR)/libbid.$A
370
371lib : $(BID_LIB)
372
373$(BID_LIB) :: $(LIB_DIR)/.directory_exists
374
375$(BID_LIB) :: $(ALL_BID_OBJS)
376	$(AR_CMD) $(AR_OUT)$@ $^
377
378.PHONY : cleanLib realCleanLib
379
380cleanLib :
381	$(RM) $(ALL_BID_OBJS)
382
383realCleanLib : cleanLib
384	$(RM) $(BID_LIB)
385
386# =============================================================================
387# Targets for the non-native binary transcendental functions.
388#
389# Most of the 128-bit functions have a simple build rule:
390#
391#	dpml_<foo>_x.o : dpml_ux_<foo>.c dpml_<foo>_x.h
392#		$(CC) ... $<
393#
394# Files that fit this rule are included in the F128_HDR_xxx lists. Other files
395# are handled individually
396# =============================================================================
397
398F128_PLATFORM_FLAGS := $(foreach n, IML_HOST_ARCH IML_HOST_OS CC_NAME \
399                        ,-D$(call ToLower,$($n)))
400
401F128_CFLAGS := $(CFLAGS_OPT) -DUSE_NATIVE_QUAD_TYPE=0 $(F128_PLATFORM_FLAGS)
402
403F128_HDR_NAMES := bessel cons int  lgamma powi sqrt     bid  erf inv_hyper \
404                  log    pow  trig cbrt   exp  inv_trig mod
405
406F128_HDR_OBJS := $(call PrefixSuffix, $(OBJ_DIR)/dpml_ux_,$(F128_HDR_NAMES),.$O)
407
408$(F128_DIR)/dpml_ux.h : $(F128_DIR)/dpml_private.h  \
409                        $(F128_DIR)/dpml_ux_32_64.h \
410                        $(F128_DIR)/dpml_cons_x.h
411	touch $@
412
413$(F128_DIR)/dpml_private.h : $(call PrefixSuffix, $(F128_DIR)/,               \
414                               build op_system compiler architecture i_format \
415                               f_format mtc_macros mphoc_macros poly_macros   \
416                               assert dpml_names dpml_exception ix86_macros, .h)
417	touch $@
418
419$(OBJ_DIR)/dpml_globals.$O :: $(call PrefixSuffix, $(F128_DIR)/,             \
420                              build op_system compiler architecture f_format \
421                              dpml_names mphoc_macros, .h)
422
423$(OBJ_DIR)/dpml_error_codes.$O :: $(call PrefixSuffix, $(F128_DIR)/, \
424                                  dpml_error_codes_enum dpml_function_info, .h)
425
426$(OBJ_DIR)/dpml_exception.$O :: $(call PrefixSuffix, $(F128_DIR)/, \
427                                  dpml_error_codes, .h)
428
429$(F128_HDR_OBJS) :: $(OBJ_DIR)/dpml_ux_%.$O : $(F128_DIR)/dpml_%_x.h
430
431$(F128_OBJS) :: $(OBJ_DIR)/%.$O : $(F128_DIR)/%.c $(F128_DIR)/dpml_ux.h
432	$(CC) -c $(FO)$@ $(F128_CFLAGS) $<
433
434
435# =============================================================================
436# The targets for the double precision binary functions is much less regualar.
437# =============================================================================
438
439F53_CFLAGS  := $(subst -DWINDOWS,-DWNT,$(CFLAGS))
440
441$(F53_OBJS) :: $(F128_DIR)/dpml_private.h $(F128_DIR)/dpml_globals.h \
442                    $(F128_DIR)/dpml_error_codes_enum.h
443
444BUILD_FILE_NAME = $(basename $(notdir $@)).h
445D_F_NAME          = -D$(call ToUpper,$(W2))
446D_F_TYPE          = -D$(call ToUpper,$(W3))_FLOAT
447
448$(OBJ_DIR)/dpml_asinh_t.$O  :: $(F128_DIR)/sqrt_tab_t.c
449
450$(OBJ_DIR)/dpml_erf_t.$O \
451$(OBJ_DIR)/dpml_asinh_t.$O  :: $(OBJ_DIR)/dpml_%_t.$O : $(F128_DIR)/dpml_%.c \
452                               $(F128_DIR)/dpml_%_t.h
453	$(CC) -c $(FO)$@ $(F53_CFLAGS) $(D_F_NAME) $(D_F_TYPE) $(D_F_NAME) \
454             -DBUILD_FILE_NAME=$(BUILD_FILE_NAME) $<
455
456$(OBJ_DIR)/dpml_rt_lgamma_t.$O :: $(F128_DIR)/dpml_lgamma.c \
457                                  $(F128_DIR)/dpml_lgamma_t.h
458	$(CC) -c $(FO)$@ $(F53_CFLAGS) -DT_FLOAT -DBUILD_FILE_NAME=dpml_lgamma_t.h $<
459
460$(OBJ_DIR)/dpml_lgamma_t.$O :: $(F128_DIR)/dpml_lgamma.c \
461                                  $(F128_DIR)/dpml_lgamma_t.h
462	$(CC) -c $(FO)$@ $(F53_CFLAGS) $(D_F_TYPE) -DDO_LGAMMA -DHACK_GAMMA_INLINE=0 \
463             -DBUILD_FILE_NAME=dpml_lgamma_t.h $<
464
465$(OBJ_DIR)/dpml_acosh_t.$O :: $(F128_DIR)/dpml_asinh.c $(F128_DIR)/dpml_acosh_t.h \
466                              $(F128_DIR)/sqrt_tab_t.c
467	$(CC) -c $(FO)$@ $(F53_CFLAGS) $(D_F_NAME) $(D_F_TYPE) $<
468
469$(OBJ_DIR)/dpml_erfc_t.$O  :: $(F128_DIR)/dpml_erf.c   $(F128_DIR)/dpml_erf_t.h
470	$(CC) -c $(FO)$@ $(F53_CFLAGS) $(D_F_NAME) $(D_F_TYPE) \
471        -DBUILD_FILE_NAME=dpml_erf_t.h $<
472
473$(OBJ_DIR)/dpml_log1p_t.$O :: $(F128_DIR)/dpml_log.c $(F128_DIR)/dpml_log_t.h
474	$(CC) -c $(FO)$@ $(F53_CFLAGS) $(D_F_NAME) $(D_F_TYPE) $<
475
476$(OBJ_DIR)/dpml_log2_t.$O :: $(F128_DIR)/dpml_log.c $(F128_DIR)/dpml_log_t.h
477	$(CC) -c $(FO)$@ $(F53_CFLAGS) $(D_F_NAME) $(D_F_TYPE) $<
478
479$(OBJ_DIR)/dpml_cbrt_t.$O :: $(F128_DIR)/dpml_cbrt.c $(F128_DIR)/dpml_cbrt_t_table.c
480	$(CC) -c $(FO)$@ $(F53_CFLAGS) $(D_F_NAME) $(D_F_TYPE) \
481        -DBUILD_FILE_NAME=dpml_cbrt_t_table.c $<
482
483$(OBJ_DIR)/dpml_exp10_t.$O \
484$(OBJ_DIR)/dpml_exp2_t.$O  :: $(F128_DIR)/dpml_exp.c $(F128_DIR)/dpml_pow_t_table.c
485	$(CC) -c $(FO)$@ $(F53_CFLAGS) $(D_F_NAME) $(D_F_TYPE) -DUSE_CONTROL87 $<
486
487$(OBJ_DIR)/dpml_expm1_t.$O :: $(F128_DIR)/dpml_expm1.c $(F128_DIR)/dpml_pow_t_table.c
488	$(CC) -c $(FO)$@ $(F53_CFLAGS) $(D_F_NAME) $(D_F_TYPE) -DUSE_CONTROL87 $<
489
490$(OBJ_DIR)/dpml_tgamma_t.$O :: $(F128_DIR)/dpml_tgamma.c $(F128_DIR)/dpml_special_exp.h
491	$(CC) -c $(FO)$@ $(F53_CFLAGS) $(D_F_NAME) $(D_F_TYPE) $<
492
493$(OBJ_DIR)/dpml_special_exp_t.$O :: $(F128_DIR)/dpml_exp.c \
494                                  $(F128_DIR)/dpml_pow_t_table.c
495	$(CC) -c $(FO)$@ $(F53_CFLAGS) -DSPECIAL_EXP -DT_FLOAT $<
496
497
498$(OBJ_DIR)/dpml_pow_t_table.$O \
499$(OBJ_DIR)/dpml_cbrt_t_table.$O :: $(OBJ_DIR)/%.$O : $(F128_DIR)/%.c
500	$(CC) -c $(FO)$@ $(F53_CFLAGS) $(D_F_TYPE) $<
501
502
503cleanBinary :
504	$(RM) $(F128_OBJS) $(F53_OBJS)
505
506
507# =============================================================================
508# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
509# =============================================================================
510
511
512
513.PHONY : clean
514
515
516
517# =============================================================================
518# Clean targets
519# =============================================================================
520
521clean :
522	$(RM) $(BID_LIB) *.$O
523
524
525#realClean : realCleanLib cleanBinary
526
527
528.directory_exists:
529	touch $@
530
531
532# =============================================================================
533# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
534# =============================================================================
535# End of makefile
536# =============================================================================
537# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
538# =============================================================================
539