1 # Copyright (C) 2016 and later: Unicode, Inc. and others.
2 # License & terms of use: http://www.unicode.org/copyright.html
3 #******************************************************************************
5 # Copyright (C) 1999-2015, International Business Machines
6 # Corporation and others. All Rights Reserved.
8 #******************************************************************************
9 ## Makefile.in for ICU stubdata
12 ## Source directory information
14 top_srcdir = @top_srcdir@
18 ## All the flags and other definitions are included here.
19 include $(top_builddir)/icudefs.mk
21 ## Build directory information
24 ## Extra files to remove for 'make clean'
25 CLEANFILES = *~ $(DEPS) $(IMPORT_LIB) $(MIDDLE_IMPORT_LIB) $(FINAL_IMPORT_LIB)
29 TARGET_STUBNAME=$(DATA_STUBNAME)
31 ifneq ($(ENABLE_STATIC),)
32 TARGET = $(STUBDATA_LIBDIR)$(LIBSICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX).$(A)
36 ifneq ($(ENABLE_SHARED),)
37 SO_TARGET = $(STUBDATA_LIBDIR)$(LIBICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX)$(STUB_SUFFIX).$(SO)
38 ALL_SO_TARGETS = $(FINAL_SO_TARGET) $(MIDDLE_SO_TARGET) $(SO_TARGET) $(BATCH_STUB_TARGET) $(SHARED_OBJECT)
42 ALL_TARGETS = $(TARGET) $(ALL_SO_TARGETS)
44 DYNAMICCPPFLAGS = $(SHAREDLIBCPPFLAGS)
45 DYNAMICCFLAGS = $(SHAREDLIBCFLAGS)
46 DYNAMICCXXFLAGS = $(SHAREDLIBCXXFLAGS)
48 CPPFLAGS += -I$(top_srcdir)/common $(LIBCPPFLAGS)
49 LDFLAGS += $(LDFLAGSICUDT)
53 ## Header files to install
56 STATIC_OBJECTS = $(OBJECTS:.o=.$(STATIC_O))
58 DEPS = $(OBJECTS:.o=.d)
60 -include Makefile.local
62 ## List of phony targets
63 .PHONY : all all-local install install-local clean clean-local \
64 distclean distclean-local install-library dist \
65 dist-local check check-local check-exhaustive
70 ## List of standard targets
72 install: install-local
74 distclean : distclean-local
76 check: all check-local
78 check-exhaustive: check
80 all-local: $(ALL_TARGETS)
82 install-local: install-library
84 install-library: all-local
85 $(MKINSTALLDIRS) $(DESTDIR)$(libdir)
86 ifneq ($(ENABLE_STATIC),)
87 $(INSTALL-L) $(TARGET) $(DESTDIR)$(libdir)
89 ifneq ($(ENABLE_SHARED),)
90 $(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(libdir)
91 ifneq ($(FINAL_SO_TARGET),$(SO_TARGET))
92 cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(SO_TARGET))
93 ifneq ($(FINAL_SO_TARGET),$(MIDDLE_SO_TARGET))
94 cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(MIDDLE_SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(MIDDLE_SO_TARGET))
97 ifneq ($(IMPORT_LIB_EXT),)
98 $(INSTALL-L) $(FINAL_IMPORT_LIB) $(DESTDIR)$(libdir)
99 ifneq ($(IMPORT_LIB),$(FINAL_IMPORT_LIB))
100 cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(IMPORT_LIB)) && ln -s $(notdir $(FINAL_IMPORT_LIB)) $(notdir $(IMPORT_LIB))
102 ifneq ($(MIDDLE_IMPORT_LIB),$(FINAL_IMPORT_LIB))
103 cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(MIDDLE_IMPORT_LIB)) && ln -s $(notdir $(FINAL_IMPORT_LIB)) $(notdir $(MIDDLE_IMPORT_LIB))
111 test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES)
112 $(RMV) $(OBJECTS) $(STATIC_OBJECTS) $(ALL_TARGETS)
114 distclean-local: clean-local
119 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
121 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
123 ifneq ($(ENABLE_STATIC),)
124 $(TARGET): $(STATIC_OBJECTS)
125 $(AR) $(ARFLAGS) $(AR_OUTOPT)$@ $^
129 ifneq ($(ENABLE_SHARED),)
130 $(SHARED_OBJECT): $(OBJECTS)
131 ifeq ($(BUILD_HOST_ICU),AIX_GCC)
132 $(SHLIB.c) $(LD_SONAME) $(OUTOPT)libicudata.so $^ $(LIBS)
135 $(SHLIB.c) $(LD_SONAME) $(OUTOPT)$@ $^ $(LIBS)
137 ifeq ($(ENABLE_RPATH),YES)
138 ifneq ($(wildcard $(libdir)/$(MIDDLE_SO_TARGET)),)
139 $(warning RPATH warning: --enable-rpath means test programs may use existing $(libdir)/$(MIDDLE_SO_TARGET))
143 ifeq ($(OS390BATCH),1)
144 $(BATCH_STUB_TARGET): $(OBJECTS)
145 $(SHLIB.c) $(LD_SONAME) $(OUTOPT)$@ $^ $(LIBS)
147 endif # ENABLE_SHARED
149 ifeq (,$(MAKECMDGOALS))
152 ifneq ($(patsubst %clean,,$(MAKECMDGOALS)),)