]> git.saurik.com Git - apple/icu.git/blob - icuSources/test/fuzzer/Makefile.in
ICU-66108.tar.gz
[apple/icu.git] / icuSources / test / fuzzer / Makefile.in
1 # © 2019 and later: Unicode, Inc. and others.
2 # License & terms of use: http://www.unicode.org/copyright.html
3 #******************************************************************************
4 ## Makefile.in for ICU - test/fuzzer
5
6 ## Source directory information
7 srcdir = @srcdir@
8 top_srcdir = @top_srcdir@
9
10 top_builddir = ../..
11
12 ## All the flags and other definitions are included here.
13 include $(top_builddir)/icudefs.mk
14
15 ## Build directory information
16 subdir = test/fuzzer
17
18 ## Extra files to remove for 'make clean'
19 CLEANFILES = *~ $(DEPS) $(TESTXML)
20
21 ## Target information
22 TARGET = all_fuzzers
23
24 BUILDDIR := $(CURR_SRCCODE_FULL_DIR)/../../
25 # Simplify the path for Unix
26 BUILDDIR := $(BUILDDIR:test/fuzzer/../../=)
27 # Simplify the path for Windows
28 BUILDDIR := $(BUILDDIR:test\\fuzzer/../../=)
29 # Simplify the path for Windows 98
30 BUILDDIR := $(BUILDDIR:TEST\\FUZZER/../../=)
31
32 CPPFLAGS += -I$(srcdir) -I$(top_srcdir)/common -I$(top_srcdir)/i18n -I$(top_srcdir)/tools/ctestfw -I$(top_srcdir)/io
33 DEFS += -D'U_TOPSRCDIR="$(top_srcdir)/"' -D'U_TOPBUILDDIR="$(BUILDDIR)"'
34 LIBS = $(LIBCTESTFW) $(LIBICUTOOLUTIL) $(LIBICUIO) $(LIBICUI18N) $(LIBICUUC) $(DEFAULT_LIBS) $(LIB_M)
35
36 FUZZER_TARGETS = break_iterator_fuzzer collator_compare_fuzzer collator_rulebased_fuzzer converter_fuzzer locale_fuzzer number_format_fuzzer ucasemap_fuzzer uloc_canonicalize_fuzzer uloc_for_language_tag_fuzzer uloc_get_name_fuzzer uloc_is_right_to_left_fuzzer uloc_open_keywords_fuzzer unicode_string_codepage_create_fuzzer uregex_open_fuzzer
37
38 OBJECTS = $(FUZZER_TARGETS:%=%.o)
39 OBJECTS += fuzzer_driver.o locale_util.o
40
41 DEPS = $(OBJECTS:.o=.d)
42
43 -include Makefile.local
44
45 ## List of phony targets
46 .PHONY : all all-local install install-local clean clean-local \
47 distclean distclean-local dist dist-local check check-local xcheck \
48 check-exhaustive check-exhaustive-local all_fuzzers
49
50 ## Clear suffix list
51 .SUFFIXES :
52
53 ## List of standard targets
54 all: all-local
55 install: install-local
56 clean: clean-local
57 distclean : distclean-local
58 dist: dist-local
59 check: all check-local
60 xcheck: all xcheck-local
61
62 all-local: $(TARGET)
63
64 install-local:
65
66 dist-local:
67
68 clean-local:
69 test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES)
70 $(RMV) $(OBJECTS) $(TARGET) $(FUZZER_TARGETS)
71
72 distclean-local: clean-local
73 $(RMV) Makefile
74
75 check-local: all-local
76 $(foreach trgt,$(FUZZER_TARGETS), echo $(trgt); $(INVOKE) ./$(trgt) \
77 $(TEST_OUTPUT_OPTS) || exit \
78 $(IOTEST_OPTS);)
79
80 xcheck-local: check-local
81
82 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
83 cd $(top_builddir) \
84 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
85
86 all_fuzzers: $(FUZZER_TARGETS)
87
88 %_fuzzer: %_fuzzer.o fuzzer_driver.o locale_util.o
89 $(LINK.cc) $(OUTOPT)$@ $^ $(LIBS)
90
91 ifeq (,$(MAKECMDGOALS))
92 -include $(DEPS)
93 else
94 ifneq ($(patsubst %clean,,$(MAKECMDGOALS)),)
95 ifneq ($(patsubst %install,,$(MAKECMDGOALS)),)
96 -include $(DEPS)
97 endif
98 endif
99 endif