]> git.saurik.com Git - apple/icu.git/blame - icuSources/common/Makefile.in
ICU-461.12.tar.gz
[apple/icu.git] / icuSources / common / Makefile.in
CommitLineData
b75a7d8f
A
1#******************************************************************************
2#
729e4ab9 3# Copyright (C) 1999-2010, 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)
b75a7d8f 59
73c04bcf 60ifneq ($(top_builddir),$(top_srcdir))
729e4ab9 61CPPFLAGS += -I- -I$(top_builddir)/common
73c04bcf 62endif
729e4ab9
A
63CPPFLAGS += -I$(srcdir) -I$(top_srcdir)/i18n $(LIBCPPFLAGS) $(CPPFLAGSICUUC)
64# we want DEFS here, because we want icucfg.h
65DEFS += -DU_COMMON_IMPLEMENTATION @DEFS@
73c04bcf 66LDFLAGS += $(LDFLAGSICUUC)
b75a7d8f 67
729e4ab9
A
68# for plugin configuration
69CPPFLAGS += "-DDEFAULT_ICU_PLUGINS=\"$(libdir)/icu\" "
70
71# for icu data location
72ifeq ($(PKGDATA_MODE),common)
73CPPFLAGS += "-DU_ICU_DATA_DEFAULT_DIR=\"$(ICUDATA_DIR)\""
74endif
75
b75a7d8f
A
76# $(LIBICUDT) is either stub data or the real DLL common data.
77LIBS = $(LIBICUDT) $(DEFAULT_LIBS)
78
729e4ab9
A
79OBJECTS = errorcode.o putil.o umath.o utypes.o uinvchar.o umutex.o ucln_cmn.o \
80uinit.o uobject.o cmemory.o charstr.o \
73c04bcf 81udata.o ucmndata.o udatamem.o umapfile.o udataswp.o ucol_swp.o utrace.o \
729e4ab9 82uhash.o uhash_us.o uenum.o ustrenum.o uvector.o ustack.o uvectr32.o uvectr64.o \
73c04bcf 83ucnv.o ucnv_bld.o ucnv_cnv.o ucnv_io.o ucnv_cb.o ucnv_err.o ucnvlat1.o \
374ca955 84ucnv_u7.o ucnv_u8.o ucnv_u16.o ucnv_u32.o ucnvscsu.o ucnvbocu.o \
73c04bcf
A
85ucnv_ext.o ucnvmbcs.o ucnv2022.o ucnvhz.o ucnv_lmb.o ucnvisci.o ucnvdisp.o ucnv_set.o \
86uresbund.o ures_cnv.o uresdata.o resbund.o resbund_cnv.o \
729e4ab9
A
87ucat.o locmap.o uloc.o locid.o locutil.o locavailable.o locdispnames.o loclikely.o locresdata.o \
88bytestream.o stringpiece.o \
73c04bcf
A
89ustr_cnv.o unistr_cnv.o unistr.o unistr_case.o unistr_props.o \
90utf_impl.o ustring.o ustrcase.o ucasemap.o cstring.o ustrfmt.o ustrtrns.o ustr_wcs.o utext.o \
729e4ab9
A
91normalizer2impl.o normalizer2.o filterednormalizer2.o normlzr.o unorm.o unormcmp.o unorm_it.o \
92chariter.o schriter.o uchriter.o uiter.o \
73c04bcf
A
93uchar.o uprops.o ucase.o propname.o ubidi_props.o ubidi.o ubidiwrt.o ubidiln.o ushape.o \
94uscript.o usc_impl.o unames.o \
729e4ab9 95utrie.o utrie2.o utrie2_builder.o bmpset.o unisetspan.o uset_props.o uniset_props.o uset.o uniset.o usetiter.o ruleiter.o caniter.o unifilt.o unifunct.o \
73c04bcf 96uarrsort.o brkiter.o ubrk.o brkeng.o dictbe.o triedict.o \
b75a7d8f 97rbbi.o rbbidata.o rbbinode.o rbbirb.o rbbiscan.o rbbisetb.o rbbistbl.o rbbitblb.o \
73c04bcf 98serv.o servnotf.o servls.o servlk.o servlkf.o servrbf.o servslkf.o \
729e4ab9
A
99uidna.o usprep.o uts46.o punycode.o \
100util.o util_props.o parsepos.o locbased.o cwchar.o wintz.o mutex.o dtintrv.o ucnvsel.o propsvec.o \
101ulist.o uloc_tag.o icudataver.o icuplug.o
73c04bcf
A
102
103## Header files to install
104HEADERS = $(srcdir)/unicode/*.h unicode/*.h
b75a7d8f
A
105
106STATIC_OBJECTS = $(OBJECTS:.o=.$(STATIC_O))
107
108DEPS = $(OBJECTS:.o=.d)
109
73c04bcf
A
110-include Makefile.local
111
112-include $(SVC_HOOK_INC)
113
b75a7d8f
A
114
115## List of phony targets
116.PHONY : all all-local install install-local clean clean-local \
117distclean distclean-local install-library install-headers dist \
118dist-local check check-local
119
120## Clear suffix list
121.SUFFIXES :
122
123## List of standard targets
124all: all-local
125install: install-local
126clean: clean-local
127distclean : distclean-local
128dist: dist-local
129check: all check-local
130
b75a7d8f
A
131all-local: $(ALL_TARGETS) unicode/platform.h
132
133install-local: install-headers install-library
134
135install-library: all-local
136 $(MKINSTALLDIRS) $(DESTDIR)$(libdir)
137ifneq ($(ENABLE_STATIC),)
374ca955 138 $(INSTALL-L) $(TARGET) $(DESTDIR)$(libdir)
b75a7d8f
A
139endif
140ifneq ($(ENABLE_SHARED),)
374ca955 141 $(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(libdir)
b75a7d8f 142ifneq ($(FINAL_SO_TARGET),$(SO_TARGET))
374ca955 143 cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(SO_TARGET))
b75a7d8f 144ifneq ($(FINAL_SO_TARGET),$(MIDDLE_SO_TARGET))
374ca955 145 cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(MIDDLE_SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(MIDDLE_SO_TARGET))
b75a7d8f
A
146endif
147endif
b75a7d8f 148ifneq ($(IMPORT_LIB_EXT),)
374ca955
A
149 $(INSTALL-L) $(FINAL_IMPORT_LIB) $(DESTDIR)$(libdir)
150ifneq ($(IMPORT_LIB),$(FINAL_IMPORT_LIB))
151 cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(IMPORT_LIB)) && ln -s $(notdir $(FINAL_IMPORT_LIB)) $(notdir $(IMPORT_LIB))
152endif
b75a7d8f 153ifneq ($(MIDDLE_IMPORT_LIB),$(FINAL_IMPORT_LIB))
374ca955 154 cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(MIDDLE_IMPORT_LIB)) && ln -s $(notdir $(FINAL_IMPORT_LIB)) $(notdir $(MIDDLE_IMPORT_LIB))
b75a7d8f
A
155endif
156endif
46f4442e 157endif
b75a7d8f 158
73c04bcf
A
159$(SVC_HOOK_INC):
160 @echo generating $@
161 @-test -f $(top_srcdir)/common/$(LOCALSVC_CPP) && ( echo "have $(LOCALSVC_CPP) - U_LOCAL_SERVICE_HOOK=1" ; \
162 echo 'CPPFLAGS +=-DU_LOCAL_SERVICE_HOOK=1' > $@ ; \
163 echo 'OBJECTS += $(LOCALSVC_CPP:%.cpp=%.o)' >> $@ \
164 ) ; true
165 @echo "# Autogenerated by Makefile" >> $@
166
b75a7d8f
A
167install-headers:
168 $(MKINSTALLDIRS) $(DESTDIR)$(includedir)/unicode
169 @for file in $(HEADERS); do \
170 echo "$(INSTALL_DATA) $$file $(DESTDIR)$(includedir)/unicode"; \
171 $(INSTALL_DATA) $$file $(DESTDIR)$(includedir)/unicode || exit; \
172 done
173
174dist-local:
175
176clean-local:
177 test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES)
374ca955 178 $(RMV) $(OBJECTS) $(STATIC_OBJECTS) $(ALL_TARGETS) $(SO_VERSION_DATA)
b75a7d8f
A
179
180distclean-local: clean-local
73c04bcf 181 $(RMV) Makefile icucfg.h unicode/platform.h $(SVC_HOOK_INC)
b75a7d8f
A
182
183check-local:
184
73c04bcf 185Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(SVC_HOOK_INC)
b75a7d8f
A
186 cd $(top_builddir) \
187 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
188
189unicode/platform.h: $(srcdir)/unicode/platform.h.in $(top_builddir)/config.status
190 cd $(top_builddir) \
191 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
192
193ifneq ($(ENABLE_STATIC),)
46f4442e
A
194$(TARGET): $(STATIC_OBJECTS)
195 $(AR) $(ARFLAGS) $(AR_OUTOPT)$@ $^
b75a7d8f
A
196 $(RANLIB) $@
197endif
198
199ifneq ($(ENABLE_SHARED),)
73c04bcf 200$(SHARED_OBJECT): $(OBJECTS) $(SO_VERSION_DATA)
b75a7d8f
A
201 $(SHLIB.cc) $(LD_SONAME) $(OUTOPT)$@ $^ $(LIBS)
202
203ifeq ($(OS390BATCH),1)
73c04bcf 204$(BATCH_TARGET):$(OBJECTS)
b75a7d8f
A
205 $(SHLIB.cc) $(LD_SONAME) $(OUTOPT)$@ $^ $(BATCH_LIBS)
206endif # OS390BATCH
b75a7d8f
A
207endif # ENABLE_SHARED
208
209ifeq (,$(MAKECMDGOALS))
210-include $(DEPS)
211else
212ifneq ($(patsubst %clean,,$(MAKECMDGOALS)),)
213-include $(DEPS)
214endif
215endif
216