This is a maintenance fork
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

83 lines
2.3 KiB

2 years ago
2 years ago
2 years ago
2 years ago
  1. #-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐
  2. #───vi: set et ft=make ts=8 tw=8 fenc=utf-8 :vi───────────────────────┘
  3. PKGS += LIBC_LOG
  4. LIBC_LOG_ARTIFACTS += LIBC_LOG_A
  5. LIBC_LOG = $(LIBC_LOG_A_DEPS) $(LIBC_LOG_A)
  6. LIBC_LOG_A = o/$(MODE)/libc/log/log.a
  7. LIBC_LOG_A_FILES := \
  8. $(wildcard libc/log/thunks/*) \
  9. $(wildcard libc/log/*)
  10. LIBC_LOG_A_HDRS = $(filter %.h,$(LIBC_LOG_A_FILES))
  11. LIBC_LOG_A_SRCS_C = $(filter %.c,$(LIBC_LOG_A_FILES))
  12. LIBC_LOG_A_SRCS_S = $(filter %.S,$(LIBC_LOG_A_FILES))
  13. LIBC_LOG_A_SRCS = \
  14. $(LIBC_LOG_A_SRCS_C) \
  15. $(LIBC_LOG_A_SRCS_S)
  16. LIBC_LOG_A_OBJS = \
  17. $(LIBC_LOG_A_SRCS:%=o/$(MODE)/%.zip.o) \
  18. $(LIBC_LOG_A_SRCS_C:%.c=o/$(MODE)/%.o) \
  19. $(LIBC_LOG_A_SRCS_S:%.S=o/$(MODE)/%.o)
  20. LIBC_LOG_A_CHECKS = \
  21. $(LIBC_LOG_A).pkg \
  22. $(LIBC_LOG_A_HDRS:%=o/$(MODE)/%.ok)
  23. LIBC_LOG_A_DIRECTDEPS = \
  24. LIBC_ALG \
  25. LIBC_CALLS \
  26. LIBC_CALLS_HEFTY \
  27. LIBC_CONV \
  28. LIBC_ELF \
  29. LIBC_FMT \
  30. LIBC_TINYMATH \
  31. LIBC_NEXGEN32E \
  32. LIBC_NT_KERNELBASE \
  33. LIBC_MEM \
  34. LIBC_RAND \
  35. LIBC_RUNTIME \
  36. LIBC_STDIO \
  37. LIBC_STR \
  38. LIBC_STUBS \
  39. LIBC_NT_NTDLL \
  40. LIBC_UNICODE \
  41. LIBC_SYSV \
  42. LIBC_TIME \
  43. THIRD_PARTY_DLMALLOC
  44. LIBC_LOG_A_DEPS := \
  45. $(call uniq,$(foreach x,$(LIBC_LOG_A_DIRECTDEPS),$($(x))))
  46. $(LIBC_LOG_A): libc/log/ \
  47. $(LIBC_LOG_A).pkg \
  48. $(LIBC_LOG_A_OBJS)
  49. $(LIBC_LOG_A).pkg: \
  50. $(LIBC_LOG_A_OBJS) \
  51. $(foreach x,$(LIBC_LOG_A_DIRECTDEPS),$($(x)_A).pkg)
  52. $(LIBC_LOG_A_OBJS): \
  53. OVERRIDE_CFLAGS += \
  54. $(NO_MAGIC) \
  55. -fwrapv
  56. # ifeq (,$(MODE))
  57. # LIBC_LOG_ASAN = o/$(MODE)/libc/log/asan.o
  58. # endif
  59. LIBC_LOG_ASAN_A = o/$(MODE)/libc/log/log.a
  60. LIBC_LOG_LIBS = $(foreach x,$(LIBC_LOG_ARTIFACTS),$($(x)))
  61. LIBC_LOG_SRCS = $(foreach x,$(LIBC_LOG_ARTIFACTS),$($(x)_SRCS))
  62. LIBC_LOG_HDRS = $(foreach x,$(LIBC_LOG_ARTIFACTS),$($(x)_HDRS))
  63. LIBC_LOG_BINS = $(foreach x,$(LIBC_LOG_ARTIFACTS),$($(x)_BINS))
  64. LIBC_LOG_CHECKS = $(foreach x,$(LIBC_LOG_ARTIFACTS),$($(x)_CHECKS))
  65. LIBC_LOG_OBJS = $(foreach x,$(LIBC_LOG_ARTIFACTS),$($(x)_OBJS))
  66. LIBC_LOG_TESTS = $(foreach x,$(LIBC_LOG_ARTIFACTS),$($(x)_TESTS))
  67. $(LIBC_LOG_OBJS): $(BUILD_FILES) libc/log/log.mk
  68. .PHONY: o/$(MODE)/libc/log
  69. o/$(MODE)/libc/log: $(LIBC_LOG_CHECKS)