Debian Codegraph @

intl/icu/source/i18n/Makefile.in

raw
1 # Copyright (C) 2016 and later: Unicode, Inc. and others.
2 # License & terms of use: http://www.unicode.org/copyright.html
3 #******************************************************************************
4 #
5 # Copyright (C) 1998-2016, International Business Machines
6 # Corporation and others. All Rights Reserved.
7 #
8 #******************************************************************************
9 ## Makefile.in for ICU - icui18n.so
10 ## Stephen F. Booth
11
12 ## Source directory information
13 srcdir = @srcdir@
14 top_srcdir = @top_srcdir@
15
16 top_builddir = ..
17
18 ## All the flags and other definitions are included here.
19 include $(top_builddir)/icudefs.mk
20
21 ## Build directory information
22 subdir = i18n
23
24 ## Extra files to remove for 'make clean'
25 CLEANFILES = *~ $(DEPS) $(IMPORT_LIB) $(MIDDLE_IMPORT_LIB) $(FINAL_IMPORT_LIB)
26
27 ## Target information
28
29 TARGET_STUBNAME=$(I18N_STUBNAME)
30
31 ifneq ($(ENABLE_STATIC),)
32 TARGET = $(LIBDIR)/$(LIBSICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX).$(A)
33 endif
34
35 ifneq ($(ENABLE_SHARED),)
36 SO_TARGET = $(LIBDIR)/$(LIBICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX).$(SO)
37 ALL_SO_TARGETS = $(SO_TARGET) $(MIDDLE_SO_TARGET) $(FINAL_SO_TARGET) $(SHARED_OBJECT)
38
39 ifeq ($(ENABLE_SO_VERSION_DATA),1)
40 SO_VERSION_DATA = i18n.res
41 endif
42
43 ifeq ($(BUILD_HOST_ICU),OS390)
44 BATCH_TARGET = $(BATCH_I18N_TARGET)
45 BATCH_LIBS = $(BATCH_LIBICUUC) -lm
46 endif
47
48 endif # ENABLE_SHARED
49
50 ALL_TARGETS = $(TARGET) $(ALL_SO_TARGETS) $(BATCH_TARGET)
51
52 DYNAMICCPPFLAGS = $(SHAREDLIBCPPFLAGS)
53 DYNAMICCFLAGS = $(SHAREDLIBCFLAGS)
54 DYNAMICCXXFLAGS = $(SHAREDLIBCXXFLAGS)
55 CFLAGS += $(LIBCFLAGS)
56 CXXFLAGS += $(LIBCXXFLAGS)
57
58 CPPFLAGS += -I$(srcdir) -I$(top_srcdir)/common $(LIBCPPFLAGS) $(CPPFLAGSICUI18N)
59 DEFS += -DU_I18N_IMPLEMENTATION
60 LDFLAGS += $(LDFLAGSICUI18N)
61 LIBS = $(LIBICUUC) $(DEFAULT_LIBS)
62
63 SOURCES = $(shell cat $(srcdir)/sources.txt)
64 OBJECTS = $(SOURCES:.cpp=.o)
65
66 ## Header files to install
67 HEADERS = $(srcdir)/unicode/*.h
68
69 STATIC_OBJECTS = $(OBJECTS:.o=.$(STATIC_O))
70
71 DEPS = $(OBJECTS:.o=.d)
72
73 -include Makefile.local
74
75 ## List of phony targets
76 .PHONY : all all-local install install-local clean clean-local \
77 distclean distclean-local install-library install-headers dist \
78 dist-local check check-local check-exhaustive
79
80 ## Clear suffix list
81 .SUFFIXES :
82
83 ## List of standard targets
84 all: all-local
85 install: install-local
86 clean: clean-local
87 distclean : distclean-local
88 dist: dist-local
89 check: all check-local
90
91 check-exhaustive: check
92
93 all-local: $(ALL_TARGETS)
94
95 install-local: install-headers install-library
96
97 install-library: all-local
98 $(MKINSTALLDIRS) $(DESTDIR)$(libdir)
99 ifneq ($(ENABLE_STATIC),)
100 $(INSTALL-L) $(TARGET) $(DESTDIR)$(libdir)
101 endif
102 ifneq ($(ENABLE_SHARED),)
103 # For MinGW, do we want the DLL to go in the bin location?
104 ifeq ($(MINGW_MOVEDLLSTOBINDIR),YES)
105 $(MKINSTALLDIRS) $(DESTDIR)$(bindir)
106 $(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(bindir)
107 else
108 $(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(libdir)
109 ifneq ($(FINAL_SO_TARGET),$(SO_TARGET))
110 cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(SO_TARGET))
111 ifneq ($(FINAL_SO_TARGET),$(MIDDLE_SO_TARGET))
112 cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(MIDDLE_SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(MIDDLE_SO_TARGET))
113 endif
114 endif
115 endif
116 ifneq ($(IMPORT_LIB_EXT),)
117 $(INSTALL-L) $(FINAL_IMPORT_LIB) $(DESTDIR)$(libdir)
118 ifneq ($(IMPORT_LIB),$(FINAL_IMPORT_LIB))
119 cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(IMPORT_LIB)) && ln -s $(notdir $(FINAL_IMPORT_LIB)) $(notdir $(IMPORT_LIB))
120 endif
121 ifneq ($(MIDDLE_IMPORT_LIB),$(FINAL_IMPORT_LIB))
122 cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(MIDDLE_IMPORT_LIB)) && ln -s $(notdir $(FINAL_IMPORT_LIB)) $(notdir $(MIDDLE_IMPORT_LIB))
123 endif
124 endif
125 endif
126
127 install-headers:
128 $(MKINSTALLDIRS) $(DESTDIR)$(includedir)/unicode
129 @for file in $(HEADERS); do \
130 echo "$(INSTALL_DATA) $$file $(DESTDIR)$(includedir)/unicode"; \
131 $(INSTALL_DATA) $$file $(DESTDIR)$(includedir)/unicode || exit; \
132 done
133
134 dist-local:
135
136 clean-local:
137 test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES)
138 $(RMV) $(OBJECTS) $(STATIC_OBJECTS) $(ALL_TARGETS) $(SO_VERSION_DATA)
139
140 distclean-local: clean-local
141 $(RMV) Makefile
142
143 check-local:
144
145 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
146 cd $(top_builddir) \
147 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
148
149 ifneq ($(ENABLE_STATIC),)
150 $(TARGET): $(STATIC_OBJECTS)
151 $(AR) $(ARFLAGS) $(AR_OUTOPT)$@ $^
152 $(RANLIB) $@
153 endif
154
155 ifneq ($(ENABLE_SHARED),)
156 $(SHARED_OBJECT): $(OBJECTS) $(SO_VERSION_DATA)
157 $(SHLIB.cc) $(LD_SONAME) $(OUTOPT)$@ $^ $(LIBS)
158 ifeq ($(ENABLE_RPATH),YES)
159 ifneq ($(wildcard $(libdir)/$(MIDDLE_SO_TARGET)),)
160 $(warning RPATH warning: --enable-rpath means test programs may use existing $(libdir)/$(MIDDLE_SO_TARGET))
161 endif
162 endif
163
164 ifeq ($(BUILD_HOST_ICU),OS390)
165 $(BATCH_TARGET):$(OBJECTS)
166 $(SHLIB.cc) $(LD_SONAME) -Wl,[email protected] $(OUTOPT)$@ $^ $(BATCH_LIBS)
167 endif
168 endif # ENABLE_SHARED
169
170 ifeq (,$(MAKECMDGOALS))
171 -include $(DEPS)
172 else
173 ifneq ($(patsubst %clean,,$(MAKECMDGOALS)),)
174 -include $(DEPS)
175 endif
176 endif