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