2020-06-15 14:18:57 +00:00
|
|
|
#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐
|
|
|
|
#───vi: set et ft=make ts=8 tw=8 fenc=utf-8 :vi───────────────────────┘
|
|
|
|
|
|
|
|
PKGS += LIBC_TINYMATH
|
|
|
|
|
|
|
|
LIBC_TINYMATH_ARTIFACTS += LIBC_TINYMATH_A
|
|
|
|
LIBC_TINYMATH = $(LIBC_TINYMATH_A_DEPS) $(LIBC_TINYMATH_A)
|
|
|
|
LIBC_TINYMATH_A = o/$(MODE)/libc/tinymath/tinymath.a
|
2020-09-03 12:44:37 +00:00
|
|
|
LIBC_TINYMATH_A_FILES := $(wildcard libc/tinymath/*)
|
2020-06-15 14:18:57 +00:00
|
|
|
LIBC_TINYMATH_A_HDRS = $(filter %.h,$(LIBC_TINYMATH_A_FILES))
|
|
|
|
LIBC_TINYMATH_A_SRCS_A = $(filter %.s,$(LIBC_TINYMATH_A_FILES))
|
|
|
|
LIBC_TINYMATH_A_SRCS_S = $(filter %.S,$(LIBC_TINYMATH_A_FILES))
|
|
|
|
LIBC_TINYMATH_A_SRCS_C = $(filter %.c,$(LIBC_TINYMATH_A_FILES))
|
|
|
|
LIBC_TINYMATH_A_SRCS = $(LIBC_TINYMATH_A_SRCS_S) $(LIBC_TINYMATH_A_SRCS_C)
|
|
|
|
LIBC_TINYMATH_A_CHECKS = $(LIBC_TINYMATH_A).pkg
|
|
|
|
|
|
|
|
LIBC_TINYMATH_A_OBJS = \
|
|
|
|
$(LIBC_TINYMATH_A_SRCS_A:%.s=o/$(MODE)/%.o) \
|
|
|
|
$(LIBC_TINYMATH_A_SRCS_S:%.S=o/$(MODE)/%.o) \
|
|
|
|
$(LIBC_TINYMATH_A_SRCS_C:%.c=o/$(MODE)/%.o)
|
|
|
|
|
|
|
|
LIBC_TINYMATH_A_CHECKS = \
|
|
|
|
$(LIBC_TINYMATH_A).pkg \
|
|
|
|
$(LIBC_TINYMATH_A_HDRS:%=o/$(MODE)/%.ok)
|
|
|
|
|
|
|
|
LIBC_TINYMATH_A_DIRECTDEPS = \
|
2021-01-16 20:05:41 +00:00
|
|
|
LIBC_INTRIN \
|
2021-03-08 00:34:16 +00:00
|
|
|
LIBC_NEXGEN32E \
|
2023-05-02 20:38:16 +00:00
|
|
|
LIBC_SYSV \
|
|
|
|
THIRD_PARTY_COMPILER_RT
|
2020-06-15 14:18:57 +00:00
|
|
|
|
|
|
|
LIBC_TINYMATH_A_DEPS := \
|
|
|
|
$(call uniq,$(foreach x,$(LIBC_TINYMATH_A_DIRECTDEPS),$($(x))))
|
|
|
|
|
|
|
|
$(LIBC_TINYMATH_A): \
|
|
|
|
libc/tinymath/ \
|
|
|
|
$(LIBC_TINYMATH_A).pkg \
|
|
|
|
$(LIBC_TINYMATH_A_OBJS)
|
|
|
|
|
|
|
|
$(LIBC_TINYMATH_A).pkg: \
|
|
|
|
$(LIBC_TINYMATH_A_OBJS) \
|
|
|
|
$(foreach x,$(LIBC_TINYMATH_A_DIRECTDEPS),$($(x)_A).pkg)
|
|
|
|
|
2023-05-03 07:00:09 +00:00
|
|
|
o/$(MODE)/libc/tinymath/lround.o \
|
|
|
|
o/$(MODE)/libc/tinymath/lroundf.o \
|
2023-05-14 16:32:15 +00:00
|
|
|
o/$(MODE)/libc/tinymath/lroundl.o: private \
|
2023-06-06 06:35:31 +00:00
|
|
|
CFLAGS += \
|
2023-05-03 07:00:09 +00:00
|
|
|
-fno-builtin
|
|
|
|
|
2023-05-14 16:32:15 +00:00
|
|
|
o/$(MODE)/libc/tinymath/expl.o \
|
|
|
|
o/$(MODE)/libc/tinymath/loglq.o: private \
|
2023-06-06 06:35:31 +00:00
|
|
|
CFLAGS += \
|
2023-05-14 16:32:15 +00:00
|
|
|
-ffunction-sections
|
|
|
|
|
2023-05-19 02:05:08 +00:00
|
|
|
$(LIBC_TINYMATH_A_OBJS): private \
|
2023-06-06 06:35:31 +00:00
|
|
|
CFLAGS += \
|
2023-05-19 02:05:08 +00:00
|
|
|
-fsigned-zeros \
|
|
|
|
-ftrapping-math \
|
|
|
|
-frounding-math \
|
|
|
|
-fsignaling-nans \
|
|
|
|
-fno-reciprocal-math \
|
|
|
|
-fno-associative-math \
|
|
|
|
-fno-finite-math-only \
|
|
|
|
-fno-cx-limited-range \
|
|
|
|
-ffp-int-builtin-inexact
|
|
|
|
|
2020-06-15 14:18:57 +00:00
|
|
|
LIBC_TINYMATH_LIBS = $(foreach x,$(LIBC_TINYMATH_ARTIFACTS),$($(x)))
|
|
|
|
LIBC_TINYMATH_HDRS = $(foreach x,$(LIBC_TINYMATH_ARTIFACTS),$($(x)_HDRS))
|
|
|
|
LIBC_TINYMATH_SRCS = $(foreach x,$(LIBC_TINYMATH_ARTIFACTS),$($(x)_SRCS))
|
|
|
|
LIBC_TINYMATH_CHECKS = $(foreach x,$(LIBC_TINYMATH_ARTIFACTS),$($(x)_CHECKS))
|
|
|
|
LIBC_TINYMATH_OBJS = $(foreach x,$(LIBC_TINYMATH_ARTIFACTS),$($(x)_OBJS))
|
|
|
|
LIBC_TINYMATH_CHECKS = $(LIBC_TINYMATH_HDRS:%=o/$(MODE)/%.ok)
|
|
|
|
$(LIBC_TINYMATH_OBJS): $(BUILD_FILES) libc/tinymath/tinymath.mk
|
|
|
|
|
|
|
|
.PHONY: o/$(MODE)/libc/tinymath
|
2023-05-02 20:38:16 +00:00
|
|
|
o/$(MODE)/libc/tinymath: \
|
|
|
|
$(LIBC_TINYMATH_CHECKS) \
|
|
|
|
o/$(MODE)/libc/tinymath/tinymath.a
|