Home | History | Annotate | Download | only in i18n
      1 #******************************************************************************
      2 #
      3 #   Copyright (C) 1998-2009, International Business Machines
      4 #   Corporation and others.  All Rights Reserved.
      5 #
      6 #******************************************************************************
      7 ## Makefile.in for ICU - icui18n.so
      8 ## Stephen F. Booth
      9 
     10 ## Source directory information
     11 srcdir = @srcdir@
     12 top_srcdir = @top_srcdir@
     13 
     14 top_builddir = ..
     15 
     16 ## All the flags and other definitions are included here.
     17 include $(top_builddir)/icudefs.mk
     18 
     19 ## Build directory information
     20 subdir = i18n
     21 
     22 ## Extra files to remove for 'make clean'
     23 CLEANFILES = *~ $(DEPS) $(IMPORT_LIB) $(MIDDLE_IMPORT_LIB) $(FINAL_IMPORT_LIB)
     24 
     25 ## Target information
     26 
     27 TARGET_STUBNAME=$(I18N_STUBNAME)
     28 
     29 ifneq ($(ENABLE_STATIC),)
     30 TARGET = $(LIBDIR)/$(LIBSICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX).$(A)
     31 endif
     32 
     33 ifneq ($(ENABLE_SHARED),)
     34 SO_TARGET = $(LIBDIR)/$(LIBICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX).$(SO)
     35 ALL_SO_TARGETS = $(SO_TARGET) $(MIDDLE_SO_TARGET) $(FINAL_SO_TARGET) $(SHARED_OBJECT)
     36 
     37 ifeq ($(ENABLE_SO_VERSION_DATA),1)
     38 SO_VERSION_DATA = i18n.res
     39 endif
     40 
     41 ifeq ($(OS390BATCH),1)
     42 BATCH_TARGET = $(BATCH_I18N_TARGET)
     43 BATCH_LIBS = $(BATCH_LIBICUUC) -lm
     44 endif   # OS390BATCH
     45 
     46 endif   # ENABLE_SHARED
     47 
     48 ALL_TARGETS = $(TARGET) $(ALL_SO_TARGETS) $(BATCH_TARGET)
     49 
     50 DYNAMICCPPFLAGS = $(SHAREDLIBCPPFLAGS)
     51 DYNAMICCFLAGS = $(SHAREDLIBCFLAGS)
     52 DYNAMICCXXFLAGS = $(SHAREDLIBCXXFLAGS)
     53 CFLAGS += $(LIBCFLAGS)
     54 CXXFLAGS += $(LIBCXXFLAGS)
     55 
     56 ifneq ($(top_builddir),$(top_srcdir))
     57 CPPFLAGS += -I$(top_builddir)/common
     58 endif
     59 CPPFLAGS += -I$(srcdir) -I$(top_srcdir)/common $(LIBCPPFLAGS)
     60 DEFS += -DU_I18N_IMPLEMENTATION
     61 LDFLAGS += $(LDFLAGSICUI18N)
     62 LIBS = $(LIBICUUC) $(DEFAULT_LIBS)
     63 
     64 OBJECTS = ucln_in.o \
     65 fmtable.o format.o msgfmt.o umsg.o numfmt.o unum.o decimfmt.o dcfmtsym.o \
     66 ucurr.o digitlst.o fmtable_cnv.o \
     67 choicfmt.o datefmt.o smpdtfmt.o reldtfmt.o dtfmtsym.o udat.o dtptngen.o \
     68 nfrs.o nfrule.o nfsubs.o rbnf.o numsys.o ucsdet.o \
     69 ucal.o calendar.o gregocal.o timezone.o simpletz.o olsontz.o \
     70 astro.o taiwncal.o buddhcal.o persncal.o islamcal.o japancal.o gregoimp.o hebrwcal.o \
     71 indiancal.o chnsecal.o cecal.o coptccal.o ethpccal.o \
     72 coleitr.o coll.o tblcoll.o sortkey.o bocsu.o ucoleitr.o \
     73 ucol.o ucol_res.o ucol_bld.o ucol_sit.o ucol_tok.o ucol_wgt.o ucol_cnt.o ucol_elm.o \
     74 strmatch.o usearch.o search.o stsearch.o \
     75 translit.o utrans.o esctrn.o unesctrn.o funcrepl.o strrepl.o tridpars.o \
     76 cpdtrans.o rbt.o rbt_data.o rbt_pars.o rbt_rule.o rbt_set.o \
     77 nultrans.o remtrans.o casetrn.o titletrn.o tolowtrn.o toupptrn.o anytrans.o \
     78 name2uni.o uni2name.o nortrans.o quant.o transreg.o brktrans.o \
     79 regexcmp.o rematch.o repattrn.o regexst.o udatpg.o uregex.o uregexc.o \
     80 ulocdata.o measfmt.o currfmt.o curramt.o currunit.o measure.o utmscale.o \
     81 csdetect.o csmatch.o csr2022.o csrecog.o csrmbcs.o csrsbcs.o csrucode.o csrutf8.o inputext.o \
     82 wintzimpl.o windtfmt.o winnmfmt.o basictz.o dtrule.o rbtz.o tzrule.o tztrans.o vtzone.o \
     83 zonemeta.o zstrfmt.o plurrule.o plurfmt.o dtitvfmt.o dtitvinf.o \
     84 tmunit.o tmutamt.o tmutfmt.o colldata.o bmsearch.o bms.o currpinf.o \
     85 uspoof.o uspoof_impl.o uspoof_build.o uspoof_buildconf.o uspoof_buildwsconf.o
     86 
     87 ## Header files to install
     88 HEADERS = $(srcdir)/unicode/*.h
     89 
     90 STATIC_OBJECTS = $(OBJECTS:.o=.$(STATIC_O))
     91 
     92 DEPS = $(OBJECTS:.o=.d)
     93 
     94 -include Makefile.local
     95 
     96 ## List of phony targets
     97 .PHONY : all all-local install install-local clean clean-local	\
     98 distclean distclean-local install-library install-headers dist	\
     99 dist-local check check-local
    100 
    101 ## Clear suffix list
    102 .SUFFIXES :
    103 
    104 ## List of standard targets
    105 all: all-local
    106 install: install-local
    107 clean: clean-local
    108 distclean : distclean-local
    109 dist: dist-local
    110 check: all check-local
    111 
    112 all-local: $(ALL_TARGETS)
    113 
    114 install-local: install-headers install-library
    115 
    116 install-library: all-local
    117 	$(MKINSTALLDIRS) $(DESTDIR)$(libdir)
    118 ifneq ($(ENABLE_STATIC),)
    119 	$(INSTALL-L) $(TARGET) $(DESTDIR)$(libdir)
    120 endif
    121 ifneq ($(ENABLE_SHARED),)
    122 	$(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(libdir)
    123 ifneq ($(FINAL_SO_TARGET),$(SO_TARGET))
    124 	cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(SO_TARGET))
    125 ifneq ($(FINAL_SO_TARGET),$(MIDDLE_SO_TARGET))
    126 	cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(MIDDLE_SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(MIDDLE_SO_TARGET))
    127 endif
    128 endif
    129 ifneq ($(IMPORT_LIB_EXT),)
    130 	$(INSTALL-L) $(FINAL_IMPORT_LIB) $(DESTDIR)$(libdir)
    131 ifneq ($(IMPORT_LIB),$(FINAL_IMPORT_LIB))
    132 	cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(IMPORT_LIB)) && ln -s $(notdir $(FINAL_IMPORT_LIB)) $(notdir $(IMPORT_LIB))
    133 endif
    134 ifneq ($(MIDDLE_IMPORT_LIB),$(FINAL_IMPORT_LIB))
    135 	cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(MIDDLE_IMPORT_LIB)) && ln -s $(notdir $(FINAL_IMPORT_LIB)) $(notdir $(MIDDLE_IMPORT_LIB))
    136 endif
    137 endif
    138 endif
    139 
    140 install-headers:
    141 	$(MKINSTALLDIRS) $(DESTDIR)$(includedir)/unicode
    142 	@for file in $(HEADERS); do \
    143 	 echo "$(INSTALL_DATA) $$file $(DESTDIR)$(includedir)/unicode"; \
    144 	 $(INSTALL_DATA) $$file $(DESTDIR)$(includedir)/unicode || exit; \
    145 	done
    146 
    147 dist-local:
    148 
    149 clean-local:
    150 	test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES)
    151 	$(RMV) $(OBJECTS) $(STATIC_OBJECTS) $(ALL_TARGETS) $(SO_VERSION_DATA)
    152 
    153 distclean-local: clean-local
    154 	$(RMV) Makefile
    155 
    156 check-local:
    157 
    158 Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
    159 	cd $(top_builddir) \
    160 	 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
    161 
    162 ifneq ($(ENABLE_STATIC),)
    163 $(TARGET): $(STATIC_OBJECTS)
    164 	$(AR) $(ARFLAGS) $(AR_OUTOPT)$@ $^
    165 	$(RANLIB) $@
    166 endif
    167 
    168 ifneq ($(ENABLE_SHARED),)
    169 $(SHARED_OBJECT): $(OBJECTS) $(SO_VERSION_DATA)
    170 	$(SHLIB.cc) $(LD_SONAME) $(OUTOPT)$@ $^ $(LIBS)
    171 
    172 ifeq ($(OS390BATCH),1)
    173 $(BATCH_TARGET):$(OBJECTS)
    174 	$(SHLIB.cc) $(LD_SONAME) $(OUTOPT)$@ $^ $(BATCH_LIBS)
    175 endif   # OS390BATCH
    176 endif   # ENABLE_SHARED
    177 
    178 ifeq (,$(MAKECMDGOALS))
    179 -include $(DEPS)
    180 else
    181 ifneq ($(patsubst %clean,,$(MAKECMDGOALS)),)
    182 -include $(DEPS)
    183 endif
    184 endif
    185 
    186