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