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