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