Home | History | Annotate | Download | only in icuinfo
      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
      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 CPPFLAGS += -I$(top_srcdir)/common -I$(srcdir)/../toolutil -I$(top_srcdir)/tools/ctestfw 
     24 CPPFLAGS+= -I$(top_srcdir)/i18n
     25 LIBS = $(LIBICUTOOLUTIL) $(LIBICUI18N) $(LIBICUUC) $(DEFAULT_LIBS) $(LIB_M)
     26 
     27 OBJECTS = icuinfo.o
     28 PLUGIN_OBJECTS = testplug.o
     29 
     30 DEPS = $(OBJECTS:.o=.d)
     31 
     32 # pass some information
     33 
     34 ICUINFO_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		\
     38 distclean distclean-local dist dist-local check check-local plugin-check
     39 
     40 ## Clear suffix list
     41 .SUFFIXES :
     42 
     43 ## List of standard targets
     44 all: all-local
     45 install: install-local
     46 clean: clean-local
     47 distclean : distclean-local
     48 dist: dist-local
     49 check: all check-local
     50 
     51 all-local: $(TARGET) 
     52 
     53 install-local: all-local
     54 	$(MKINSTALLDIRS) $(DESTDIR)$(bindir)
     55 	$(INSTALL) $(TARGET) $(DESTDIR)$(bindir)
     56 
     57 dist-local:
     58 
     59 clean-local:
     60 	test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES)
     61 	$(RMV) $(TARGET) $(OBJECTS)
     62 
     63 distclean-local: clean-local
     64 	$(RMV) Makefile
     65 
     66 check-local: $(TARGET)
     67 	$(INVOKE) ./$(TARGET) $(ICUINFO_OPTS)
     68 
     69 Makefile: $(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 
     78 PLUGIN=$(LIBPREFIX)plugin.$(SO)
     79 SO_TARGET=$(PLUGIN)
     80 
     81 PLUGINDIR=$(shell pwd)
     82 
     83 PLUGINFILE=$(PLUGINDIR)/icuplugins$(SO_TARGET_VERSION_MAJOR).txt
     84 
     85 $(PLUGINFILE): Makefile
     86 	echo "$(CURR_FULL_DIR)/$(PLUGIN)	myPlugin	x=4" > $@
     87 
     88 CFLAGS+=$(SHAREDLIBCFLAGS)
     89 
     90 $(PLUGIN): $(PLUGIN_OBJECTS)
     91 	$(SHLIB.cc) $(SHAREDLIBCFLAGS) $(LD_SONAME) $(OUTOPT)$@ $^ $(LIBS)
     92 
     93 plugin: $(PLUGIN)
     94 
     95 plugin-check: $(PLUGIN) $(PLUGINFILE)
     96 	$(INVOKE) ICU_PLUGINS="$(CURR_FULL_DIR)" ./$(TARGET) -v -L
     97 
     98 
     99 ifeq (,$(MAKECMDGOALS))
    100 -include $(DEPS)
    101 else
    102 ifneq ($(patsubst %clean,,$(MAKECMDGOALS)),)
    103 -include $(DEPS)
    104 endif
    105 endif
    106 
    107