• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
11srcdir = @srcdir@
12top_srcdir = @top_srcdir@
13
14top_builddir = ..
15
16## All the flags and other definitions are included here.
17include $(top_builddir)/icudefs.mk
18
19## Build directory information
20subdir = io
21
22## Extra files to remove for 'make clean'
23CLEANFILES = *~ $(DEPS) $(IMPORT_LIB) $(MIDDLE_IMPORT_LIB) $(FINAL_IMPORT_LIB)
24
25## Target information
26
27TARGET_STUBNAME=$(IO_STUBNAME)
28
29ifneq ($(ENABLE_STATIC),)
30TARGET = $(LIBDIR)/$(LIBSICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX).$(A)
31endif
32
33ifneq ($(ENABLE_SHARED),)
34SO_TARGET = $(LIBDIR)/$(LIBICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX).$(SO)
35ALL_SO_TARGETS = $(SO_TARGET) $(MIDDLE_SO_TARGET) $(FINAL_SO_TARGET) $(SHARED_OBJECT)
36
37ifeq ($(ENABLE_SO_VERSION_DATA),1)
38SO_VERSION_DATA = io.res
39endif
40
41ifeq ($(OS390BATCH),1)
42BATCH_TARGET = $(BATCH_IO_TARGET)
43BATCH_LIBS = $(BATCH_LIBICUUC) $(BATCH_LIBICUI18N) -lm
44endif   # OS390BATCH
45
46endif   # ENABLE_SHARED
47
48ALL_TARGETS = $(TARGET) $(ALL_SO_TARGETS) $(BATCH_TARGET)
49
50DYNAMICCPPFLAGS = $(SHAREDLIBCPPFLAGS)
51DYNAMICCFLAGS = $(SHAREDLIBCFLAGS)
52DYNAMICCXXFLAGS = $(SHAREDLIBCXXFLAGS)
53CFLAGS += $(LIBCFLAGS)
54CXXFLAGS += $(LIBCXXFLAGS)
55
56CPPFLAGS += -I$(top_srcdir)/common -I$(top_srcdir)/i18n $(LIBCPPFLAGS) $(CPPFLAGSICUIO)
57DEFS += -DU_IO_IMPLEMENTATION
58LDFLAGS += $(LDFLAGSICUIO)
59LIBS = $(LIBICUUC) $(LIBICUI18N) $(DEFAULT_LIBS)
60
61OBJECTS = locbund.o ufile.o ufmt_cmn.o uprintf.o uprntf_p.o \
62uscanf.o uscanf_p.o ustdio.o sprintf.o sscanf.o \
63ustream.o ucln_io.o
64
65## Header files to install
66HEADERS = $(srcdir)/unicode/*.h
67
68STATIC_OBJECTS = $(OBJECTS:.o=.$(STATIC_O))
69
70DEPS = $(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	\
76distclean distclean-local install-library install-headers dist	\
77dist-local check check-local check-exhaustive
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
90check-exhaustive: check
91
92all-local: $(ALL_TARGETS)
93
94install-local: install-headers install-library
95
96install-library: all-local
97	$(MKINSTALLDIRS) $(DESTDIR)$(libdir)
98ifneq ($(ENABLE_STATIC),)
99	$(INSTALL-L) $(TARGET) $(DESTDIR)$(libdir)
100endif
101ifneq ($(ENABLE_SHARED),)
102	$(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(libdir)
103ifneq ($(FINAL_SO_TARGET),$(SO_TARGET))
104	cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(SO_TARGET))
105ifneq ($(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))
107endif
108endif
109ifneq ($(IMPORT_LIB_EXT),)
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
114ifneq ($(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))
116endif
117endif
118endif
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
127dist-local:
128
129clean-local:
130	test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES)
131	$(RMV) $(OBJECTS) $(STATIC_OBJECTS) $(ALL_TARGETS) $(SO_VERSION_DATA)
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),)
143$(TARGET): $(STATIC_OBJECTS)
144	$(AR) $(ARFLAGS) $(AR_OUTOPT)$@ $^
145	$(RANLIB) $@
146endif
147
148ifneq ($(ENABLE_SHARED),)
149$(SHARED_OBJECT): $(OBJECTS) $(SO_VERSION_DATA)
150	$(SHLIB.cc) $(LD_SONAME) $(OUTOPT)$@ $^ $(LIBS)
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
156
157ifeq ($(OS390BATCH),1)
158$(BATCH_TARGET):$(OBJECTS)
159	$(SHLIB.cc) $(LD_SONAME) $(OUTOPT)$@ $^ $(BATCH_LIBS)
160endif   # OS390BATCH
161endif   # ENABLE_SHARED
162
163ifeq (,$(MAKECMDGOALS))
164-include $(DEPS)
165else
166ifneq ($(patsubst %clean,,$(MAKECMDGOALS)),)
167-include $(DEPS)
168endif
169endif
170
171