]> git.saurik.com Git - apple/icu.git/blob - icuSources/tools/toolutil/Makefile.in
ICU-400.37.tar.gz
[apple/icu.git] / icuSources / tools / toolutil / Makefile.in
1 #******************************************************************************
2 #
3 # Copyright (C) 1999-2007, 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
11 srcdir = @srcdir@
12 top_srcdir = @top_srcdir@
13
14 top_builddir = ../..
15
16 ## All the flags and other definitions are included here.
17 include $(top_builddir)/icudefs.mk
18
19 ## Build directory information
20 subdir = tools/toolutil
21
22 ## Extra files to remove for 'make clean'
23 CLEANFILES = *~ $(DEPS) $(IMPORT_LIB) $(MIDDLE_IMPORT_LIB) $(FINAL_IMPORT_LIB)
24
25 ## Target information
26
27 TARGET_STUBNAME=$(TOOLUTIL_STUBNAME)
28
29 ifneq ($(ENABLE_STATIC),)
30 TARGET = $(LIBDIR)/$(LIBSICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX).$(A)
31 endif
32
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)
36 endif
37
38 ALL_TARGETS = $(TARGET) $(ALL_SO_TARGETS)
39
40 DYNAMICCPPFLAGS = $(SHAREDLIBCPPFLAGS)
41 DYNAMICCFLAGS = $(SHAREDLIBCFLAGS)
42 DYNAMICCXXFLAGS = $(SHAREDLIBCXXFLAGS)
43 CFLAGS += $(LIBCFLAGS)
44 CXXFLAGS += $(LIBCXXFLAGS)
45
46 ifneq ($(top_builddir),$(top_srcdir))
47 CPPFLAGS += -I$(top_builddir)/common
48 endif
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)
53
54 OBJECTS = filestrm.o package.o pkgitems.o propsvec.o swapimpl.o toolutil.o unewdata.o \
55 ucm.o ucmstate.o uoptions.o uparse.o \
56 ucbuf.o xmlparser.o writesrc.o
57
58 STATIC_OBJECTS = $(OBJECTS:.o=.$(STATIC_O))
59
60 DEPS = $(OBJECTS:.o=.d)
61
62 -include Makefile.local
63
64 ## List of phony targets
65 .PHONY : all all-local install install-local clean clean-local \
66 distclean distclean-local install-library dist \
67 dist-local check check-local
68
69 ## Clear suffix list
70 .SUFFIXES :
71
72 ## List of standard targets
73 all: all-local
74 install: install-local
75 clean: clean-local
76 distclean : distclean-local
77 dist: dist-local
78 check: all check-local
79
80 all-local: $(ALL_TARGETS)
81
82 install-local: install-library
83
84 install-library: all-local
85 $(MKINSTALLDIRS) $(DESTDIR)$(libdir)
86 ifneq ($(ENABLE_SHARED),)
87 $(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(libdir)
88 ifneq ($(FINAL_SO_TARGET),$(SO_TARGET))
89 cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(SO_TARGET))
90 ifneq ($(FINAL_SO_TARGET),$(MIDDLE_SO_TARGET))
91 cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(MIDDLE_SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(MIDDLE_SO_TARGET))
92 endif
93 endif
94 endif
95
96 dist-local:
97
98 clean-local:
99 test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES)
100 $(RMV) $(OBJECTS) $(STATIC_OBJECTS) $(ALL_TARGETS)
101
102 distclean-local: clean-local
103 $(RMV) Makefile
104
105 check-local: all-local
106
107 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
108 cd $(top_builddir) \
109 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
110
111 ifneq ($(ENABLE_STATIC),)
112 $(TARGET): $(STATIC_OBJECTS)
113 $(AR) $(ARFLAGS) $(AR_OUTOPT)$@ $^
114 $(RANLIB) $@
115 endif
116
117 ifneq ($(ENABLE_SHARED),)
118 $(SHARED_OBJECT): $(OBJECTS)
119 $(SHLIB.cc) $(LD_SONAME) $(OUTOPT)$@ $^ $(LIBS)
120 endif
121
122 ifeq (,$(MAKECMDGOALS))
123 -include $(DEPS)
124 else
125 ifneq ($(patsubst %clean,,$(MAKECMDGOALS)),)
126 -include $(DEPS)
127 endif
128 endif
129