• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1## Makefile.in for ICU - tools/icuinfo
2## Copyright (C) 2016 and later: Unicode, Inc. and others.
3## License & terms of use: http://www.unicode.org/copyright.html
4## Copyright (c) 1999-2015, International Business Machines Corporation and
5## others. All Rights Reserved.
6## Madhu Katragadda
7
8## Source directory information
9srcdir = @srcdir@
10top_srcdir = @top_srcdir@
11
12top_builddir = ../..
13
14include $(top_builddir)/icudefs.mk
15
16## Build directory information
17subdir = tools/icuinfo
18
19## Extra files to remove for 'make clean'
20CLEANFILES = *~ $(DEPS) $(PLUGIN_OBJECTS) $(PLUGINFILE) $(PLUGIN)
21
22## Target information
23TARGET = icuinfo$(EXEEXT)
24
25CPPFLAGS += -I$(top_srcdir)/common -I$(srcdir)/../toolutil -I$(top_srcdir)/tools/ctestfw
26CPPFLAGS+= -I$(top_srcdir)/i18n
27LIBS = $(LIBICUTOOLUTIL) $(LIBICUI18N) $(LIBICUUC) $(DEFAULT_LIBS) $(LIB_M)
28
29OBJECTS = icuinfo.o
30@PLUGINS_TRUE@PLUGIN_OBJECTS = testplug.o
31
32DEPS = $(OBJECTS:.o=.d)
33
34# pass some information
35
36ICUINFO_OPTS=-i ../../data/out/build/$(ICUDATA_PLATFORM_NAME) -x $(top_builddir)/config/icuinfo.xml -v -K
37
38## List of phony targets
39.PHONY : all all-local install install-local clean clean-local		\
40distclean distclean-local dist dist-local check check-local plugin-check
41
42## Clear suffix list
43.SUFFIXES :
44
45## List of standard targets
46all: all-local
47install: install-local
48clean: clean-local
49distclean : distclean-local
50dist: dist-local
51check: all check-local
52
53all-local: $(TARGET)
54
55install-local: all-local
56	$(MKINSTALLDIRS) $(DESTDIR)$(bindir)
57	$(INSTALL) $(TARGET) $(DESTDIR)$(bindir)
58
59dist-local:
60
61clean-local:
62	test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES)
63	$(RMV) $(TARGET) $(OBJECTS)
64
65distclean-local: clean-local
66	$(RMV) Makefile
67
68check-local: $(TARGET)
69	$(INVOKE) ./$(TARGET) $(ICUINFO_OPTS)
70
71Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
72	cd $(top_builddir) \
73	 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
74-include Makefile.local
75
76$(TARGET) : $(OBJECTS)
77	$(LINK.cc) $(OUTOPT)$@ $^ $(LIBS)
78	$(POST_BUILD_STEP)
79
80PLUGIN=$(LIBPREFIX)plugin.$(SO)
81SO_TARGET=$(PLUGIN)
82
83PLUGINDIR=$(shell pwd)
84
85PLUGINFILE=$(PLUGINDIR)/icuplugins$(SO_TARGET_VERSION_MAJOR).txt
86
87CFLAGS+=$(SHAREDLIBCFLAGS)
88
89@PLUGINS_TRUE@HAVE_PLUGINS=yes
90
91ifeq ($(HAVE_PLUGINS),yes)
92$(PLUGINFILE): Makefile
93	echo "$(CURR_FULL_DIR)/$(PLUGIN)	myPlugin	x=4" > $@
94
95
96$(PLUGIN): $(PLUGIN_OBJECTS)
97	$(SHLIB.cc) $(SHAREDLIBCFLAGS) $(LD_SONAME) $(OUTOPT)$@ $^ $(LIBS)
98
99plugin: $(PLUGIN)
100
101plugin-check: $(PLUGIN) $(PLUGINFILE)
102	$(INVOKE) ICU_PLUGINS="$(CURR_FULL_DIR)" ./$(TARGET) -v -L
103else
104plugin plugin-check $(PLUGIN):
105	@echo "Plugins are disabled (use --enable-plugins to enable)"
106endif
107
108ifeq (,$(MAKECMDGOALS))
109-include $(DEPS)
110else
111ifneq ($(patsubst %clean,,$(MAKECMDGOALS)),)
112-include $(DEPS)
113endif
114endif
115
116