]> git.saurik.com Git - apple/icu.git/blob - icuSources/common/Makefile.in
ICU-491.11.1.tar.gz
[apple/icu.git] / icuSources / common / Makefile.in
1 #******************************************************************************
2 #
3 # Copyright (C) 1999-2011, International Business Machines
4 # Corporation and others. All Rights Reserved.
5 #
6 #******************************************************************************
7 ## Makefile.in for ICU - icuuc.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 = common
21
22 # for service hook
23 LOCALSVC_CPP=localsvc.cpp
24 SVC_HOOK_INC=$(top_builddir)/common/svchook.mk
25
26 ## Extra files to remove for 'make clean'
27 CLEANFILES = *~ $(DEPS) $(IMPORT_LIB) $(MIDDLE_IMPORT_LIB) $(FINAL_IMPORT_LIB) $(SVC_HOOK_INC)
28
29 ## Target information
30
31 TARGET_STUBNAME=$(COMMON_STUBNAME)
32
33 ifneq ($(ENABLE_STATIC),)
34 TARGET = $(LIBDIR)/$(LIBSICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX).$(A)
35 endif
36
37 ifneq ($(ENABLE_SHARED),)
38 SO_TARGET = $(LIBDIR)/$(LIBICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX).$(SO)
39 ALL_SO_TARGETS = $(SO_TARGET) $(MIDDLE_SO_TARGET) $(FINAL_SO_TARGET) $(SHARED_OBJECT)
40
41 ifeq ($(ENABLE_SO_VERSION_DATA),1)
42 SO_VERSION_DATA = common.res
43 endif
44
45 ifeq ($(OS390BATCH),1)
46 BATCH_TARGET = $(BATCH_COMMON_TARGET)
47 BATCH_LIBS = $(BATCH_LIBICUDT) -lm
48 endif # OS390BATCH
49
50 endif # ENABLE_SHARED
51
52 ALL_TARGETS = $(TARGET) $(ALL_SO_TARGETS) $(BATCH_TARGET)
53
54 DYNAMICCPPFLAGS = $(SHAREDLIBCPPFLAGS)
55 DYNAMICCFLAGS = $(SHAREDLIBCFLAGS)
56 DYNAMICCXXFLAGS = $(SHAREDLIBCXXFLAGS)
57 CFLAGS += $(LIBCFLAGS)
58 CXXFLAGS += $(LIBCXXFLAGS)
59
60 CPPFLAGS += -I$(srcdir) $(LIBCPPFLAGS) $(CPPFLAGSICUUC)
61 # we want DEFS here
62 DEFS += -DU_COMMON_IMPLEMENTATION
63 LDFLAGS += $(LDFLAGSICUUC)
64
65 # for plugin configuration
66 CPPFLAGS += "-DDEFAULT_ICU_PLUGINS=\"$(libdir)/icu\" "
67
68 # for icu data location
69 ifeq ($(PKGDATA_MODE),common)
70 CPPFLAGS += "-DU_ICU_DATA_DEFAULT_DIR=\"$(ICUDATA_DIR)\""
71 endif
72
73 # $(LIBICUDT) is either stub data or the real DLL common data.
74 LIBS = $(LIBICUDT) $(DEFAULT_LIBS)
75
76 OBJECTS = errorcode.o putil.o umath.o utypes.o uinvchar.o umutex.o ucln_cmn.o \
77 uinit.o uobject.o cmemory.o charstr.o \
78 udata.o ucmndata.o udatamem.o umapfile.o udataswp.o ucol_swp.o utrace.o \
79 uhash.o uhash_us.o uenum.o ustrenum.o uvector.o ustack.o uvectr32.o uvectr64.o \
80 ucnv.o ucnv_bld.o ucnv_cnv.o ucnv_io.o ucnv_cb.o ucnv_err.o ucnvlat1.o \
81 ucnv_u7.o ucnv_u8.o ucnv_u16.o ucnv_u32.o ucnvscsu.o ucnvbocu.o \
82 ucnv_ext.o ucnvmbcs.o ucnv2022.o ucnvhz.o ucnv_lmb.o ucnvisci.o ucnvdisp.o ucnv_set.o ucnv_ct.o \
83 uresbund.o ures_cnv.o uresdata.o resbund.o resbund_cnv.o \
84 messagepattern.o ucat.o locmap.o uloc.o locid.o locutil.o locavailable.o locdispnames.o loclikely.o locresdata.o \
85 bytestream.o stringpiece.o \
86 stringtriebuilder.o bytestriebuilder.o \
87 bytestrie.o bytestrieiterator.o \
88 ucharstrie.o ucharstriebuilder.o ucharstrieiterator.o \
89 appendable.o ustr_cnv.o unistr_cnv.o unistr.o unistr_case.o unistr_props.o \
90 utf_impl.o ustring.o ustrcase.o ucasemap.o ucasemap_titlecase_brkiter.o cstring.o ustrfmt.o ustrtrns.o ustr_wcs.o utext.o \
91 unistr_case_locale.o ustrcase_locale.o unistr_titlecase_brkiter.o ustr_titlecase_brkiter.o \
92 normalizer2impl.o normalizer2.o filterednormalizer2.o normlzr.o unorm.o unormcmp.o unorm_it.o \
93 chariter.o schriter.o uchriter.o uiter.o \
94 patternprops.o uchar.o uprops.o ucase.o propname.o ubidi_props.o ubidi.o ubidiwrt.o ubidiln.o ushape.o \
95 uscript.o usc_impl.o unames.o \
96 utrie.o utrie2.o utrie2_builder.o bmpset.o unisetspan.o uset_props.o uniset_props.o uniset_closure.o uset.o uniset.o usetiter.o ruleiter.o caniter.o unifilt.o unifunct.o \
97 uarrsort.o brkiter.o ubrk.o brkeng.o dictbe.o triedict.o \
98 rbbi.o rbbidata.o rbbinode.o rbbirb.o rbbiscan.o rbbisetb.o rbbistbl.o rbbitblb.o \
99 serv.o servnotf.o servls.o servlk.o servlkf.o servrbf.o servslkf.o \
100 uidna.o usprep.o uts46.o punycode.o \
101 util.o util_props.o parsepos.o locbased.o cwchar.o wintz.o mutex.o dtintrv.o ucnvsel.o propsvec.o \
102 ulist.o uloc_tag.o icudataver.o icuplug.o
103
104 ## Header files to install
105 HEADERS = $(srcdir)/unicode/*.h
106
107 STATIC_OBJECTS = $(OBJECTS:.o=.$(STATIC_O))
108
109 DEPS = $(OBJECTS:.o=.d)
110
111 -include Makefile.local
112
113 -include $(SVC_HOOK_INC)
114
115
116 ## List of phony targets
117 .PHONY : all all-local install install-local clean clean-local \
118 distclean distclean-local install-library install-headers dist \
119 dist-local check check-local check-exhaustive
120
121 ## Clear suffix list
122 .SUFFIXES :
123
124 ## List of standard targets
125 all: all-local
126 install: install-local
127 clean: clean-local
128 distclean : distclean-local
129 dist: dist-local
130 check: all check-local
131
132 check-exhaustive: check
133
134 all-local: $(ALL_TARGETS)
135
136 install-local: install-headers install-library
137
138 install-library: all-local
139 $(MKINSTALLDIRS) $(DESTDIR)$(libdir)
140 ifneq ($(ENABLE_STATIC),)
141 $(INSTALL-L) $(TARGET) $(DESTDIR)$(libdir)
142 endif
143 ifneq ($(ENABLE_SHARED),)
144 $(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(libdir)
145 ifneq ($(FINAL_SO_TARGET),$(SO_TARGET))
146 cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(SO_TARGET))
147 ifneq ($(FINAL_SO_TARGET),$(MIDDLE_SO_TARGET))
148 cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(MIDDLE_SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(MIDDLE_SO_TARGET))
149 endif
150 endif
151 ifneq ($(IMPORT_LIB_EXT),)
152 $(INSTALL-L) $(FINAL_IMPORT_LIB) $(DESTDIR)$(libdir)
153 ifneq ($(IMPORT_LIB),$(FINAL_IMPORT_LIB))
154 cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(IMPORT_LIB)) && ln -s $(notdir $(FINAL_IMPORT_LIB)) $(notdir $(IMPORT_LIB))
155 endif
156 ifneq ($(MIDDLE_IMPORT_LIB),$(FINAL_IMPORT_LIB))
157 cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(MIDDLE_IMPORT_LIB)) && ln -s $(notdir $(FINAL_IMPORT_LIB)) $(notdir $(MIDDLE_IMPORT_LIB))
158 endif
159 endif
160 endif
161
162 $(SVC_HOOK_INC):
163 @echo generating $@
164 @-test -f $(top_srcdir)/common/$(LOCALSVC_CPP) && ( echo "have $(LOCALSVC_CPP) - U_LOCAL_SERVICE_HOOK=1" ; \
165 echo 'CPPFLAGS +=-DU_LOCAL_SERVICE_HOOK=1' > $@ ; \
166 echo 'OBJECTS += $(LOCALSVC_CPP:%.cpp=%.o)' >> $@ \
167 ) ; true
168 @echo "# Autogenerated by Makefile" >> $@
169
170 install-headers:
171 $(MKINSTALLDIRS) $(DESTDIR)$(includedir)/unicode
172 @for file in $(HEADERS); do \
173 echo "$(INSTALL_DATA) $$file $(DESTDIR)$(includedir)/unicode"; \
174 $(INSTALL_DATA) $$file $(DESTDIR)$(includedir)/unicode || exit; \
175 done
176
177 dist-local:
178
179 clean-local:
180 test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES)
181 $(RMV) $(OBJECTS) $(STATIC_OBJECTS) $(ALL_TARGETS) $(SO_VERSION_DATA)
182
183 distclean-local: clean-local
184 $(RMV) Makefile icucfg.h $(SVC_HOOK_INC)
185
186 check-local:
187
188 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(SVC_HOOK_INC)
189 cd $(top_builddir) \
190 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
191
192 ifneq ($(ENABLE_STATIC),)
193 $(TARGET): $(STATIC_OBJECTS)
194 $(AR) $(ARFLAGS) $(AR_OUTOPT)$@ $^
195 $(RANLIB) $@
196 endif
197
198 ifneq ($(ENABLE_SHARED),)
199 $(SHARED_OBJECT): $(OBJECTS) $(SO_VERSION_DATA)
200 $(SHLIB.cc) $(LD_SONAME) $(OUTOPT)$@ $^ $(LIBS)
201 ifeq ($(ENABLE_RPATH),YES)
202 ifneq ($(wildcard $(libdir)/$(MIDDLE_SO_TARGET)),)
203 $(warning RPATH warning: --enable-rpath means test programs may use existing $(libdir)/$(MIDDLE_SO_TARGET))
204 endif
205 endif
206
207 ifeq ($(OS390BATCH),1)
208 $(BATCH_TARGET):$(OBJECTS)
209 $(SHLIB.cc) $(LD_SONAME) $(OUTOPT)$@ $^ $(BATCH_LIBS)
210 endif # OS390BATCH
211 endif # ENABLE_SHARED
212
213 ifeq (,$(MAKECMDGOALS))
214 -include $(DEPS)
215 else
216 ifneq ($(patsubst %clean,,$(MAKECMDGOALS)),)
217 -include $(DEPS)
218 endif
219 endif
220