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