diff options
author | Nicholas Noll <nbnoll@eml.cc> | 2021-10-26 21:01:41 -0700 |
---|---|---|
committer | Nicholas Noll <nbnoll@eml.cc> | 2021-10-26 21:01:41 -0700 |
commit | 29b56ef4e4113bcd091b19d6926f18814162ca53 (patch) | |
tree | a4888a16927576592af13928bb805f1f2b1159d6 /sys/libunicode/rules.mk | |
parent | e34a4791b72e426b02f33496fe03be1ad81819a6 (diff) |
Feat(libunicode): Added an explicit unicode library
Refactored code to pull out utf8 functions from base into a standalone
library. Also left the required function inside arg.c so that code that
calls ARG_BEGIN doesn't have to link to libunicode.
Diffstat (limited to 'sys/libunicode/rules.mk')
-rw-r--r-- | sys/libunicode/rules.mk | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/sys/libunicode/rules.mk b/sys/libunicode/rules.mk new file mode 100644 index 0000000..fb83819 --- /dev/null +++ b/sys/libunicode/rules.mk @@ -0,0 +1,32 @@ +include share/push.mk + +UNICODE = 14.0.0 + +SRCS_$(d) := \ + $(d)/runetobyte.c \ + $(d)/bytetorune.c \ + $(d)/findrune.c \ + $(d)/findlastrune.c \ + $(d)/fullrune.c \ + $(d)/runelen.c \ + $(d)/runetype-$(UNICODE).c + +LIBS_$(d) := $(d)/libunicode.a + +include share/paths.mk + +$(d)/vendor/UnicodeData-$(UNICODE).txt: + curl https://www.unicode.org/Public/$(UNICODE)/ucd/UnicodeData.txt > $@ + +$(d)/vendor/mkrunetype: $(d)/vendor/mkrunetype.c $(OBJ_DIR)/sys/base/base.a + $(COMPLINK) + +$(d)/runetype-$(UNICODE).c: $(d)/vendor/UnicodeData-$(UNICODE).txt $(d)/vendor/mkrunetype + $(dir $@)/vendor/mkrunetype $< > $@ + +GENS += $(d)/vendor/mkrunetype + +$(LIBS_$(d)): $(OBJS_$(d)) + $(ARCHIVE) + +include share/pop.mk |