Home | History | Annotate | Download | only in i18n
      1 # Copyright (C) 2016 and later: Unicode, Inc. and others.
      2 # License & terms of use: http://www.unicode.org/copyright.html
      3 #******************************************************************************
      4 #
      5 #   Copyright (C) 1998-2016, International Business Machines
      6 #   Corporation and others.  All Rights Reserved.
      7 #
      8 #******************************************************************************
      9 ## Makefile.in for ICU - icui18n.so
     10 ## Stephen F. Booth
     11 
     12 ## Source directory information
     13 srcdir = @srcdir@
     14 top_srcdir = @top_srcdir@
     15 
     16 top_builddir = ..
     17 
     18 ## All the flags and other definitions are included here.
     19 include $(top_builddir)/icudefs.mk
     20 
     21 ## Build directory information
     22 subdir = i18n
     23 
     24 ## Extra files to remove for 'make clean'
     25 CLEANFILES = *~ $(DEPS) $(IMPORT_LIB) $(MIDDLE_IMPORT_LIB) $(FINAL_IMPORT_LIB)
     26 
     27 ## Target information
     28 
     29 TARGET_STUBNAME=$(I18N_STUBNAME)
     30 
     31 ifneq ($(ENABLE_STATIC),)
     32 TARGET = $(LIBDIR)/$(LIBSICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX).$(A)
     33 endif
     34 
     35 ifneq ($(ENABLE_SHARED),)
     36 SO_TARGET = $(LIBDIR)/$(LIBICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX).$(SO)
     37 ALL_SO_TARGETS = $(SO_TARGET) $(MIDDLE_SO_TARGET) $(FINAL_SO_TARGET) $(SHARED_OBJECT)
     38 
     39 ifeq ($(ENABLE_SO_VERSION_DATA),1)
     40 SO_VERSION_DATA = i18n.res
     41 endif
     42 
     43 ifeq ($(OS390BATCH),1)
     44 BATCH_TARGET = $(BATCH_I18N_TARGET)
     45 BATCH_LIBS = $(BATCH_LIBICUUC) -lm
     46 endif   # OS390BATCH
     47 
     48 endif   # ENABLE_SHARED
     49 
     50 ALL_TARGETS = $(TARGET) $(ALL_SO_TARGETS) $(BATCH_TARGET)
     51 
     52 DYNAMICCPPFLAGS = $(SHAREDLIBCPPFLAGS)
     53 DYNAMICCFLAGS = $(SHAREDLIBCFLAGS)
     54 DYNAMICCXXFLAGS = $(SHAREDLIBCXXFLAGS)
     55 CFLAGS += $(LIBCFLAGS)
     56 CXXFLAGS += $(LIBCXXFLAGS)
     57 ifeq ($(OS390BATCH),1)
     58 CFLAGS += -WI
     59 CXXFLAGS += -WI
     60 endif
     61 
     62 CPPFLAGS += -I$(srcdir) -I$(top_srcdir)/common $(LIBCPPFLAGS) $(CPPFLAGSICUI18N)
     63 DEFS += -DU_I18N_IMPLEMENTATION
     64 LDFLAGS += $(LDFLAGSICUI18N)
     65 LIBS = $(LIBICUUC) $(DEFAULT_LIBS)
     66 
     67 OBJECTS = ucln_in.o \
     68 fmtable.o format.o msgfmt.o umsg.o numfmt.o unum.o decimfmt.o decimalformatpattern.o dcfmtsym.o \
     69 digitlst.o fmtable_cnv.o \
     70 choicfmt.o datefmt.o smpdtfmt.o reldtfmt.o dtfmtsym.o udat.o dtptngen.o udatpg.o \
     71 nfrs.o nfrule.o nfsubs.o rbnf.o numsys.o unumsys.o ucsdet.o \
     72 ucal.o calendar.o gregocal.o timezone.o simpletz.o olsontz.o \
     73 astro.o taiwncal.o buddhcal.o persncal.o islamcal.o japancal.o gregoimp.o hebrwcal.o \
     74 indiancal.o chnsecal.o cecal.o coptccal.o dangical.o ethpccal.o \
     75 coleitr.o coll.o sortkey.o bocsu.o ucoleitr.o \
     76 ucol.o ucol_res.o ucol_sit.o \
     77 collation.o collationsettings.o collationdata.o collationtailoring.o \
     78 collationdatareader.o collationdatawriter.o collationfcd.o \
     79 collationiterator.o utf16collationiterator.o utf8collationiterator.o uitercollationiterator.o \
     80 collationsets.o \
     81 collationcompare.o collationfastlatin.o collationkeys.o rulebasedcollator.o collationroot.o \
     82 collationrootelements.o collationdatabuilder.o \
     83 collationweights.o collationruleparser.o collationbuilder.o collationfastlatinbuilder.o \
     84 strmatch.o usearch.o search.o stsearch.o \
     85 translit.o utrans.o esctrn.o unesctrn.o funcrepl.o strrepl.o tridpars.o \
     86 cpdtrans.o rbt.o rbt_data.o rbt_pars.o rbt_rule.o rbt_set.o \
     87 nultrans.o remtrans.o casetrn.o titletrn.o tolowtrn.o toupptrn.o anytrans.o \
     88 name2uni.o uni2name.o nortrans.o quant.o transreg.o brktrans.o \
     89 regexcmp.o rematch.o repattrn.o regexst.o regextxt.o regeximp.o uregex.o uregexc.o \
     90 ulocdata.o measfmt.o currfmt.o curramt.o currunit.o measure.o utmscale.o \
     91 csdetect.o csmatch.o csr2022.o csrecog.o csrmbcs.o csrsbcs.o csrucode.o csrutf8.o inputext.o \
     92 wintzimpl.o windtfmt.o winnmfmt.o basictz.o dtrule.o rbtz.o tzrule.o tztrans.o vtzone.o zonemeta.o \
     93 standardplural.o upluralrules.o plurrule.o plurfmt.o selfmt.o dtitvfmt.o dtitvinf.o udateintervalformat.o \
     94 tmunit.o tmutamt.o tmutfmt.o currpinf.o \
     95 uspoof.o uspoof_impl.o uspoof_build.o uspoof_conf.o decfmtst.o smpdtfst.o \
     96 ztrans.o zrule.o vzone.o fphdlimp.o fpositer.o ufieldpositer.o \
     97 decNumber.o decContext.o alphaindex.o tznames.o tznames_impl.o tzgnames.o \
     98 tzfmt.o compactdecimalformat.o gender.o region.o scriptset.o \
     99 uregion.o reldatefmt.o quantityformatter.o measunit.o \
    100 sharedbreakiterator.o scientificnumberformatter.o digitgrouping.o \
    101 digitinterval.o digitformatter.o digitaffix.o valueformatter.o \
    102 digitaffixesandpadding.o pluralaffix.o precision.o \
    103 affixpatternparser.o smallintformatter.o decimfmtimpl.o \
    104 visibledigits.o dayperiodrules.o \
    105 nounit.o \
    106 number_affixutils.o number_compact.o number_decimalquantity.o \
    107 number_decimfmtprops.o number_fluent.o number_formatimpl.o number_grouping.o \
    108 number_integerwidth.o number_longnames.o number_modifiers.o number_notation.o \
    109 number_padding.o number_patternmodifier.o number_patternstring.o \
    110 number_rounding.o number_scientific.o number_stringbuilder.o
    111 
    112 
    113 ## Header files to install
    114 HEADERS = $(srcdir)/unicode/*.h
    115 
    116 STATIC_OBJECTS = $(OBJECTS:.o=.$(STATIC_O))
    117 
    118 DEPS = $(OBJECTS:.o=.d)
    119 
    120 -include Makefile.local
    121 
    122 ## List of phony targets
    123 .PHONY : all all-local install install-local clean clean-local	\
    124 distclean distclean-local install-library install-headers dist	\
    125 dist-local check check-local check-exhaustive
    126 
    127 ## Clear suffix list
    128 .SUFFIXES :
    129 
    130 ## List of standard targets
    131 all: all-local
    132 install: install-local
    133 clean: clean-local
    134 distclean : distclean-local
    135 dist: dist-local
    136 check: all check-local
    137 
    138 check-exhaustive: check
    139 
    140 all-local: $(ALL_TARGETS)
    141 
    142 install-local: install-headers install-library
    143 
    144 install-library: all-local
    145 	$(MKINSTALLDIRS) $(DESTDIR)$(libdir)
    146 ifneq ($(ENABLE_STATIC),)
    147 	$(INSTALL-L) $(TARGET) $(DESTDIR)$(libdir)
    148 endif
    149 ifneq ($(ENABLE_SHARED),)
    150 	$(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(libdir)
    151 ifneq ($(FINAL_SO_TARGET),$(SO_TARGET))
    152 	cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(SO_TARGET))
    153 ifneq ($(FINAL_SO_TARGET),$(MIDDLE_SO_TARGET))
    154 	cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(MIDDLE_SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(MIDDLE_SO_TARGET))
    155 endif
    156 endif
    157 ifneq ($(IMPORT_LIB_EXT),)
    158 	$(INSTALL-L) $(FINAL_IMPORT_LIB) $(DESTDIR)$(libdir)
    159 ifneq ($(IMPORT_LIB),$(FINAL_IMPORT_LIB))
    160 	cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(IMPORT_LIB)) && ln -s $(notdir $(FINAL_IMPORT_LIB)) $(notdir $(IMPORT_LIB))
    161 endif
    162 ifneq ($(MIDDLE_IMPORT_LIB),$(FINAL_IMPORT_LIB))
    163 	cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(MIDDLE_IMPORT_LIB)) && ln -s $(notdir $(FINAL_IMPORT_LIB)) $(notdir $(MIDDLE_IMPORT_LIB))
    164 endif
    165 endif
    166 endif
    167 
    168 install-headers:
    169 	$(MKINSTALLDIRS) $(DESTDIR)$(includedir)/unicode
    170 	@for file in $(HEADERS); do \
    171 	 echo "$(INSTALL_DATA) $$file $(DESTDIR)$(includedir)/unicode"; \
    172 	 $(INSTALL_DATA) $$file $(DESTDIR)$(includedir)/unicode || exit; \
    173 	done
    174 
    175 dist-local:
    176 
    177 clean-local:
    178 	test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES)
    179 	$(RMV) $(OBJECTS) $(STATIC_OBJECTS) $(ALL_TARGETS) $(SO_VERSION_DATA)
    180 
    181 distclean-local: clean-local
    182 	$(RMV) Makefile
    183 
    184 check-local:
    185 
    186 Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
    187 	cd $(top_builddir) \
    188 	 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
    189 
    190 ifneq ($(ENABLE_STATIC),)
    191 $(TARGET): $(STATIC_OBJECTS)
    192 	$(AR) $(ARFLAGS) $(AR_OUTOPT)$@ $^
    193 	$(RANLIB) $@
    194 endif
    195 
    196 ifneq ($(ENABLE_SHARED),)
    197 $(SHARED_OBJECT): $(OBJECTS) $(SO_VERSION_DATA)
    198 	$(SHLIB.cc) $(LD_SONAME) $(OUTOPT)$@ $^ $(LIBS)
    199 ifeq ($(ENABLE_RPATH),YES)
    200 ifneq ($(wildcard $(libdir)/$(MIDDLE_SO_TARGET)),)
    201 	$(warning RPATH warning: --enable-rpath means test programs may use existing $(libdir)/$(MIDDLE_SO_TARGET))
    202 endif
    203 endif
    204 
    205 ifeq ($(OS390BATCH),1)
    206 $(BATCH_TARGET):$(OBJECTS)
    207 	$(SHLIB.cc) $(LD_SONAME) $(OUTOPT)$@ $^ $(BATCH_LIBS)
    208 endif   # OS390BATCH
    209 endif   # ENABLE_SHARED
    210 
    211 ifeq (,$(MAKECMDGOALS))
    212 -include $(DEPS)
    213 else
    214 ifneq ($(patsubst %clean,,$(MAKECMDGOALS)),)
    215 -include $(DEPS)
    216 endif
    217 endif
    218