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