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