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
6 ## Source directory information
8 top_srcdir = @top_srcdir@
12 ## All the flags and other definitions are included here.
13 include $(top_builddir)/icudefs.mk
15 ## Build directory information
18 ## Extra files to remove for 'make clean'
19 CLEANFILES = *~ $(DEPS) $(TESTXML)
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/../../=)
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)
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
38 OBJECTS = $(FUZZER_TARGETS:%=%.o)
39 OBJECTS += fuzzer_driver.o locale_util.o
41 DEPS = $(OBJECTS:.o=.d)
43 -include Makefile.local
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
53 ## List of standard targets
55 install: install-local
57 distclean : distclean-local
59 check: all check-local
60 xcheck: all xcheck-local
69 test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES)
70 $(RMV) $(OBJECTS) $(TARGET) $(FUZZER_TARGETS)
72 distclean-local: clean-local
75 check-local: all-local
76 $(foreach trgt,$(FUZZER_TARGETS), echo $(trgt); $(INVOKE) ./$(trgt) \
77 $(TEST_OUTPUT_OPTS) || exit \
80 xcheck-local: check-local
82 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
84 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
86 all_fuzzers: $(FUZZER_TARGETS)
88 %_fuzzer: %_fuzzer.o fuzzer_driver.o locale_util.o
89 $(LINK.cc) $(OUTOPT)$@ $^ $(LIBS)
91 ifeq (,$(MAKECMDGOALS))
94 ifneq ($(patsubst %clean,,$(MAKECMDGOALS)),)
95 ifneq ($(patsubst %install,,$(MAKECMDGOALS)),)