|
1 #****************************************************************************** |
|
2 # |
|
3 # Copyright (C) 1999-2011, International Business Machines |
|
4 # Corporation and others. All Rights Reserved. |
|
5 # |
|
6 #****************************************************************************** |
|
7 ## Makefile.in for ICU - icuio.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 = io |
|
21 |
|
22 ## Extra files to remove for 'make clean' |
|
23 CLEANFILES = *~ $(DEPS) $(IMPORT_LIB) $(MIDDLE_IMPORT_LIB) $(FINAL_IMPORT_LIB) |
|
24 |
|
25 ## Target information |
|
26 |
|
27 TARGET_STUBNAME=$(IO_STUBNAME) |
|
28 |
|
29 ifneq ($(ENABLE_STATIC),) |
|
30 TARGET = $(LIBDIR)/$(LIBSICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX).$(A) |
|
31 endif |
|
32 |
|
33 ifneq ($(ENABLE_SHARED),) |
|
34 SO_TARGET = $(LIBDIR)/$(LIBICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX).$(SO) |
|
35 ALL_SO_TARGETS = $(SO_TARGET) $(MIDDLE_SO_TARGET) $(FINAL_SO_TARGET) $(SHARED_OBJECT) |
|
36 |
|
37 ifeq ($(ENABLE_SO_VERSION_DATA),1) |
|
38 SO_VERSION_DATA = io.res |
|
39 endif |
|
40 |
|
41 ifeq ($(OS390BATCH),1) |
|
42 BATCH_TARGET = $(BATCH_IO_TARGET) |
|
43 BATCH_LIBS = $(BATCH_LIBICUUC) $(BATCH_LIBICUI18N) -lm |
|
44 endif # OS390BATCH |
|
45 |
|
46 endif # ENABLE_SHARED |
|
47 |
|
48 ALL_TARGETS = $(TARGET) $(ALL_SO_TARGETS) $(BATCH_TARGET) |
|
49 |
|
50 DYNAMICCPPFLAGS = $(SHAREDLIBCPPFLAGS) |
|
51 DYNAMICCFLAGS = $(SHAREDLIBCFLAGS) |
|
52 DYNAMICCXXFLAGS = $(SHAREDLIBCXXFLAGS) |
|
53 CFLAGS += $(LIBCFLAGS) |
|
54 CXXFLAGS += $(LIBCXXFLAGS) |
|
55 |
|
56 CPPFLAGS += -I$(top_srcdir)/common -I$(top_srcdir)/i18n $(LIBCPPFLAGS) $(CPPFLAGSICUIO) |
|
57 DEFS += -DU_IO_IMPLEMENTATION |
|
58 LDFLAGS += $(LDFLAGSICUIO) |
|
59 LIBS = $(LIBICUUC) $(LIBICUI18N) $(DEFAULT_LIBS) |
|
60 |
|
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 \ |
|
63 ustream.o ucln_io.o |
|
64 |
|
65 ## Header files to install |
|
66 HEADERS = $(srcdir)/unicode/*.h |
|
67 |
|
68 STATIC_OBJECTS = $(OBJECTS:.o=.$(STATIC_O)) |
|
69 |
|
70 DEPS = $(OBJECTS:.o=.d) |
|
71 |
|
72 -include Makefile.local |
|
73 |
|
74 ## List of phony targets |
|
75 .PHONY : all all-local install install-local clean clean-local \ |
|
76 distclean distclean-local install-library install-headers dist \ |
|
77 dist-local check check-local check-exhaustive |
|
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 |
|
90 check-exhaustive: check |
|
91 |
|
92 all-local: $(ALL_TARGETS) |
|
93 |
|
94 install-local: install-headers install-library |
|
95 |
|
96 install-library: all-local |
|
97 $(MKINSTALLDIRS) $(DESTDIR)$(libdir) |
|
98 ifneq ($(ENABLE_STATIC),) |
|
99 $(INSTALL-L) $(TARGET) $(DESTDIR)$(libdir) |
|
100 endif |
|
101 ifneq ($(ENABLE_SHARED),) |
|
102 $(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(libdir) |
|
103 ifneq ($(FINAL_SO_TARGET),$(SO_TARGET)) |
|
104 cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(SO_TARGET)) |
|
105 ifneq ($(FINAL_SO_TARGET),$(MIDDLE_SO_TARGET)) |
|
106 cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(MIDDLE_SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(MIDDLE_SO_TARGET)) |
|
107 endif |
|
108 endif |
|
109 ifneq ($(IMPORT_LIB_EXT),) |
|
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 |
|
114 ifneq ($(MIDDLE_IMPORT_LIB),$(FINAL_IMPORT_LIB)) |
|
115 cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(MIDDLE_IMPORT_LIB)) && ln -s $(notdir $(FINAL_IMPORT_LIB)) $(notdir $(MIDDLE_IMPORT_LIB)) |
|
116 endif |
|
117 endif |
|
118 endif |
|
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 |
|
127 dist-local: |
|
128 |
|
129 clean-local: |
|
130 test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES) |
|
131 $(RMV) $(OBJECTS) $(STATIC_OBJECTS) $(ALL_TARGETS) $(SO_VERSION_DATA) |
|
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),) |
|
143 $(TARGET): $(STATIC_OBJECTS) |
|
144 $(AR) $(ARFLAGS) $(AR_OUTOPT)$@ $^ |
|
145 $(RANLIB) $@ |
|
146 endif |
|
147 |
|
148 ifneq ($(ENABLE_SHARED),) |
|
149 $(SHARED_OBJECT): $(OBJECTS) $(SO_VERSION_DATA) |
|
150 $(SHLIB.cc) $(LD_SONAME) $(OUTOPT)$@ $^ $(LIBS) |
|
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 |
|
156 |
|
157 ifeq ($(OS390BATCH),1) |
|
158 $(BATCH_TARGET):$(OBJECTS) |
|
159 $(SHLIB.cc) $(LD_SONAME) $(OUTOPT)$@ $^ $(BATCH_LIBS) |
|
160 endif # OS390BATCH |
|
161 endif # ENABLE_SHARED |
|
162 |
|
163 ifeq (,$(MAKECMDGOALS)) |
|
164 -include $(DEPS) |
|
165 else |
|
166 ifneq ($(patsubst %clean,,$(MAKECMDGOALS)),) |
|
167 -include $(DEPS) |
|
168 endif |
|
169 endif |
|
170 |