]>
Commit | Line | Data |
---|---|---|
b75a7d8f A |
1 | #****************************************************************************** |
2 | # | |
4388f060 | 3 | # Copyright (C) 1999-2011, International Business Machines |
b75a7d8f A |
4 | # Corporation and others. All Rights Reserved. |
5 | # | |
6 | #****************************************************************************** | |
73c04bcf | 7 | ## Makefile.in for ICU - icuio.so |
b75a7d8f A |
8 | ## Stephen F. Booth |
9 | ||
10 | ## Source directory information | |
11 | srcdir = @srcdir@ | |
12 | top_srcdir = @top_srcdir@ | |
13 | ||
374ca955 | 14 | top_builddir = .. |
b75a7d8f A |
15 | |
16 | ## All the flags and other definitions are included here. | |
17 | include $(top_builddir)/icudefs.mk | |
18 | ||
19 | ## Build directory information | |
374ca955 | 20 | subdir = io |
b75a7d8f A |
21 | |
22 | ## Extra files to remove for 'make clean' | |
374ca955 | 23 | CLEANFILES = *~ $(DEPS) $(IMPORT_LIB) $(MIDDLE_IMPORT_LIB) $(FINAL_IMPORT_LIB) |
b75a7d8f A |
24 | |
25 | ## Target information | |
26 | ||
374ca955 | 27 | TARGET_STUBNAME=$(IO_STUBNAME) |
b75a7d8f A |
28 | |
29 | ifneq ($(ENABLE_STATIC),) | |
374ca955 | 30 | TARGET = $(LIBDIR)/$(LIBSICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX).$(A) |
b75a7d8f A |
31 | endif |
32 | ||
33 | ifneq ($(ENABLE_SHARED),) | |
374ca955 | 34 | SO_TARGET = $(LIBDIR)/$(LIBICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX).$(SO) |
73c04bcf | 35 | ALL_SO_TARGETS = $(SO_TARGET) $(MIDDLE_SO_TARGET) $(FINAL_SO_TARGET) $(SHARED_OBJECT) |
b75a7d8f | 36 | |
374ca955 A |
37 | ifeq ($(ENABLE_SO_VERSION_DATA),1) |
38 | SO_VERSION_DATA = io.res | |
39 | endif | |
40 | ||
b75a7d8f | 41 | ifeq ($(OS390BATCH),1) |
73c04bcf | 42 | BATCH_TARGET = $(BATCH_IO_TARGET) |
b75a7d8f A |
43 | BATCH_LIBS = $(BATCH_LIBICUUC) $(BATCH_LIBICUI18N) -lm |
44 | endif # OS390BATCH | |
45 | ||
73c04bcf | 46 | endif # ENABLE_SHARED |
b75a7d8f A |
47 | |
48 | ALL_TARGETS = $(TARGET) $(ALL_SO_TARGETS) $(BATCH_TARGET) | |
49 | ||
50 | DYNAMICCPPFLAGS = $(SHAREDLIBCPPFLAGS) | |
51 | DYNAMICCFLAGS = $(SHAREDLIBCFLAGS) | |
52 | DYNAMICCXXFLAGS = $(SHAREDLIBCXXFLAGS) | |
46f4442e A |
53 | CFLAGS += $(LIBCFLAGS) |
54 | CXXFLAGS += $(LIBCXXFLAGS) | |
b75a7d8f | 55 | |
729e4ab9 | 56 | CPPFLAGS += -I$(top_srcdir)/common -I$(top_srcdir)/i18n $(LIBCPPFLAGS) $(CPPFLAGSICUIO) |
374ca955 | 57 | DEFS += -DU_IO_IMPLEMENTATION |
73c04bcf | 58 | LDFLAGS += $(LDFLAGSICUIO) |
b75a7d8f A |
59 | LIBS = $(LIBICUUC) $(LIBICUI18N) $(DEFAULT_LIBS) |
60 | ||
374ca955 A |
61 | OBJECTS = locbund.o ufile.o ufmt_cmn.o uprintf.o uprntf_p.o \ |
62 | uscanf.o uscanf_p.o ustdio.o sprintf.o sscanf.o \ | |
73c04bcf | 63 | ustream.o ucln_io.o |
b75a7d8f | 64 | |
73c04bcf | 65 | ## Header files to install |
b75a7d8f A |
66 | HEADERS = $(srcdir)/unicode/*.h |
67 | ||
73c04bcf A |
68 | STATIC_OBJECTS = $(OBJECTS:.o=.$(STATIC_O)) |
69 | ||
b75a7d8f A |
70 | DEPS = $(OBJECTS:.o=.d) |
71 | ||
73c04bcf A |
72 | -include Makefile.local |
73 | ||
b75a7d8f | 74 | ## List of phony targets |
73c04bcf A |
75 | .PHONY : all all-local install install-local clean clean-local \ |
76 | distclean distclean-local install-library install-headers dist \ | |
4388f060 | 77 | dist-local check check-local check-exhaustive |
b75a7d8f A |
78 | |
79 | ## Clear suffix list | |
80 | .SUFFIXES : | |
81 | ||
82 | ## List of standard targets | |
83 | all: all-local | |
84 | install: install-local | |
85 | clean: clean-local | |
86 | distclean : distclean-local | |
87 | dist: dist-local | |
88 | check: all check-local | |
89 | ||
4388f060 A |
90 | check-exhaustive: check |
91 | ||
b75a7d8f A |
92 | all-local: $(ALL_TARGETS) |
93 | ||
73c04bcf | 94 | install-local: install-headers install-library |
b75a7d8f A |
95 | |
96 | install-library: all-local | |
97 | $(MKINSTALLDIRS) $(DESTDIR)$(libdir) | |
98 | ifneq ($(ENABLE_STATIC),) | |
374ca955 | 99 | $(INSTALL-L) $(TARGET) $(DESTDIR)$(libdir) |
b75a7d8f A |
100 | endif |
101 | ifneq ($(ENABLE_SHARED),) | |
374ca955 | 102 | $(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(libdir) |
b75a7d8f | 103 | ifneq ($(FINAL_SO_TARGET),$(SO_TARGET)) |
374ca955 | 104 | cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(SO_TARGET)) |
b75a7d8f | 105 | ifneq ($(FINAL_SO_TARGET),$(MIDDLE_SO_TARGET)) |
374ca955 | 106 | cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(MIDDLE_SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(MIDDLE_SO_TARGET)) |
b75a7d8f A |
107 | endif |
108 | endif | |
b75a7d8f | 109 | ifneq ($(IMPORT_LIB_EXT),) |
374ca955 A |
110 | $(INSTALL-L) $(FINAL_IMPORT_LIB) $(DESTDIR)$(libdir) |
111 | ifneq ($(IMPORT_LIB),$(FINAL_IMPORT_LIB)) | |
112 | cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(IMPORT_LIB)) && ln -s $(notdir $(FINAL_IMPORT_LIB)) $(notdir $(IMPORT_LIB)) | |
113 | endif | |
b75a7d8f | 114 | ifneq ($(MIDDLE_IMPORT_LIB),$(FINAL_IMPORT_LIB)) |
374ca955 | 115 | cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(MIDDLE_IMPORT_LIB)) && ln -s $(notdir $(FINAL_IMPORT_LIB)) $(notdir $(MIDDLE_IMPORT_LIB)) |
b75a7d8f A |
116 | endif |
117 | endif | |
46f4442e | 118 | endif |
b75a7d8f A |
119 | |
120 | install-headers: | |
121 | $(MKINSTALLDIRS) $(DESTDIR)$(includedir)/unicode | |
122 | @for file in $(HEADERS); do \ | |
123 | echo "$(INSTALL_DATA) $$file $(DESTDIR)$(includedir)/unicode"; \ | |
124 | $(INSTALL_DATA) $$file $(DESTDIR)$(includedir)/unicode || exit; \ | |
125 | done | |
126 | ||
b75a7d8f A |
127 | dist-local: |
128 | ||
129 | clean-local: | |
130 | test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES) | |
374ca955 | 131 | $(RMV) $(OBJECTS) $(STATIC_OBJECTS) $(ALL_TARGETS) $(SO_VERSION_DATA) |
b75a7d8f A |
132 | |
133 | distclean-local: clean-local | |
134 | $(RMV) Makefile | |
135 | ||
136 | check-local: | |
137 | ||
138 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status | |
139 | cd $(top_builddir) \ | |
140 | && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status | |
141 | ||
142 | ifneq ($(ENABLE_STATIC),) | |
46f4442e A |
143 | $(TARGET): $(STATIC_OBJECTS) |
144 | $(AR) $(ARFLAGS) $(AR_OUTOPT)$@ $^ | |
b75a7d8f A |
145 | $(RANLIB) $@ |
146 | endif | |
147 | ||
148 | ifneq ($(ENABLE_SHARED),) | |
73c04bcf | 149 | $(SHARED_OBJECT): $(OBJECTS) $(SO_VERSION_DATA) |
b75a7d8f | 150 | $(SHLIB.cc) $(LD_SONAME) $(OUTOPT)$@ $^ $(LIBS) |
4388f060 A |
151 | ifeq ($(ENABLE_RPATH),YES) |
152 | ifneq ($(wildcard $(libdir)/$(MIDDLE_SO_TARGET)),) | |
153 | $(warning RPATH warning: --enable-rpath means test programs may use existing $(libdir)/$(MIDDLE_SO_TARGET)) | |
154 | endif | |
155 | endif | |
b75a7d8f A |
156 | |
157 | ifeq ($(OS390BATCH),1) | |
73c04bcf | 158 | $(BATCH_TARGET):$(OBJECTS) |
b75a7d8f | 159 | $(SHLIB.cc) $(LD_SONAME) $(OUTOPT)$@ $^ $(BATCH_LIBS) |
73c04bcf A |
160 | endif # OS390BATCH |
161 | endif # ENABLE_SHARED | |
b75a7d8f A |
162 | |
163 | ifeq (,$(MAKECMDGOALS)) | |
164 | -include $(DEPS) | |
165 | else | |
166 | ifneq ($(patsubst %clean,,$(MAKECMDGOALS)),) | |
167 | -include $(DEPS) | |
168 | endif | |
169 | endif | |
73c04bcf | 170 |