|
1 #****************************************************************************** |
|
2 # |
|
3 # Copyright (C) 1999-2011, 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 CPPFLAGS += -I$(top_srcdir)/common -I$(top_srcdir)/i18n $(LIBCPPFLAGS) |
|
47 |
|
48 # from icuinfo |
|
49 CPPFLAGS+= "-DU_BUILD=\"@build@\"" "-DU_HOST=\"@host@\"" "-DU_CC=\"@CC@\"" "-DU_CXX=\"@CXX@\"" |
|
50 |
|
51 |
|
52 DEFS += -DU_TOOLUTIL_IMPLEMENTATION |
|
53 LDFLAGS += $(LDFLAGSICUTOOLUTIL) |
|
54 LIBS = $(LIBICUI18N) $(LIBICUUC) $(DEFAULT_LIBS) |
|
55 |
|
56 OBJECTS = filestrm.o package.o pkgitems.o swapimpl.o toolutil.o unewdata.o \ |
|
57 denseranges.o \ |
|
58 ucm.o ucmstate.o uoptions.o uparse.o \ |
|
59 ucbuf.o xmlparser.o writesrc.o \ |
|
60 pkg_icu.o pkg_genc.o pkg_gencmn.o ppucd.o flagparser.o filetools.o \ |
|
61 udbgutil.o dbgutil.o ucln_tu.o |
|
62 |
|
63 STATIC_OBJECTS = $(OBJECTS:.o=.$(STATIC_O)) |
|
64 |
|
65 DEPS = $(OBJECTS:.o=.d) |
|
66 |
|
67 -include Makefile.local |
|
68 |
|
69 ## List of phony targets |
|
70 .PHONY : all all-local install install-local clean clean-local \ |
|
71 distclean distclean-local install-library dist \ |
|
72 dist-local check check-local |
|
73 |
|
74 ## Clear suffix list |
|
75 .SUFFIXES : |
|
76 |
|
77 ## List of standard targets |
|
78 all: all-local |
|
79 install: install-local |
|
80 clean: clean-local |
|
81 distclean : distclean-local |
|
82 dist: dist-local |
|
83 check: all check-local |
|
84 |
|
85 all-local: $(ALL_TARGETS) |
|
86 |
|
87 install-local: install-library |
|
88 |
|
89 install-library: all-local |
|
90 $(MKINSTALLDIRS) $(DESTDIR)$(libdir) |
|
91 ifneq ($(ENABLE_STATIC),) |
|
92 $(INSTALL-L) $(TARGET) $(DESTDIR)$(libdir) |
|
93 endif |
|
94 ifneq ($(ENABLE_SHARED),) |
|
95 $(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(libdir) |
|
96 ifneq ($(FINAL_SO_TARGET),$(SO_TARGET)) |
|
97 cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(SO_TARGET)) |
|
98 ifneq ($(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)) |
|
100 endif |
|
101 endif |
|
102 ifneq ($(IMPORT_LIB_EXT),) |
|
103 $(INSTALL-L) $(FINAL_IMPORT_LIB) $(DESTDIR)$(libdir) |
|
104 ifneq ($(IMPORT_LIB),$(FINAL_IMPORT_LIB)) |
|
105 cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(IMPORT_LIB)) && ln -s $(notdir $(FINAL_IMPORT_LIB)) $(notdir $(IMPORT_LIB)) |
|
106 endif |
|
107 ifneq ($(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)) |
|
109 endif |
|
110 endif |
|
111 endif |
|
112 |
|
113 dist-local: |
|
114 |
|
115 clean-local: |
|
116 test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES) |
|
117 $(RMV) $(OBJECTS) $(STATIC_OBJECTS) $(ALL_TARGETS) |
|
118 |
|
119 distclean-local: clean-local |
|
120 $(RMV) Makefile |
|
121 |
|
122 check-local: all-local |
|
123 |
|
124 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status |
|
125 cd $(top_builddir) \ |
|
126 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status |
|
127 |
|
128 ifneq ($(ENABLE_STATIC),) |
|
129 $(TARGET): $(STATIC_OBJECTS) |
|
130 $(AR) $(ARFLAGS) $(AR_OUTOPT)$@ $^ |
|
131 $(RANLIB) $@ |
|
132 endif |
|
133 |
|
134 ifneq ($(ENABLE_SHARED),) |
|
135 $(SHARED_OBJECT): $(OBJECTS) |
|
136 $(SHLIB.cc) $(LD_SONAME) $(OUTOPT)$@ $^ $(LIBS) |
|
137 ifeq ($(ENABLE_RPATH),YES) |
|
138 ifneq ($(wildcard $(libdir)/$(MIDDLE_SO_TARGET)),) |
|
139 $(warning RPATH warning: --enable-rpath means test programs may use existing $(libdir)/$(MIDDLE_SO_TARGET)) |
|
140 endif |
|
141 endif |
|
142 endif |
|
143 |
|
144 ifeq (,$(MAKECMDGOALS)) |
|
145 -include $(DEPS) |
|
146 else |
|
147 ifneq ($(patsubst %clean,,$(MAKECMDGOALS)),) |
|
148 -include $(DEPS) |
|
149 endif |
|
150 endif |
|
151 |