• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#******************************************************************************
2#
3#   Copyright (C) 1999-2007, 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
56ifneq ($(top_builddir),$(top_srcdir))
57CPPFLAGS += -I$(top_builddir)/common
58endif
59CPPFLAGS += -I$(top_srcdir)/common -I$(top_srcdir)/i18n $(LIBCPPFLAGS)
60DEFS += -DU_IO_IMPLEMENTATION
61LDFLAGS += $(LDFLAGSICUIO)
62LIBS = $(LIBICUUC) $(LIBICUI18N) $(DEFAULT_LIBS)
63
64OBJECTS = locbund.o ufile.o ufmt_cmn.o uprintf.o uprntf_p.o \
65uscanf.o uscanf_p.o ustdio.o sprintf.o sscanf.o \
66ustream.o ucln_io.o
67
68## Header files to install
69HEADERS = $(srcdir)/unicode/*.h
70
71STATIC_OBJECTS = $(OBJECTS:.o=.$(STATIC_O))
72
73DEPS = $(OBJECTS:.o=.d)
74
75-include Makefile.local
76
77## List of phony targets
78.PHONY : all all-local install install-local clean clean-local	\
79distclean distclean-local install-library install-headers dist	\
80dist-local check check-local
81
82## Clear suffix list
83.SUFFIXES :
84
85## List of standard targets
86all: all-local
87install: install-local
88clean: clean-local
89distclean : distclean-local
90dist: dist-local
91check: all check-local
92
93all-local: $(ALL_TARGETS)
94
95install-local: install-headers install-library
96
97install-library: all-local
98	$(MKINSTALLDIRS) $(DESTDIR)$(libdir)
99ifneq ($(ENABLE_STATIC),)
100	$(INSTALL-L) $(TARGET) $(DESTDIR)$(libdir)
101endif
102ifneq ($(ENABLE_SHARED),)
103	$(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(libdir)
104ifneq ($(FINAL_SO_TARGET),$(SO_TARGET))
105	cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(SO_TARGET))
106ifneq ($(FINAL_SO_TARGET),$(MIDDLE_SO_TARGET))
107	cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(MIDDLE_SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(MIDDLE_SO_TARGET))
108endif
109endif
110ifneq ($(IMPORT_LIB_EXT),)
111	$(INSTALL-L) $(FINAL_IMPORT_LIB) $(DESTDIR)$(libdir)
112ifneq ($(IMPORT_LIB),$(FINAL_IMPORT_LIB))
113	cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(IMPORT_LIB)) && ln -s $(notdir $(FINAL_IMPORT_LIB)) $(notdir $(IMPORT_LIB))
114endif
115ifneq ($(MIDDLE_IMPORT_LIB),$(FINAL_IMPORT_LIB))
116	cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(MIDDLE_IMPORT_LIB)) && ln -s $(notdir $(FINAL_IMPORT_LIB)) $(notdir $(MIDDLE_IMPORT_LIB))
117endif
118endif
119endif
120
121install-headers:
122	$(MKINSTALLDIRS) $(DESTDIR)$(includedir)/unicode
123	@for file in $(HEADERS); do \
124	 echo "$(INSTALL_DATA) $$file $(DESTDIR)$(includedir)/unicode"; \
125	 $(INSTALL_DATA) $$file $(DESTDIR)$(includedir)/unicode || exit; \
126	done
127
128dist-local:
129
130clean-local:
131	test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES)
132	$(RMV) $(OBJECTS) $(STATIC_OBJECTS) $(ALL_TARGETS) $(SO_VERSION_DATA)
133
134distclean-local: clean-local
135	$(RMV) Makefile
136
137check-local:
138
139Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
140	cd $(top_builddir) \
141	 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
142
143ifneq ($(ENABLE_STATIC),)
144$(TARGET): $(STATIC_OBJECTS)
145	$(AR) $(ARFLAGS) $(AR_OUTOPT)$@ $^
146	$(RANLIB) $@
147endif
148
149ifneq ($(ENABLE_SHARED),)
150$(SHARED_OBJECT): $(OBJECTS) $(SO_VERSION_DATA)
151	$(SHLIB.cc) $(LD_SONAME) $(OUTOPT)$@ $^ $(LIBS)
152
153ifeq ($(OS390BATCH),1)
154$(BATCH_TARGET):$(OBJECTS)
155	$(SHLIB.cc) $(LD_SONAME) $(OUTOPT)$@ $^ $(BATCH_LIBS)
156endif   # OS390BATCH
157endif   # ENABLE_SHARED
158
159ifeq (,$(MAKECMDGOALS))
160-include $(DEPS)
161else
162ifneq ($(patsubst %clean,,$(MAKECMDGOALS)),)
163-include $(DEPS)
164endif
165endif
166
167