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