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