]> git.saurik.com Git - apple/icu.git/blame - icuSources/common/Makefile.in
ICU-3.13.tar.gz
[apple/icu.git] / icuSources / common / Makefile.in
CommitLineData
b75a7d8f
A
1#******************************************************************************
2#
3# Copyright (C) 1999-2003, International Business Machines
4# Corporation and others. All Rights Reserved.
5#
6#******************************************************************************
7## Makefile.in for ICU - icu.so
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
22## Extra files to remove for 'make clean'
23CLEANFILES = *~ $(DEPS)
24
25## Target information
26
27TARGET_STUBNAME=uc
28
29ifneq ($(ENABLE_STATIC),)
30TARGET = $(LIBICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX).a
31endif
32
33ifneq ($(ENABLE_SHARED),)
34SO_TARGET = $(LIBICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX).$(SO)
35ALL_SO_TARGETS = $(SO_TARGET) $(MIDDLE_SO_TARGET) $(FINAL_SO_TARGET)
36
37ifeq ($(OS390BATCH),1)
38BATCH_TARGET = $(BATCH_COMMON_TARGET)
39BATCH_LIBS = $(BATCH_LIBICUDT) -lm
40endif # OS390BATCH
41
42endif # ENABLE_SHARED
43
44ALL_TARGETS = $(TARGET) $(ALL_SO_TARGETS) $(BATCH_TARGET)
45
46DYNAMICCPPFLAGS = $(SHAREDLIBCPPFLAGS)
47DYNAMICCFLAGS = $(SHAREDLIBCFLAGS)
48DYNAMICCXXFLAGS = $(SHAREDLIBCXXFLAGS)
49
50CPPFLAGS += -I. -I$(srcdir) $(LIBCPPFLAGS)
51DEFS += -DU_COMMON_IMPLEMENTATION
52
53# $(LIBICUDT) is either stub data or the real DLL common data.
54LIBS = $(LIBICUDT) $(DEFAULT_LIBS)
55
56OBJECTS = putil.o uobject.o locmap.o mutex.o umutex.o \
57udata.o ucmndata.o udatamem.o umapfile.o filestrm.o \
58uresbund.o uresdata.o resbund.o cwchar.o uloc.o locid.o uhash.o uhash_us.o \
59ucnv.o ucnv_bld.o ucnv_cb.o ucnv_cnv.o ucnv_err.o ucnv_io.o ucnvlat1.o \
60ucnv_u7.o ucnv_u8.o ucnv_u16.o ucnv_u32.o \
61ucnvmbcs.o ucnv2022.o ucnvhz.o ucnv_lmb.o ucnvscsu.o \
62ucnvbocu.o ucnvisci.o \
63unistr.o utf_impl.o ustring.o ustrcase.o cstring.o ustrfmt.o ustrtrns.o \
64normlzr.o unorm.o unorm_it.o chariter.o schriter.o uchriter.o uiter.o \
65uchar.o uprops.o propname.o ubidi.o ubidiwrt.o ubidiln.o ushape.o unames.o \
66ucln_cmn.o uscript.o usc_impl.o umemstrm.o ucmp8.o uvector.o uvectr32.o digitlst.o \
67brkiter.o brkdict.o ubrk.o dbbi.o dbbi_tbl.o \
68rbbi.o rbbidata.o rbbinode.o rbbirb.o rbbiscan.o rbbisetb.o rbbistbl.o rbbitblb.o \
69utrie.o uset.o cmemory.o caniter.o \
70unifilt.o unifunct.o uniset.o usetiter.o util.o uenum.o \
71icuserv.o iculserv.o icunotif.o ustrenum.o \
72uidna.o strprep.o nameprep.o punycode.o ucat.o
73
74STATIC_OBJECTS = $(OBJECTS:.o=.$(STATIC_O))
75
76DEPS = $(OBJECTS:.o=.d)
77
78## Header files to install
79HEADERS = unicode/*.h $(srcdir)/unicode/*.h
80
81## List of phony targets
82.PHONY : all all-local install install-local clean clean-local \
83distclean distclean-local install-library install-headers dist \
84dist-local check check-local
85
86## Clear suffix list
87.SUFFIXES :
88
89## List of standard targets
90all: all-local
91install: install-local
92clean: clean-local
93distclean : distclean-local
94dist: dist-local
95check: all check-local
96
97-include Makefile.local
98
99all-local: $(ALL_TARGETS) unicode/platform.h
100
101install-local: install-headers install-library
102
103install-library: all-local
104 $(MKINSTALLDIRS) $(DESTDIR)$(libdir)
105ifneq ($(ENABLE_STATIC),)
106 $(INSTALL-L) $(TARGET) $(DESTDIR)$(libdir)/$(TARGET)
107endif
108ifneq ($(ENABLE_SHARED),)
109 $(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(libdir)/$(FINAL_SO_TARGET)
110ifneq ($(FINAL_SO_TARGET),$(SO_TARGET))
111 cd $(DESTDIR)$(libdir) && $(RM) $(SO_TARGET) && ln -s $(FINAL_SO_TARGET) $(SO_TARGET)
112ifneq ($(FINAL_SO_TARGET),$(MIDDLE_SO_TARGET))
113 cd $(DESTDIR)$(libdir) && $(RM) $(MIDDLE_SO_TARGET) && ln -s $(FINAL_SO_TARGET) $(MIDDLE_SO_TARGET)
114endif
115endif
116endif
117ifneq ($(IMPORT_LIB_EXT),)
118 $(INSTALL-L) $(FINAL_IMPORT_LIB) $(DESTDIR)$(libdir)/$(FINAL_IMPORT_LIB)
119 cd $(DESTDIR)$(libdir) && $(RM) $(IMPORT_LIB) && ln -s $(FINAL_IMPORT_LIB) $(IMPORT_LIB)
120ifneq ($(MIDDLE_IMPORT_LIB),$(FINAL_IMPORT_LIB))
121 cd $(DESTDIR)$(libdir) && $(RM) $(MIDDLE_IMPORT_LIB) && ln -s $(FINAL_IMPORT_LIB) $(MIDDLE_IMPORT_LIB)
122endif
123endif
124
125install-headers:
126 $(MKINSTALLDIRS) $(DESTDIR)$(includedir)/unicode
127 @for file in $(HEADERS); do \
128 echo "$(INSTALL_DATA) $$file $(DESTDIR)$(includedir)/unicode"; \
129 $(INSTALL_DATA) $$file $(DESTDIR)$(includedir)/unicode || exit; \
130 done
131
132dist-local:
133
134clean-local:
135 test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES)
136 $(RMV) $(OBJECTS) $(STATIC_OBJECTS) $(ALL_TARGETS)
137
138distclean-local: clean-local
139 $(RMV) Makefile icucfg.h unicode/platform.h
140
141check-local:
142
143Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
144 cd $(top_builddir) \
145 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
146
147unicode/platform.h: $(srcdir)/unicode/platform.h.in $(top_builddir)/config.status
148 cd $(top_builddir) \
149 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
150
151ifneq ($(ENABLE_STATIC),)
152$(TARGET): $(TARGET)($(STATIC_OBJECTS))
153 $(RANLIB) $@
154endif
155
156ifneq ($(ENABLE_SHARED),)
157$(FINAL_SO_TARGET): $(OBJECTS)
158 $(SHLIB.cc) $(LD_SONAME) $(OUTOPT)$@ $^ $(LIBS)
159
160ifeq ($(OS390BATCH),1)
161$(BATCH_TARGET): $(OBJECTS)
162 $(SHLIB.cc) $(LD_SONAME) $(OUTOPT)$@ $^ $(BATCH_LIBS)
163endif # OS390BATCH
164
165endif # ENABLE_SHARED
166
167ifeq (,$(MAKECMDGOALS))
168-include $(DEPS)
169else
170ifneq ($(patsubst %clean,,$(MAKECMDGOALS)),)
171-include $(DEPS)
172endif
173endif
174