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