cosmopolitan/third_party/awk/awk.mk
Justine Tunney 8f522cb702
Make improvements
This change progresses our AARCH64 support:

- The AARCH64 build and tests are now passing
- Add 128-bit floating-point support to printf()
- Fix clone() so it initializes cosmo's x28 TLS register
- Fix TLS memory layout issue with aarch64 _Alignas vars
- Revamp microbenchmarking tools so they work on aarch64
- Make some subtle improvements to aarch64 crash reporting
- Make kisdangerous() memory checks more accurate on aarch64
- Remove sys_open() since it's not available on Linux AARCH64

This change makes general improvements to Cosmo and Redbean:

- Introduce GetHostIsa() function in Redbean
- You can now feature check using pledge(0, 0)
- You can now feature check using unveil("",0)
- Refactor some more x86-specific asm comments
- Refactor and write docs for some libm functions
- Make the mmap() API behave more similar to Linux
- Fix WIFSIGNALED() which wrongly returned true for zero
- Rename some obscure cosmo keywords from noFOO to dontFOO
2023-06-03 08:12:22 -07:00

66 lines
2 KiB
Makefile

#-*-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 += THIRD_PARTY_AWK
THIRD_PARTY_AWK_ARTIFACTS += THIRD_PARTY_AWK_A
THIRD_PARTY_AWK = $(THIRD_PARTY_AWK_A_DEPS) $(THIRD_PARTY_AWK_A)
THIRD_PARTY_AWK_A = o/$(MODE)/third_party/awk/awk.a
THIRD_PARTY_AWK_FILES := $(wildcard third_party/awk/*)
THIRD_PARTY_AWK_HDRS = $(filter %.h,$(THIRD_PARTY_AWK_FILES))
THIRD_PARTY_AWK_INCS = $(filter %.inc,$(THIRD_PARTY_AWK_FILES))
THIRD_PARTY_AWK_SRCS = $(filter %.c,$(THIRD_PARTY_AWK_FILES))
THIRD_PARTY_AWK_OBJS = $(THIRD_PARTY_AWK_SRCS:%.c=o/$(MODE)/%.o)
THIRD_PARTY_AWK_A_DIRECTDEPS = \
LIBC_FMT \
LIBC_INTRIN \
LIBC_MEM \
LIBC_NEXGEN32E \
LIBC_RUNTIME \
LIBC_CALLS \
LIBC_STDIO \
LIBC_SYSV \
LIBC_STR \
LIBC_STUBS \
LIBC_TINYMATH \
TOOL_ARGS \
THIRD_PARTY_GDTOA
THIRD_PARTY_AWK_A_DEPS := \
$(call uniq,$(foreach x,$(THIRD_PARTY_AWK_A_DIRECTDEPS),$($(x))))
THIRD_PARTY_AWK_CHECKS = \
$(THIRD_PARTY_AWK_A).pkg \
$(THIRD_PARTY_AWK_HDRS:%=o/$(MODE)/%.ok)
$(THIRD_PARTY_AWK_A): \
third_party/awk/ \
$(THIRD_PARTY_AWK_A).pkg \
$(THIRD_PARTY_AWK_OBJS)
$(THIRD_PARTY_AWK_A).pkg: \
$(THIRD_PARTY_AWK_OBJS) \
$(foreach x,$(THIRD_PARTY_AWK_A_DIRECTDEPS),$($(x)_A).pkg)
o/$(MODE)/third_party/awk/awk.com.dbg: \
$(THIRD_PARTY_AWK) \
o/$(MODE)/third_party/awk/cmd.o \
o/$(MODE)/third_party/awk/README.zip.o \
$(CRT) \
$(APE_NO_MODIFY_SELF)
@$(APELINK)
o/$(MODE)/third_party/awk/README.zip.o: \
ZIPOBJ_FLAGS += \
-B
THIRD_PARTY_AWK_BINS = $(THIRD_PARTY_AWK_COMS) $(THIRD_PARTY_AWK_COMS:%=%.dbg)
THIRD_PARTY_AWK_COMS = o/$(MODE)/third_party/awk/awk.com
THIRD_PARTY_AWK_LIBS = $(THIRD_PARTY_AWK_A)
$(THIRD_PARTY_AWK_OBJS): $(BUILD_FILES) third_party/awk/awk.mk
.PHONY: o/$(MODE)/third_party/awk
o/$(MODE)/third_party/awk: \
$(THIRD_PARTY_AWK_BINS) \
$(THIRD_PARTY_AWK_CHECKS)