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