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