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