Imported Upstream version 58.1
[platform/upstream/icu.git] / source / test / letest / Makefile.in
1 ## Makefile.in for ICU - test/letest
2 ## Copyright (C) 2016 and later: Unicode, Inc. and others.
3 ## License & terms of use: http://www.unicode.org/copyright.html
4 ## Copyright (c) 2001-2014, International Business Machines Corporation and
5 ## others. All Rights Reserved.
6
7 ## Source directory information
8 srcdir = @srcdir@
9 top_srcdir = @top_srcdir@
10
11 top_builddir = ../..
12
13 include $(top_builddir)/icudefs.mk
14
15 ## Build directory information
16 subdir = test/letest
17
18 ## Extra files to remove for 'make clean'
19 CLEANFILES = *~ $(DEPS)
20
21 ## Target information
22 TESTTARGET  = letest
23 GENTARGET   = gendata
24
25 BUILDDIR := $(CURR_SRCCODE_FULL_DIR)/../../
26 # Simplify the path for Unix
27 BUILDDIR := $(BUILDDIR:test/cintltst/../../=)
28 # Simplify the path for Windows
29 BUILDDIR := $(BUILDDIR:test\\cintltst/../../=)
30 # Simplify the path for Windows 98
31 BUILDDIR := $(BUILDDIR:TEST\\CINTLTST/../../=)
32
33 CPPFLAGS += -I$(top_srcdir)/common -I$(top_srcdir)/i18n -I$(top_srcdir)/tools/ctestfw -I$(top_srcdir)/tools/toolutil -I$(top_srcdir)/layoutex $(ICULE_CFLAGS) $(ICULEHB_CFLAGS)
34 DEFS += -D'U_TOPSRCDIR="$(top_srcdir)/"' -D'U_TOPBUILDDIR="$(BUILDDIR)"'
35 LIBS = $(LIBICULX) $(LIBICUUC) $(LIBICUI18N) $(LIBCTESTFW) $(LIBICUTOOLUTIL) $(DEFAULT_LIBS) $(LIB_M) $(ICULEHB_LIBS)
36
37 COMMONOBJECTS = letsutil.o cmaps.o FontTableCache.o SimpleFontInstance.o PortableFontInstance.o
38 TESTOBJECTS   = letest.o
39 CTESTOBJECTS  = cfonts.o xmlreader.o cletest.o
40 GENOBJECTS    = gendata.o
41
42 OBJECTS = $(COMMONOBJECTS) $(TESTOBJECTS) $(GENOBJECTS)
43
44 DEPS = $(OBJECTS:.o=.d)
45
46 ## List of phony targets
47 .PHONY : all all-local install install-local clean clean-local  \
48 distclean distclean-local dist dist-local check check-local xcheck xcheck-local
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: $(TESTTARGET)
63
64 install-local:
65
66 dist-local:
67
68 clean-local:
69         test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES)
70         $(RMV) $(COMMONOBJECTS) $(TESTOBJECTS) $(CTESTOBJECTS) $(GENOBJECTS) $(TARGET)
71
72 distclean-local: clean-local
73         $(RMV) Makefile
74
75 check-local: all-local
76         $(INVOKE) ./$(TESTTARGET) $(TEST_OUTPUT_OPTS) $(LETEST_OPTS)
77
78 TESTXML=$(top_builddir)/test-$(TESTTARGET).xml
79 xcheck-local: all-local
80         $(INVOKE) ./$(TESTTARGET) $(TEST_OUTPUT_OPTS) $(LETEST_OPTS) -x $(TESTXML)
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 $(TESTTARGET) : $(COMMONOBJECTS) $(TESTOBJECTS) $(CTESTOBJECTS)
87         $(LINK.cc) $(OUTOPT)$@ $^ $(LIBS)
88         $(POST_BUILD_STEP)
89
90 $(GENTARGET) : $(COMMONOBJECTS) $(GENOBJECTS)
91         $(LINK.cc) $(OUTOPT)$@ $^ $(LIBS)
92         $(POST_BUILD_STEP)
93
94 invoke:
95         ICU_DATA=$${ICU_DATA:-$(top_builddir)/data/} TZ=PST8PDT $(INVOKE) $(INVOCATION)
96
97 gen-data: $(GENTARGET)
98         ICU_DATA=$${ICU_DATA:-$(top_builddir)/data/} TZ=PST8PDT $(INVOKE) ./$(GENTARGET) $(top_srcdir)/test/testdata/letest.xml $(srcdir)/gendata.xml
99
100 ifeq (,$(MAKECMDGOALS))
101 -include $(DEPS)
102 else
103 ifneq ($(patsubst %clean,,$(MAKECMDGOALS)),)
104 ifneq ($(patsubst %install,,$(MAKECMDGOALS)),)
105 -include $(DEPS)
106 endif
107 endif
108 endif