1 ## Makefile.in for ICU - tools/icuinfo 2 ## Copyright (c) 1999-2011, 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 41 ## List of phony targets 42 .PHONY : all all-local install install-local clean clean-local \ 43 distclean distclean-local dist dist-local check check-local plugin-check 44 45 ## Clear suffix list 46 .SUFFIXES : 47 48 ## List of standard targets 49 all: all-local 50 install: install-local 51 clean: clean-local 52 distclean : distclean-local 53 dist: dist-local 54 check: all check-local 55 56 all-local: $(TARGET) 57 58 install-local: all-local 59 $(MKINSTALLDIRS) $(DESTDIR)$(bindir) 60 $(INSTALL) $(TARGET) $(DESTDIR)$(bindir) 61 62 dist-local: 63 64 clean-local: 65 test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES) 66 $(RMV) $(TARGET) $(OBJECTS) 67 68 distclean-local: clean-local 69 $(RMV) Makefile 70 71 check-local: $(TARGET) 72 $(INVOKE) ./$(TARGET) $(ICUINFO_OPTS) 73 74 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status 75 cd $(top_builddir) \ 76 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status 77 -include Makefile.local 78 79 $(TARGET) : $(OBJECTS) 80 $(LINK.cc) $(OUTOPT)$@ $^ $(LIBS) 81 $(POST_BUILD_STEP) 82 83 PLUGIN=$(LIBPREFIX)plugin.$(SO) 84 SO_TARGET=$(PLUGIN) 85 86 PLUGINDIR=$(shell pwd) 87 88 PLUGINFILE=$(PLUGINDIR)/icuplugins$(SO_TARGET_VERSION_MAJOR).txt 89 90 $(PLUGINFILE): Makefile 91 echo "$(CURR_FULL_DIR)/$(PLUGIN) myPlugin x=4" > $@ 92 93 CFLAGS+=$(SHAREDLIBCFLAGS) 94 95 $(PLUGIN): $(PLUGIN_OBJECTS) 96 $(SHLIB.cc) $(SHAREDLIBCFLAGS) $(LD_SONAME) $(OUTOPT)$@ $^ $(LIBS) 97 98 plugin: $(PLUGIN) 99 100 plugin-check: $(PLUGIN) $(PLUGINFILE) 101 $(INVOKE) ICU_PLUGINS="$(CURR_FULL_DIR)" ./$(TARGET) -v -L 102 103 104 ifeq (,$(MAKECMDGOALS)) 105 -include $(DEPS) 106 else 107 ifneq ($(patsubst %clean,,$(MAKECMDGOALS)),) 108 -include $(DEPS) 109 endif 110 endif 111 112