1 #******************************************************************************
3 # Copyright (C) 1999-2010, International Business Machines
4 # Corporation and others. All Rights Reserved.
6 #******************************************************************************
7 ## Makefile.in for ICU - tools/toolutil
10 ## Source directory information
12 top_srcdir = @top_srcdir@
16 ## All the flags and other definitions are included here.
17 include $(top_builddir)/icudefs.mk
19 ## Build directory information
20 subdir = tools/toolutil
22 ## Extra files to remove for 'make clean'
23 CLEANFILES = *~ $(DEPS) $(IMPORT_LIB) $(MIDDLE_IMPORT_LIB) $(FINAL_IMPORT_LIB)
27 TARGET_STUBNAME=$(TOOLUTIL_STUBNAME)
29 ifneq ($(ENABLE_STATIC),)
30 TARGET = $(LIBDIR)/$(LIBSICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX).$(A)
33 ifneq ($(ENABLE_SHARED),)
34 SO_TARGET = $(LIBDIR)/$(LIBICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX).$(SO)
35 ALL_SO_TARGETS = $(SO_TARGET) $(MIDDLE_SO_TARGET) $(FINAL_SO_TARGET) $(SHARED_OBJECT)
38 ALL_TARGETS = $(TARGET) $(ALL_SO_TARGETS)
40 DYNAMICCPPFLAGS = $(SHAREDLIBCPPFLAGS)
41 DYNAMICCFLAGS = $(SHAREDLIBCFLAGS)
42 DYNAMICCXXFLAGS = $(SHAREDLIBCXXFLAGS)
43 CFLAGS += $(LIBCFLAGS)
44 CXXFLAGS += $(LIBCXXFLAGS)
46 ifneq ($(top_builddir),$(top_srcdir))
47 CPPFLAGS += -I$(top_builddir)/common
49 CPPFLAGS += -I$(top_srcdir)/common -I$(top_srcdir)/i18n $(LIBCPPFLAGS)
50 DEFS += -DU_TOOLUTIL_IMPLEMENTATION
51 LDFLAGS += $(LDFLAGSICUTOOLUTIL)
52 LIBS = $(LIBICUI18N) $(LIBICUUC) $(DEFAULT_LIBS)
54 OBJECTS = filestrm.o package.o pkgitems.o swapimpl.o toolutil.o unewdata.o \
55 ucm.o ucmstate.o uoptions.o uparse.o \
56 ucbuf.o xmlparser.o writesrc.o \
57 pkg_icu.o pkg_genc.o pkg_gencmn.o flagparser.o filetools.o \
58 udbgutil.o dbgutil.o ucln_tu.o
60 STATIC_OBJECTS = $(OBJECTS:.o=.$(STATIC_O))
62 DEPS = $(OBJECTS:.o=.d)
64 -include Makefile.local
66 ## List of phony targets
67 .PHONY : all all-local install install-local clean clean-local \
68 distclean distclean-local install-library dist \
69 dist-local check check-local
74 ## List of standard targets
76 install: install-local
78 distclean : distclean-local
80 check: all check-local
82 all-local: $(ALL_TARGETS)
84 install-local: install-library
86 install-library: all-local
87 $(MKINSTALLDIRS) $(DESTDIR)$(libdir)
88 ifneq ($(ENABLE_STATIC),)
89 $(INSTALL-L) $(TARGET) $(DESTDIR)$(libdir)
91 ifneq ($(ENABLE_SHARED),)
92 $(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(libdir)
93 ifneq ($(FINAL_SO_TARGET),$(SO_TARGET))
94 cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(SO_TARGET))
95 ifneq ($(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))
99 ifneq ($(IMPORT_LIB_EXT),)
100 $(INSTALL-L) $(FINAL_IMPORT_LIB) $(DESTDIR)$(libdir)
101 ifneq ($(IMPORT_LIB),$(FINAL_IMPORT_LIB))
102 cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(IMPORT_LIB)) && ln -s $(notdir $(FINAL_IMPORT_LIB)) $(notdir $(IMPORT_LIB))
104 ifneq ($(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))
113 test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES)
114 $(RMV) $(OBJECTS) $(STATIC_OBJECTS) $(ALL_TARGETS)
116 distclean-local: clean-local
119 check-local: all-local
121 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
123 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
125 ifneq ($(ENABLE_STATIC),)
126 $(TARGET): $(STATIC_OBJECTS)
127 $(AR) $(ARFLAGS) $(AR_OUTOPT)$@ $^
131 ifneq ($(ENABLE_SHARED),)
132 $(SHARED_OBJECT): $(OBJECTS)
133 $(SHLIB.cc) $(LD_SONAME) $(OUTOPT)$@ $^ $(LIBS)
136 ifeq (,$(MAKECMDGOALS))
139 ifneq ($(patsubst %clean,,$(MAKECMDGOALS)),)