| 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 = \ |
| 37 |
ubidi_fuzzer \ |
| 38 |
break_iterator_fuzzer \ |
| 39 |
calendar_fuzzer collator_compare_fuzzer \ |
| 40 |
collator_rulebased_fuzzer \ |
| 41 |
converter_fuzzer date_format_fuzzer \ |
| 42 |
date_time_pattern_generator_fuzzer \ |
| 43 |
dtfmtsym_fuzzer \ |
| 44 |
list_format_fuzzer locale_fuzzer \ |
| 45 |
locale_morph_fuzzer \ |
| 46 |
message_formatter_fuzzer \ |
| 47 |
normalizer2_fuzzer \ |
| 48 |
number_format_fuzzer \ |
| 49 |
number_formatter_fuzzer \ |
| 50 |
plurrule_fuzzer \ |
| 51 |
relative_date_time_formatter_fuzzer \ |
| 52 |
rule_based_break_iterator_fuzzer \ |
| 53 |
timezone_create_fuzzer \ |
| 54 |
time_zone_names_fuzzer \ |
| 55 |
ucasemap_fuzzer \ |
| 56 |
uloc_canonicalize_fuzzer \ |
| 57 |
uloc_for_language_tag_fuzzer \ |
| 58 |
uloc_get_name_fuzzer \ |
| 59 |
uloc_is_right_to_left_fuzzer \ |
| 60 |
uloc_open_keywords_fuzzer \ |
| 61 |
unicodeset_fuzzer \ |
| 62 |
unicode_string_codepage_create_fuzzer \ |
| 63 |
uprop_fuzzer \ |
| 64 |
uregex_open_fuzzer \ |
| 65 |
uregex_match_fuzzer \ |
| 66 |
|
| 67 |
|
| 68 |
OBJECTS = $(FUZZER_TARGETS:%=%.o) |
| 69 |
OBJECTS += fuzzer_driver.o locale_util.o |
| 70 |
|
| 71 |
DEPS = $(OBJECTS:.o=.d) |
| 72 |
|
| 73 |
-include Makefile.local |
| 74 |
|
| 75 |
## List of phony targets |
| 76 |
.PHONY : all all-local install install-local clean clean-local \ |
| 77 |
distclean distclean-local dist dist-local check check-local xcheck \ |
| 78 |
check-exhaustive check-exhaustive-local all_fuzzers |
| 79 |
|
| 80 |
## Clear suffix list |
| 81 |
.SUFFIXES : |
| 82 |
|
| 83 |
## List of standard targets |
| 84 |
all: all-local |
| 85 |
install: install-local |
| 86 |
clean: clean-local |
| 87 |
distclean : distclean-local |
| 88 |
dist: dist-local |
| 89 |
check: all check-local |
| 90 |
xcheck: all xcheck-local |
| 91 |
|
| 92 |
all-local: $(TARGET) |
| 93 |
|
| 94 |
install-local: |
| 95 |
|
| 96 |
dist-local: |
| 97 |
|
| 98 |
clean-local: |
| 99 |
test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES) |
| 100 |
$(RMV) $(OBJECTS) $(TARGET) $(FUZZER_TARGETS) |
| 101 |
|
| 102 |
distclean-local: clean-local |
| 103 |
$(RMV) Makefile |
| 104 |
|
| 105 |
check-local: all-local |
| 106 |
# Create a dummy test case file with content "abc123" |
| 107 |
echo "abc123" > dummytestcase |
| 108 |
$(foreach trgt,$(FUZZER_TARGETS), echo $(trgt); $(INVOKE) ./$(trgt) dummytestcase -q \ |
| 109 |
$(TEST_OUTPUT_OPTS) || exit \ |
| 110 |
$(IOTEST_OPTS);) |
| 111 |
|
| 112 |
xcheck-local: check-local |
| 113 |
|
| 114 |
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status |
| 115 |
cd $(top_builddir) \ |
| 116 |
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status |
| 117 |
|
| 118 |
all_fuzzers: $(FUZZER_TARGETS) |
| 119 |
|
| 120 |
%_fuzzer: %_fuzzer.o fuzzer_driver.o locale_util.o |
| 121 |
$(LINK.cc) $(OUTOPT)$@ $^ $(LIBS) |
| 122 |
|
| 123 |
ifeq (,$(MAKECMDGOALS)) |
| 124 |
-include $(DEPS) |
| 125 |
else |
| 126 |
ifneq ($(patsubst %clean,,$(MAKECMDGOALS)),) |
| 127 |
ifneq ($(patsubst %install,,$(MAKECMDGOALS)),) |
| 128 |
-include $(DEPS) |
| 129 |
endif |
| 130 |
endif |
| 131 |
endif |