Home | History | Annotate | Download | only in icuinfo
      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 OBJECTS = icuinfo.o
     30 @PLUGINS_TRUE@PLUGIN_OBJECTS = testplug.o
     31 
     32 DEPS = $(OBJECTS:.o=.d)
     33 
     34 # pass some information
     35 
     36 ICUINFO_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		\
     40 distclean distclean-local dist dist-local check check-local plugin-check
     41 
     42 ## Clear suffix list
     43 .SUFFIXES :
     44 
     45 ## List of standard targets
     46 all: all-local
     47 install: install-local
     48 clean: clean-local
     49 distclean : distclean-local
     50 dist: dist-local
     51 check: all check-local
     52 
     53 all-local: $(TARGET) 
     54 
     55 install-local: all-local
     56 	$(MKINSTALLDIRS) $(DESTDIR)$(bindir)
     57 	$(INSTALL) $(TARGET) $(DESTDIR)$(bindir)
     58 
     59 dist-local:
     60 
     61 clean-local:
     62 	test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES)
     63 	$(RMV) $(TARGET) $(OBJECTS)
     64 
     65 distclean-local: clean-local
     66 	$(RMV) Makefile
     67 
     68 check-local: $(TARGET)
     69 	$(INVOKE) ./$(TARGET) $(ICUINFO_OPTS)
     70 
     71 Makefile: $(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 
     80 PLUGIN=$(LIBPREFIX)plugin.$(SO)
     81 SO_TARGET=$(PLUGIN)
     82 
     83 PLUGINDIR=$(shell pwd)
     84 
     85 PLUGINFILE=$(PLUGINDIR)/icuplugins$(SO_TARGET_VERSION_MAJOR).txt
     86 
     87 CFLAGS+=$(SHAREDLIBCFLAGS)
     88 
     89 @PLUGINS_TRUE@HAVE_PLUGINS=yes
     90 
     91 ifeq ($(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 
     99 plugin: $(PLUGIN)
    100 
    101 plugin-check: $(PLUGIN) $(PLUGINFILE)
    102 	$(INVOKE) ICU_PLUGINS="$(CURR_FULL_DIR)" ./$(TARGET) -v -L
    103 else
    104 plugin plugin-check $(PLUGIN):
    105 	@echo "Plugins are disabled (use --enable-plugins to enable)"
    106 endif
    107 
    108 ifeq (,$(MAKECMDGOALS))
    109 -include $(DEPS)
    110 else
    111 ifneq ($(patsubst %clean,,$(MAKECMDGOALS)),)
    112 -include $(DEPS)
    113 endif
    114 endif
    115 
    116