1 #******************************************************************************
3 # Copyright (C) 1999-2011, International Business Machines
4 # Corporation and others. All Rights Reserved.
6 #******************************************************************************
7 ## Makefile.in for ICU - icuio.so
10 ## Source directory information
12 top_srcdir = @top_srcdir@
16 ## All the flags and other definitions are included here.
17 include $(top_builddir)/icudefs.mk
19 ## Build directory information
22 ## Extra files to remove for 'make clean'
23 CLEANFILES = *~ $(DEPS) $(IMPORT_LIB) $(MIDDLE_IMPORT_LIB) $(FINAL_IMPORT_LIB)
27 TARGET_STUBNAME=$(IO_STUBNAME)
29 ifneq ($(ENABLE_STATIC),)
30 TARGET = $(LIBDIR)/$(LIBSICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX).$(A)
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)
37 ifeq ($(ENABLE_SO_VERSION_DATA),1)
38 SO_VERSION_DATA = io.res
41 ifeq ($(OS390BATCH),1)
42 BATCH_TARGET = $(BATCH_IO_TARGET)
43 BATCH_LIBS = $(BATCH_LIBICUUC) $(BATCH_LIBICUI18N) -lm
48 ALL_TARGETS = $(TARGET) $(ALL_SO_TARGETS) $(BATCH_TARGET)
50 DYNAMICCPPFLAGS = $(SHAREDLIBCPPFLAGS)
51 DYNAMICCFLAGS = $(SHAREDLIBCFLAGS)
52 DYNAMICCXXFLAGS = $(SHAREDLIBCXXFLAGS)
53 CFLAGS += $(LIBCFLAGS)
54 CXXFLAGS += $(LIBCXXFLAGS)
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)
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 \
65 ## Header files to install
66 HEADERS = $(srcdir)/unicode/*.h
68 STATIC_OBJECTS = $(OBJECTS:.o=.$(STATIC_O))
70 DEPS = $(OBJECTS:.o=.d)
72 -include Makefile.local
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
82 ## List of standard targets
84 install: install-local
86 distclean : distclean-local
88 check: all check-local
90 check-exhaustive: check
92 all-local: $(ALL_TARGETS)
94 install-local: install-headers install-library
96 install-library: all-local
97 $(MKINSTALLDIRS) $(DESTDIR)$(libdir)
98 ifneq ($(ENABLE_STATIC),)
99 $(INSTALL-L) $(TARGET) $(DESTDIR)$(libdir)
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))
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))
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))
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; \
130 test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES)
131 $(RMV) $(OBJECTS) $(STATIC_OBJECTS) $(ALL_TARGETS) $(SO_VERSION_DATA)
133 distclean-local: clean-local
138 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
140 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
142 ifneq ($(ENABLE_STATIC),)
143 $(TARGET): $(STATIC_OBJECTS)
144 $(AR) $(ARFLAGS) $(AR_OUTOPT)$@ $^
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))
157 ifeq ($(OS390BATCH),1)
158 $(BATCH_TARGET):$(OBJECTS)
159 $(SHLIB.cc) $(LD_SONAME) $(OUTOPT)$@ $^ $(BATCH_LIBS)
161 endif # ENABLE_SHARED
163 ifeq (,$(MAKECMDGOALS))
166 ifneq ($(patsubst %clean,,$(MAKECMDGOALS)),)