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