]>
Commit | Line | Data |
---|---|---|
73c04bcf A |
1 | #****************************************************************************** |
2 | # | |
b331163b | 3 | # Copyright (C) 1999-2014, International Business Machines |
73c04bcf A |
4 | # Corporation and others. All Rights Reserved. |
5 | # | |
6 | #****************************************************************************** | |
b75a7d8f A |
7 | ## Makefile.in for ICU - layout |
8 | ||
73c04bcf | 9 | ## Source directory information |
b75a7d8f A |
10 | srcdir = @srcdir@ |
11 | top_srcdir = @top_srcdir@ | |
12 | ||
13 | top_builddir = .. | |
14 | ||
73c04bcf | 15 | ## All the flags and other definitions are included here. |
b75a7d8f A |
16 | include $(top_builddir)/icudefs.mk |
17 | ||
18 | ## Build directory information | |
19 | subdir = layoutex | |
20 | ||
21 | ## Extra files to remove for 'make clean' | |
374ca955 | 22 | CLEANFILES = *~ $(DEPS) $(IMPORT_LIB) $(MIDDLE_IMPORT_LIB) $(FINAL_IMPORT_LIB) |
b75a7d8f A |
23 | |
24 | ## Target information | |
25 | ||
374ca955 | 26 | TARGET_STUBNAME=$(LAYOUTEX_STUBNAME) |
b75a7d8f A |
27 | |
28 | ifneq ($(ENABLE_STATIC),) | |
374ca955 | 29 | TARGET = $(LIBDIR)/$(LIBSICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX).$(A) |
b75a7d8f A |
30 | endif |
31 | ||
32 | ifneq ($(ENABLE_SHARED),) | |
374ca955 | 33 | SO_TARGET = $(LIBDIR)/$(LIBICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX).$(SO) |
73c04bcf | 34 | ALL_SO_TARGETS = $(SO_TARGET) $(MIDDLE_SO_TARGET) $(FINAL_SO_TARGET) $(SHARED_OBJECT) |
374ca955 A |
35 | |
36 | ifeq ($(ENABLE_SO_VERSION_DATA),1) | |
37 | SO_VERSION_DATA = layoutex.res | |
b75a7d8f A |
38 | endif |
39 | ||
374ca955 A |
40 | ifeq ($(OS390BATCH),1) |
41 | BATCH_TARGET = $(BATCH_LAYOUTEX_TARGET) | |
42 | BATCH_LIBS = $(BATCH_LIBICUUC) $(BATCH_LIBICULE) -lm | |
43 | endif # OS390BATCH | |
44 | ||
45 | endif # ENABLE_SHARED | |
46 | ||
47 | ALL_TARGETS = $(TARGET) $(ALL_SO_TARGETS) $(BATCH_TARGET) | |
b75a7d8f A |
48 | |
49 | DYNAMICCPPFLAGS = $(SHAREDLIBCPPFLAGS) | |
50 | DYNAMICCFLAGS = $(SHAREDLIBCFLAGS) | |
51 | DYNAMICCXXFLAGS = $(SHAREDLIBCXXFLAGS) | |
46f4442e A |
52 | CFLAGS += $(LIBCFLAGS) |
53 | CXXFLAGS += $(LIBCXXFLAGS) | |
b75a7d8f | 54 | |
b331163b A |
55 | |
56 | ifeq ($(USING_ICULEHB),no) | |
57 | # cppflags: load .. so that #include <layout/...> works | |
58 | ICULE_CFLAGS=-I$(srcdir)/.. | |
59 | else | |
60 | ICULE_CFLAGS=$(ICULEHB_CFLAGS) | |
61 | endif | |
62 | ||
63 | CPPFLAGS += -I$(srcdir) -I$(srcdir)/unicode -I$(top_srcdir)/common $(ICULE_CFLAGS) $(LIBCPPFLAGS) | |
b75a7d8f | 64 | DEFS += -DU_LAYOUTEX_IMPLEMENTATION |
73c04bcf | 65 | LDFLAGS += $(LDFLAGSICULX) |
b75a7d8f A |
66 | LIBS = $(LIBICUUC) $(LIBICULE) $(DEFAULT_LIBS) |
67 | ||
68 | OBJECTS = ParagraphLayout.o \ | |
69 | RunArrays.o \ | |
46f4442e A |
70 | LXUtilities.o \ |
71 | playout.o \ | |
72 | plruns.o | |
b75a7d8f | 73 | |
73c04bcf | 74 | ## Header files to install |
46f4442e | 75 | HEADERS= $(srcdir)/layout/ParagraphLayout.h $(srcdir)/layout/RunArrays.h $(srcdir)/layout/playout.h $(srcdir)/layout/plruns.h |
73c04bcf | 76 | |
b75a7d8f A |
77 | STATIC_OBJECTS = $(OBJECTS:.o=.$(STATIC_O)) |
78 | ||
79 | DEPS = $(OBJECTS:.o=.d) | |
80 | ||
73c04bcf | 81 | -include Makefile.local |
b75a7d8f A |
82 | |
83 | ## List of phony targets | |
84 | .PHONY : all all-local install install-local clean clean-local \ | |
85 | distclean distclean-local install-library install-headers dist \ | |
4388f060 | 86 | dist-local check check-local check-exhaustive |
b75a7d8f A |
87 | |
88 | ## Clear suffix list | |
89 | .SUFFIXES : | |
90 | ||
91 | ## List of standard targets | |
92 | all: all-local | |
93 | install: install-local | |
94 | clean: clean-local | |
95 | distclean : distclean-local | |
96 | dist: dist-local | |
97 | check: all check-local | |
98 | ||
4388f060 A |
99 | check-exhaustive: check |
100 | ||
b75a7d8f A |
101 | all-local: $(ALL_TARGETS) |
102 | ||
73c04bcf | 103 | install-local: install-headers install-library |
b331163b A |
104 | ifneq ($(ICULE_CFLAGS),) |
105 | @echo "Installing icu-lx.pc" | |
106 | $(MAKE) ALL_PKGCONFIG_SUFFIX=lx -C .. install-pkgconfig | |
107 | endif | |
b75a7d8f A |
108 | |
109 | install-library: all-local | |
110 | $(MKINSTALLDIRS) $(DESTDIR)$(libdir) | |
111 | ifneq ($(ENABLE_STATIC),) | |
374ca955 | 112 | $(INSTALL-L) $(TARGET) $(DESTDIR)$(libdir) |
b75a7d8f A |
113 | endif |
114 | ifneq ($(ENABLE_SHARED),) | |
374ca955 | 115 | $(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(libdir) |
b75a7d8f | 116 | ifneq ($(FINAL_SO_TARGET),$(SO_TARGET)) |
374ca955 | 117 | cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(SO_TARGET)) |
b75a7d8f | 118 | ifneq ($(FINAL_SO_TARGET),$(MIDDLE_SO_TARGET)) |
374ca955 | 119 | cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(MIDDLE_SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(MIDDLE_SO_TARGET)) |
b75a7d8f A |
120 | endif |
121 | endif | |
b75a7d8f | 122 | ifneq ($(IMPORT_LIB_EXT),) |
374ca955 A |
123 | $(INSTALL-L) $(FINAL_IMPORT_LIB) $(DESTDIR)$(libdir) |
124 | ifneq ($(IMPORT_LIB),$(FINAL_IMPORT_LIB)) | |
73c04bcf | 125 | cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(IMPORT_LIB)) && ln -s $(notdir $(FINAL_IMPORT_LIB)) $(notdir $(IMPORT_LIB)) |
374ca955 | 126 | endif |
b75a7d8f | 127 | ifneq ($(MIDDLE_IMPORT_LIB),$(FINAL_IMPORT_LIB)) |
374ca955 | 128 | cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(MIDDLE_IMPORT_LIB)) && ln -s $(notdir $(FINAL_IMPORT_LIB)) $(notdir $(MIDDLE_IMPORT_LIB)) |
b75a7d8f A |
129 | endif |
130 | endif | |
46f4442e | 131 | endif |
b75a7d8f | 132 | |
b75a7d8f A |
133 | install-headers: |
134 | $(MKINSTALLDIRS) $(DESTDIR)$(includedir)/layout | |
135 | @for file in $(HEADERS); do \ | |
136 | echo "$(INSTALL_DATA) $$file $(DESTDIR)$(includedir)/layout"; \ | |
137 | $(INSTALL_DATA) $$file $(DESTDIR)$(includedir)/layout || exit; \ | |
138 | done | |
139 | ||
140 | dist-local: | |
141 | ||
142 | clean-local: | |
143 | test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES) | |
73c04bcf | 144 | $(RMV) $(OBJECTS) $(STATIC_OBJECTS) $(ALL_TARGETS) $(SO_VERSION_DATA) |
b75a7d8f A |
145 | |
146 | distclean-local: clean-local | |
147 | $(RMV) Makefile | |
148 | ||
149 | check-local: | |
150 | ||
151 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status | |
152 | cd $(top_builddir) \ | |
153 | && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status | |
154 | ||
155 | ifneq ($(ENABLE_STATIC),) | |
46f4442e A |
156 | $(TARGET): $(STATIC_OBJECTS) |
157 | $(AR) $(ARFLAGS) $(AR_OUTOPT)$@ $^ | |
b75a7d8f A |
158 | $(RANLIB) $@ |
159 | endif | |
160 | ||
161 | ifneq ($(ENABLE_SHARED),) | |
73c04bcf | 162 | $(SHARED_OBJECT): $(OBJECTS) $(SO_VERSION_DATA) |
b75a7d8f | 163 | $(SHLIB.cc) $(LD_SONAME) $(OUTOPT)$@ $^ $(LIBS) |
4388f060 A |
164 | ifeq ($(ENABLE_RPATH),YES) |
165 | ifneq ($(wildcard $(libdir)/$(MIDDLE_SO_TARGET)),) | |
166 | $(warning RPATH warning: --enable-rpath means test programs may use existing $(libdir)/$(MIDDLE_SO_TARGET)) | |
167 | endif | |
168 | endif | |
374ca955 A |
169 | |
170 | ifeq ($(OS390BATCH),1) | |
73c04bcf | 171 | $(BATCH_TARGET):$(OBJECTS) |
374ca955 A |
172 | $(SHLIB.cc) $(LD_SONAME) $(OUTOPT)$@ $^ $(BATCH_LIBS) |
173 | endif # OS390BATCH | |
73c04bcf | 174 | endif # ENABLE_SHARED |
b75a7d8f A |
175 | |
176 | ifeq (,$(MAKECMDGOALS)) | |
177 | -include $(DEPS) | |
178 | else | |
179 | ifneq ($(patsubst %clean,,$(MAKECMDGOALS)),) | |
180 | -include $(DEPS) | |
181 | endif | |
182 | endif | |
183 |