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