X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/b75a7d8f3b4adbae880cab104ce2c6a50eee4db2..f59164e3d128c7675a4d3934206346a3384e53a5:/icuSources/tools/toolutil/Makefile.in diff --git a/icuSources/tools/toolutil/Makefile.in b/icuSources/tools/toolutil/Makefile.in index b41a9e95..1fb42ed6 100644 --- a/icuSources/tools/toolutil/Makefile.in +++ b/icuSources/tools/toolutil/Makefile.in @@ -1,6 +1,9 @@ -## Copyright (C) 1999-2003, International Business Machines Corporation -## and others. All Rights Reserved. - +#****************************************************************************** +# +# Copyright (C) 1999-2014, International Business Machines +# Corporation and others. All Rights Reserved. +# +#****************************************************************************** ## Makefile.in for ICU - tools/toolutil ## Steven R. Loomis @@ -10,23 +13,26 @@ top_srcdir = @top_srcdir@ top_builddir = ../.. +## All the flags and other definitions are included here. include $(top_builddir)/icudefs.mk ## Build directory information subdir = tools/toolutil ## Extra files to remove for 'make clean' -CLEANFILES = *~ $(DEPS) +CLEANFILES = *~ $(DEPS) $(IMPORT_LIB) $(MIDDLE_IMPORT_LIB) $(FINAL_IMPORT_LIB) ## Target information +TARGET_STUBNAME=$(TOOLUTIL_STUBNAME) + ifneq ($(ENABLE_STATIC),) -TARGET = $(LIBICU)toolutil$(ICULIBSUFFIX).a +TARGET = $(LIBDIR)/$(LIBSICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX).$(A) endif ifneq ($(ENABLE_SHARED),) -SO_TARGET = $(LIBICU)toolutil$(ICULIBSUFFIX).$(SO) -ALL_SO_TARGETS = $(SO_TARGET) $(MIDDLE_SO_TARGET) $(FINAL_SO_TARGET) +SO_TARGET = $(LIBDIR)/$(LIBICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX).$(SO) +ALL_SO_TARGETS = $(SO_TARGET) $(MIDDLE_SO_TARGET) $(FINAL_SO_TARGET) $(SHARED_OBJECT) endif ALL_TARGETS = $(TARGET) $(ALL_SO_TARGETS) @@ -34,19 +40,36 @@ ALL_TARGETS = $(TARGET) $(ALL_SO_TARGETS) DYNAMICCPPFLAGS = $(SHAREDLIBCPPFLAGS) DYNAMICCFLAGS = $(SHAREDLIBCFLAGS) DYNAMICCXXFLAGS = $(SHAREDLIBCXXFLAGS) +CFLAGS += $(LIBCFLAGS) +CXXFLAGS += $(LIBCXXFLAGS) + +CPPFLAGS += -I$(top_srcdir)/common -I$(top_srcdir)/i18n $(LIBCPPFLAGS) -CPPFLAGS += -I$(top_builddir)/common -I$(top_srcdir)/common -I$(top_srcdir)/i18n -I$(top_srcdir)/tools/ctestfw $(LIBCPPFLAGS) -LIBS = $(LIBICUUC) $(DEFAULT_LIBS) +# from icuinfo +CPPFLAGS+= "-DU_BUILD=\"@build@\"" "-DU_HOST=\"@host@\"" "-DU_CC=\"@CC@\"" "-DU_CXX=\"@CXX@\"" +CPPFLAGS += -DUNISTR_FROM_CHAR_EXPLICIT=explicit -DUNISTR_FROM_STRING_EXPLICIT=explicit -OBJECTS = toolutil.o unewdata.o ucmpwrit.o uoptions.o uparse.o ucbuf.o uperf.o +DEFS += -DU_TOOLUTIL_IMPLEMENTATION +LDFLAGS += $(LDFLAGSICUTOOLUTIL) +LIBS = $(LIBICUI18N) $(LIBICUUC) $(DEFAULT_LIBS) + +OBJECTS = filestrm.o package.o pkgitems.o swapimpl.o toolutil.o unewdata.o \ +collationinfo.o denseranges.o \ +ucm.o ucmstate.o uoptions.o uparse.o \ +ucbuf.o xmlparser.o writesrc.o \ +pkg_icu.o pkg_genc.o pkg_gencmn.o ppucd.o flagparser.o filetools.o \ +udbgutil.o dbgutil.o ucln_tu.o STATIC_OBJECTS = $(OBJECTS:.o=.$(STATIC_O)) DEPS = $(OBJECTS:.o=.d) +-include Makefile.local + ## List of phony targets .PHONY : all all-local install install-local clean clean-local \ -distclean distclean-local dist dist-local check check-local install-library +distclean distclean-local install-library dist \ +dist-local check check-local ## Clear suffix list .SUFFIXES : @@ -66,13 +89,24 @@ install-local: install-library install-library: all-local $(MKINSTALLDIRS) $(DESTDIR)$(libdir) ifneq ($(ENABLE_STATIC),) - $(INSTALL-L) $(TARGET) $(DESTDIR)$(libdir)/$(TARGET) + $(INSTALL-L) $(TARGET) $(DESTDIR)$(libdir) endif ifneq ($(ENABLE_SHARED),) - $(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(libdir)/$(FINAL_SO_TARGET) + $(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(libdir) ifneq ($(FINAL_SO_TARGET),$(SO_TARGET)) - cd $(DESTDIR)$(libdir) && $(RM) $(MIDDLE_SO_TARGET) && ln -s $(FINAL_SO_TARGET) $(MIDDLE_SO_TARGET) - cd $(DESTDIR)$(libdir) && $(RM) $(SO_TARGET) && ln -s $(FINAL_SO_TARGET) $(SO_TARGET) + cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(SO_TARGET)) +ifneq ($(FINAL_SO_TARGET),$(MIDDLE_SO_TARGET)) + cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(MIDDLE_SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(MIDDLE_SO_TARGET)) +endif +endif +ifneq ($(IMPORT_LIB_EXT),) + $(INSTALL-L) $(FINAL_IMPORT_LIB) $(DESTDIR)$(libdir) +ifneq ($(IMPORT_LIB),$(FINAL_IMPORT_LIB)) + cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(IMPORT_LIB)) && ln -s $(notdir $(FINAL_IMPORT_LIB)) $(notdir $(IMPORT_LIB)) +endif +ifneq ($(MIDDLE_IMPORT_LIB),$(FINAL_IMPORT_LIB)) + cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(MIDDLE_IMPORT_LIB)) && ln -s $(notdir $(FINAL_IMPORT_LIB)) $(notdir $(MIDDLE_IMPORT_LIB)) +endif endif endif @@ -92,13 +126,19 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status ifneq ($(ENABLE_STATIC),) -$(TARGET): $(TARGET)($(STATIC_OBJECTS)) +$(TARGET): $(STATIC_OBJECTS) + $(AR) $(ARFLAGS) $(AR_OUTOPT)$@ $^ $(RANLIB) $@ endif ifneq ($(ENABLE_SHARED),) -$(FINAL_SO_TARGET): $(OBJECTS) +$(SHARED_OBJECT): $(OBJECTS) $(SHLIB.cc) $(LD_SONAME) $(OUTOPT)$@ $^ $(LIBS) +ifeq ($(ENABLE_RPATH),YES) +ifneq ($(wildcard $(libdir)/$(MIDDLE_SO_TARGET)),) + $(warning RPATH warning: --enable-rpath means test programs may use existing $(libdir)/$(MIDDLE_SO_TARGET)) +endif +endif endif ifeq (,$(MAKECMDGOALS)) @@ -108,3 +148,4 @@ ifneq ($(patsubst %clean,,$(MAKECMDGOALS)),) -include $(DEPS) endif endif +