• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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) 1999-2015, International Business Machines
6#   Corporation and others.  All Rights Reserved.
7#
8#******************************************************************************
9## Makefile.in for ICU stubdata
10## Stephen F. Booth
11
12## Source directory information
13srcdir = @srcdir@
14top_srcdir = @top_srcdir@
15
16top_builddir = ..
17
18## All the flags and other definitions are included here.
19include $(top_builddir)/icudefs.mk
20
21## Build directory information
22subdir = stubdata
23
24## Extra files to remove for 'make clean'
25CLEANFILES = *~ $(DEPS) $(IMPORT_LIB) $(MIDDLE_IMPORT_LIB) $(FINAL_IMPORT_LIB)
26
27## Target information
28
29TARGET_STUBNAME=$(DATA_STUBNAME)
30
31ifneq ($(ENABLE_STATIC),)
32TARGET = $(STUBDATA_LIBDIR)$(LIBSICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX).$(A)
33endif
34
35
36ifneq ($(ENABLE_SHARED),)
37SO_TARGET = $(STUBDATA_LIBDIR)$(LIBICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX)$(STUB_SUFFIX).$(SO)
38ALL_SO_TARGETS = $(FINAL_SO_TARGET) $(MIDDLE_SO_TARGET) $(SO_TARGET) $(BATCH_STUB_TARGET) $(SHARED_OBJECT)
39endif
40
41
42ALL_TARGETS = $(TARGET) $(ALL_SO_TARGETS)
43
44DYNAMICCPPFLAGS = $(SHAREDLIBCPPFLAGS)
45DYNAMICCFLAGS = $(SHAREDLIBCFLAGS)
46DYNAMICCXXFLAGS = $(SHAREDLIBCXXFLAGS)
47
48CPPFLAGS += -I$(top_srcdir)/common $(LIBCPPFLAGS)
49LDFLAGS += $(LDFLAGSICUDT)
50
51SOURCES = $(shell cat $(srcdir)/sources.txt)
52OBJECTS = $(SOURCES:.cpp=.o)
53
54## Header files to install
55HEADERS =
56
57STATIC_OBJECTS = $(OBJECTS:.o=.$(STATIC_O))
58
59DEPS = $(OBJECTS:.o=.d)
60
61-include Makefile.local
62
63## List of phony targets
64.PHONY : all all-local install install-local clean clean-local	\
65distclean distclean-local install-library dist	\
66dist-local check check-local check-exhaustive
67
68## Clear suffix list
69.SUFFIXES :
70
71## List of standard targets
72all: all-local
73install: install-local
74clean: clean-local
75distclean : distclean-local
76dist: dist-local
77check: all check-local
78
79check-exhaustive: check
80
81all-local: $(ALL_TARGETS)
82
83install-local: install-library
84
85install-library: all-local
86	$(MKINSTALLDIRS) $(DESTDIR)$(libdir)
87ifneq ($(ENABLE_STATIC),)
88	$(INSTALL-L) $(TARGET) $(DESTDIR)$(libdir)
89endif
90ifneq ($(ENABLE_SHARED),)
91# For MinGW, do we want the DLL to go in the bin location?
92ifeq ($(MINGW_MOVEDLLSTOBINDIR),YES)
93	$(MKINSTALLDIRS) $(DESTDIR)$(bindir)
94	$(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(bindir)
95else
96	$(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(libdir)
97ifneq ($(FINAL_SO_TARGET),$(SO_TARGET))
98	cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(SO_TARGET))
99ifneq ($(FINAL_SO_TARGET),$(MIDDLE_SO_TARGET))
100	cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(MIDDLE_SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(MIDDLE_SO_TARGET))
101endif
102endif
103endif
104ifneq ($(IMPORT_LIB_EXT),)
105	$(INSTALL-L) $(FINAL_IMPORT_LIB) $(DESTDIR)$(libdir)
106ifneq ($(IMPORT_LIB),$(FINAL_IMPORT_LIB))
107	cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(IMPORT_LIB)) && ln -s $(notdir $(FINAL_IMPORT_LIB)) $(notdir $(IMPORT_LIB))
108endif
109ifneq ($(MIDDLE_IMPORT_LIB),$(FINAL_IMPORT_LIB))
110	cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(MIDDLE_IMPORT_LIB)) && ln -s $(notdir $(FINAL_IMPORT_LIB)) $(notdir $(MIDDLE_IMPORT_LIB))
111endif
112endif
113endif
114
115dist-local:
116
117clean-local:
118	test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES)
119	$(RMV) $(OBJECTS) $(STATIC_OBJECTS) $(ALL_TARGETS)
120
121distclean-local: clean-local
122	$(RMV) Makefile
123
124check-local:
125
126Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
127	cd $(top_builddir) \
128	&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
129
130ifneq ($(ENABLE_STATIC),)
131$(TARGET): $(STATIC_OBJECTS)
132	$(AR) $(ARFLAGS) $(AR_OUTOPT)$@ $^
133	$(RANLIB) $@
134endif
135
136ifneq ($(ENABLE_SHARED),)
137$(SHARED_OBJECT): $(OBJECTS)
138ifeq ($(BUILD_HOST_ICU),AIX_GCC)
139	$(SHLIB.c) $(LD_SONAME) $(OUTOPT)libicudata.so $^ $(LIBS)
140	mv libicudata.so $@
141else
142	$(SHLIB.c) $(LD_SONAME) $(OUTOPT)$@ $^ $(LIBS)
143endif
144ifeq ($(ENABLE_RPATH),YES)
145ifneq ($(wildcard $(libdir)/$(MIDDLE_SO_TARGET)),)
146	$(warning RPATH warning: --enable-rpath means test programs may use existing $(libdir)/$(MIDDLE_SO_TARGET))
147endif
148endif
149
150ifeq ($(OS390BATCH),1)
151$(BATCH_STUB_TARGET): $(OBJECTS)
152	$(SHLIB.c) $(LD_SONAME) $(OUTOPT)$@ $^ $(LIBS)
153endif   # OS390BATCH
154endif   # ENABLE_SHARED
155
156ifeq (,$(MAKECMDGOALS))
157-include $(DEPS)
158else
159ifneq ($(patsubst %clean,,$(MAKECMDGOALS)),)
160-include $(DEPS)
161endif
162endif
163
164