[InstCombine] Drop range attributes in `foldBitCeil` (#116641)
[llvm-project.git] / libc / AOR_v20.02 / string / Dir.mk
blob215452c8dc38611b326e308bd8b9d1cde7c47a66
1 # Makefile fragment - requires GNU make
3 # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 # See https://llvm.org/LICENSE.txt for license information.
5 # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 S := $(srcdir)/string
8 B := build/string
10 ifeq ($(ARCH),)
11 all-string check-string install-string clean-string:
12 @echo "*** Please set ARCH in config.mk. ***"
13 @exit 1
14 else
16 string-lib-srcs := $(wildcard $(S)/$(ARCH)/*.[cS])
17 string-test-srcs := $(wildcard $(S)/test/*.c)
19 string-includes := $(patsubst $(S)/%,build/%,$(wildcard $(S)/include/*.h))
21 string-libs := \
22 build/lib/libstringlib.so \
23 build/lib/libstringlib.a \
25 string-tools := \
26 build/bin/test/memcpy \
27 build/bin/test/memmove \
28 build/bin/test/memset \
29 build/bin/test/memchr \
30 build/bin/test/memcmp \
31 build/bin/test/strcpy \
32 build/bin/test/stpcpy \
33 build/bin/test/strcmp \
34 build/bin/test/strchr \
35 build/bin/test/strrchr \
36 build/bin/test/strchrnul \
37 build/bin/test/strlen \
38 build/bin/test/strnlen \
39 build/bin/test/strncmp
41 string-lib-objs := $(patsubst $(S)/%,$(B)/%.o,$(basename $(string-lib-srcs)))
42 string-test-objs := $(patsubst $(S)/%,$(B)/%.o,$(basename $(string-test-srcs)))
44 string-objs := \
45 $(string-lib-objs) \
46 $(string-lib-objs:%.o=%.os) \
47 $(string-test-objs) \
49 string-files := \
50 $(string-objs) \
51 $(string-libs) \
52 $(string-tools) \
53 $(string-includes) \
55 all-string: $(string-libs) $(string-tools) $(string-includes)
57 $(string-objs): $(string-includes)
58 $(string-objs): CFLAGS_ALL += $(string-cflags)
60 build/lib/libstringlib.so: $(string-lib-objs:%.o=%.os)
61 $(CC) $(CFLAGS_ALL) $(LDFLAGS) -shared -o $@ $^
63 build/lib/libstringlib.a: $(string-lib-objs)
64 rm -f $@
65 $(AR) rc $@ $^
66 $(RANLIB) $@
68 build/bin/test/%: $(B)/test/%.o build/lib/libstringlib.a
69 $(CC) $(CFLAGS_ALL) $(LDFLAGS) -static -o $@ $^ $(LDLIBS)
71 build/include/%.h: $(S)/include/%.h
72 cp $< $@
74 build/bin/%.sh: $(S)/test/%.sh
75 cp $< $@
77 check-string: $(string-tools)
78 $(EMULATOR) build/bin/test/memcpy
79 $(EMULATOR) build/bin/test/memmove
80 $(EMULATOR) build/bin/test/memset
81 $(EMULATOR) build/bin/test/memchr
82 $(EMULATOR) build/bin/test/memcmp
83 $(EMULATOR) build/bin/test/strcpy
84 $(EMULATOR) build/bin/test/stpcpy
85 $(EMULATOR) build/bin/test/strcmp
86 $(EMULATOR) build/bin/test/strchr
87 $(EMULATOR) build/bin/test/strrchr
88 $(EMULATOR) build/bin/test/strchrnul
89 $(EMULATOR) build/bin/test/strlen
90 $(EMULATOR) build/bin/test/strnlen
91 $(EMULATOR) build/bin/test/strncmp
93 install-string: \
94 $(string-libs:build/lib/%=$(DESTDIR)$(libdir)/%) \
95 $(string-includes:build/include/%=$(DESTDIR)$(includedir)/%)
97 clean-string:
98 rm -f $(string-files)
99 endif
101 .PHONY: all-string check-string install-string clean-string