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