]>
Commit | Line | Data |
---|---|---|
f3c0d7a5 A |
1 | # Copyright (C) 2016 and later: Unicode, Inc. and others. |
2 | # License & terms of use: http://www.unicode.org/copyright.html | |
73c04bcf A |
3 | #****************************************************************************** |
4 | # | |
57a6839d | 5 | # Copyright (C) 1999-2014, International Business Machines |
73c04bcf A |
6 | # Corporation and others. All Rights Reserved. |
7 | # | |
8 | #****************************************************************************** | |
b75a7d8f A |
9 | ## Makefile.in for ICU - tools/toolutil |
10 | ## Steven R. Loomis | |
11 | ||
12 | ## Source directory information | |
13 | srcdir = @srcdir@ | |
14 | top_srcdir = @top_srcdir@ | |
15 | ||
16 | top_builddir = ../.. | |
17 | ||
73c04bcf | 18 | ## All the flags and other definitions are included here. |
b75a7d8f A |
19 | include $(top_builddir)/icudefs.mk |
20 | ||
21 | ## Build directory information | |
22 | subdir = tools/toolutil | |
23 | ||
24 | ## Extra files to remove for 'make clean' | |
374ca955 | 25 | CLEANFILES = *~ $(DEPS) $(IMPORT_LIB) $(MIDDLE_IMPORT_LIB) $(FINAL_IMPORT_LIB) |
b75a7d8f A |
26 | |
27 | ## Target information | |
28 | ||
374ca955 A |
29 | TARGET_STUBNAME=$(TOOLUTIL_STUBNAME) |
30 | ||
b75a7d8f | 31 | ifneq ($(ENABLE_STATIC),) |
374ca955 | 32 | TARGET = $(LIBDIR)/$(LIBSICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX).$(A) |
b75a7d8f A |
33 | endif |
34 | ||
35 | ifneq ($(ENABLE_SHARED),) | |
374ca955 | 36 | SO_TARGET = $(LIBDIR)/$(LIBICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX).$(SO) |
73c04bcf | 37 | ALL_SO_TARGETS = $(SO_TARGET) $(MIDDLE_SO_TARGET) $(FINAL_SO_TARGET) $(SHARED_OBJECT) |
b75a7d8f A |
38 | endif |
39 | ||
40 | ALL_TARGETS = $(TARGET) $(ALL_SO_TARGETS) | |
41 | ||
42 | DYNAMICCPPFLAGS = $(SHAREDLIBCPPFLAGS) | |
43 | DYNAMICCFLAGS = $(SHAREDLIBCFLAGS) | |
44 | DYNAMICCXXFLAGS = $(SHAREDLIBCXXFLAGS) | |
46f4442e A |
45 | CFLAGS += $(LIBCFLAGS) |
46 | CXXFLAGS += $(LIBCXXFLAGS) | |
b75a7d8f | 47 | |
f3c0d7a5 | 48 | CPPFLAGS += -I$(srcdir) -I$(top_srcdir)/common -I$(top_srcdir)/i18n $(LIBCPPFLAGS) |
4388f060 A |
49 | |
50 | # from icuinfo | |
51 | CPPFLAGS+= "-DU_BUILD=\"@build@\"" "-DU_HOST=\"@host@\"" "-DU_CC=\"@CC@\"" "-DU_CXX=\"@CXX@\"" | |
57a6839d | 52 | CPPFLAGS += -DUNISTR_FROM_CHAR_EXPLICIT=explicit -DUNISTR_FROM_STRING_EXPLICIT=explicit |
4388f060 | 53 | |
73c04bcf | 54 | DEFS += -DU_TOOLUTIL_IMPLEMENTATION |
374ca955 | 55 | LDFLAGS += $(LDFLAGSICUTOOLUTIL) |
73c04bcf | 56 | LIBS = $(LIBICUI18N) $(LIBICUUC) $(DEFAULT_LIBS) |
b75a7d8f | 57 | |
729e4ab9 | 58 | OBJECTS = filestrm.o package.o pkgitems.o swapimpl.o toolutil.o unewdata.o \ |
57a6839d | 59 | collationinfo.o denseranges.o \ |
73c04bcf | 60 | ucm.o ucmstate.o uoptions.o uparse.o \ |
729e4ab9 | 61 | ucbuf.o xmlparser.o writesrc.o \ |
4388f060 | 62 | pkg_icu.o pkg_genc.o pkg_gencmn.o ppucd.o flagparser.o filetools.o \ |
729e4ab9 | 63 | udbgutil.o dbgutil.o ucln_tu.o |
b75a7d8f A |
64 | |
65 | STATIC_OBJECTS = $(OBJECTS:.o=.$(STATIC_O)) | |
66 | ||
67 | DEPS = $(OBJECTS:.o=.d) | |
68 | ||
73c04bcf A |
69 | -include Makefile.local |
70 | ||
b75a7d8f A |
71 | ## List of phony targets |
72 | .PHONY : all all-local install install-local clean clean-local \ | |
73c04bcf A |
73 | distclean distclean-local install-library dist \ |
74 | dist-local check check-local | |
b75a7d8f A |
75 | |
76 | ## Clear suffix list | |
77 | .SUFFIXES : | |
78 | ||
79 | ## List of standard targets | |
80 | all: all-local | |
81 | install: install-local | |
82 | clean: clean-local | |
83 | distclean : distclean-local | |
84 | dist: dist-local | |
85 | check: all check-local | |
86 | ||
87 | all-local: $(ALL_TARGETS) | |
88 | ||
89 | install-local: install-library | |
90 | ||
91 | install-library: all-local | |
92 | $(MKINSTALLDIRS) $(DESTDIR)$(libdir) | |
729e4ab9 A |
93 | ifneq ($(ENABLE_STATIC),) |
94 | $(INSTALL-L) $(TARGET) $(DESTDIR)$(libdir) | |
95 | endif | |
b75a7d8f | 96 | ifneq ($(ENABLE_SHARED),) |
374ca955 | 97 | $(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(libdir) |
b75a7d8f | 98 | ifneq ($(FINAL_SO_TARGET),$(SO_TARGET)) |
374ca955 A |
99 | cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(SO_TARGET)) |
100 | ifneq ($(FINAL_SO_TARGET),$(MIDDLE_SO_TARGET)) | |
101 | cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(MIDDLE_SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(MIDDLE_SO_TARGET)) | |
102 | endif | |
b75a7d8f | 103 | endif |
729e4ab9 A |
104 | ifneq ($(IMPORT_LIB_EXT),) |
105 | $(INSTALL-L) $(FINAL_IMPORT_LIB) $(DESTDIR)$(libdir) | |
106 | ifneq ($(IMPORT_LIB),$(FINAL_IMPORT_LIB)) | |
107 | cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(IMPORT_LIB)) && ln -s $(notdir $(FINAL_IMPORT_LIB)) $(notdir $(IMPORT_LIB)) | |
108 | endif | |
109 | ifneq ($(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)) | |
111 | endif | |
112 | endif | |
b75a7d8f A |
113 | endif |
114 | ||
115 | dist-local: | |
116 | ||
117 | clean-local: | |
118 | test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES) | |
119 | $(RMV) $(OBJECTS) $(STATIC_OBJECTS) $(ALL_TARGETS) | |
120 | ||
121 | distclean-local: clean-local | |
122 | $(RMV) Makefile | |
123 | ||
124 | check-local: all-local | |
125 | ||
126 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status | |
127 | cd $(top_builddir) \ | |
128 | && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status | |
129 | ||
130 | ifneq ($(ENABLE_STATIC),) | |
46f4442e A |
131 | $(TARGET): $(STATIC_OBJECTS) |
132 | $(AR) $(ARFLAGS) $(AR_OUTOPT)$@ $^ | |
b75a7d8f A |
133 | $(RANLIB) $@ |
134 | endif | |
135 | ||
136 | ifneq ($(ENABLE_SHARED),) | |
73c04bcf | 137 | $(SHARED_OBJECT): $(OBJECTS) |
b75a7d8f | 138 | $(SHLIB.cc) $(LD_SONAME) $(OUTOPT)$@ $^ $(LIBS) |
4388f060 A |
139 | ifeq ($(ENABLE_RPATH),YES) |
140 | ifneq ($(wildcard $(libdir)/$(MIDDLE_SO_TARGET)),) | |
141 | $(warning RPATH warning: --enable-rpath means test programs may use existing $(libdir)/$(MIDDLE_SO_TARGET)) | |
142 | endif | |
143 | endif | |
b75a7d8f A |
144 | endif |
145 | ||
146 | ifeq (,$(MAKECMDGOALS)) | |
147 | -include $(DEPS) | |
148 | else | |
149 | ifneq ($(patsubst %clean,,$(MAKECMDGOALS)),) | |
150 | -include $(DEPS) | |
151 | endif | |
152 | endif | |
73c04bcf | 153 |