1#******************************************************************************
2#
3#   Copyright (C) 1999-2013, International Business Machines
4#   Corporation and others.  All Rights Reserved.
5#
6#******************************************************************************
7## Makefile.in for ICU - layout
8
9## Source directory information
10srcdir = @srcdir@
11top_srcdir = @top_srcdir@
12
13top_builddir = ..
14
15## All the flags and other definitions are included here.
16include $(top_builddir)/icudefs.mk
17
18## Build directory information
19subdir = layout
20
21## Extra files to remove for 'make clean'
22CLEANFILES = *~ $(DEPS) $(IMPORT_LIB) $(MIDDLE_IMPORT_LIB) $(FINAL_IMPORT_LIB)
23
24## Target information
25
26TARGET_STUBNAME=$(LAYOUT_STUBNAME)
27
28ifneq ($(ENABLE_STATIC),)
29TARGET = $(LIBDIR)/$(LIBSICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX).$(A)
30endif
31
32ifneq ($(ENABLE_SHARED),)
33SO_TARGET = $(LIBDIR)/$(LIBICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX).$(SO)
34ALL_SO_TARGETS = $(SO_TARGET) $(MIDDLE_SO_TARGET) $(FINAL_SO_TARGET) $(SHARED_OBJECT)
35
36ifeq ($(ENABLE_SO_VERSION_DATA),1)
37SO_VERSION_DATA = layout.res
38endif
39
40ifeq ($(OS390BATCH),1)
41BATCH_TARGET = $(BATCH_LAYOUT_TARGET)
42BATCH_LIBS = $(BATCH_LIBICUUC) -lm
43endif   # OS390BATCH
44
45endif   # ENABLE_SHARED
46
47ALL_TARGETS = $(TARGET) $(ALL_SO_TARGETS) $(BATCH_TARGET)
48
49DYNAMICCPPFLAGS = $(SHAREDLIBCPPFLAGS)
50DYNAMICCFLAGS = $(SHAREDLIBCFLAGS)
51DYNAMICCXXFLAGS = $(SHAREDLIBCXXFLAGS)
52CFLAGS += $(LIBCFLAGS)
53CXXFLAGS += $(LIBCXXFLAGS)
54
55CPPFLAGS += -I$(srcdir) -I$(srcdir)/.. -I$(top_srcdir)/common -I$(srcdir)/unicode $(LIBCPPFLAGS)
56DEFS += -DU_LAYOUT_IMPLEMENTATION
57LDFLAGS += $(LDFLAGSICULE)
58LIBS = $(LIBICUUC) $(DEFAULT_LIBS)
59
60OBJECTS =  LEFontInstance.o \
61OpenTypeLayoutEngine.o \
62ThaiLayoutEngine.o \
63ThaiShaping.o \
64ThaiStateTables.o \
65ArabicLayoutEngine.o \
66GXLayoutEngine.o \
67HanLayoutEngine.o \
68IndicLayoutEngine.o \
69LayoutEngine.o \
70ContextualGlyphSubstProc.o \
71IndicRearrangementProcessor.o \
72LigatureSubstProc.o \
73LookupTables.o \
74MorphTables.o \
75NonContextualGlyphSubstProc.o \
76SegmentArrayProcessor.o \
77SegmentSingleProcessor.o \
78SimpleArrayProcessor.o \
79SingleTableProcessor.o \
80StateTableProcessor.o \
81SubtableProcessor.o \
82TrimmedArrayProcessor.o \
83AlternateSubstSubtables.o \
84AnchorTables.o \
85ArabicShaping.o \
86CanonData.o \
87CanonShaping.o \
88ClassDefinitionTables.o \
89ContextualSubstSubtables.o \
90CoverageTables.o \
91CursiveAttachmentSubtables.o \
92DeviceTables.o \
93ExtensionSubtables.o \
94Features.o \
95GDEFMarkFilter.o \
96GlyphDefinitionTables.o \
97GlyphIterator.o \
98GlyphLookupTables.o \
99GlyphPosnLookupProc.o \
100GlyphPositionAdjustments.o \
101GlyphPositioningTables.o \
102GlyphSubstLookupProc.o \
103GlyphSubstitutionTables.o \
104IndicClassTables.o \
105IndicReordering.o \
106LEInsertionList.o \
107LEGlyphStorage.o \
108LigatureSubstSubtables.o \
109LookupProcessor.o \
110Lookups.o \
111MarkArrays.o \
112MarkToBasePosnSubtables.o \
113MarkToLigaturePosnSubtables.o \
114MarkToMarkPosnSubtables.o \
115MirroredCharData.o \
116MPreFixups.o \
117MultipleSubstSubtables.o \
118OpenTypeUtilities.o \
119PairPositioningSubtables.o \
120ScriptAndLanguage.o \
121ScriptAndLanguageTags.o \
122ShapingTypeData.o \
123SinglePositioningSubtables.o \
124SingleSubstitutionSubtables.o \
125SubstitutionLookups.o \
126ValueRecords.o \
127KhmerLayoutEngine.o \
128KhmerReordering.o \
129TibetanLayoutEngine.o \
130TibetanReordering.o \
131HangulLayoutEngine.o \
132KernTable.o \
133loengine.o \
134ContextualGlyphInsertionProc2.o \
135ContextualGlyphSubstProc2.o \
136GXLayoutEngine2.o \
137IndicRearrangementProcessor2.o \
138LigatureSubstProc2.o \
139MorphTables2.o \
140NonContextualGlyphSubstProc2.o \
141SegmentArrayProcessor2.o \
142SegmentSingleProcessor2.o \
143SimpleArrayProcessor2.o \
144SingleTableProcessor2.o \
145StateTableProcessor2.o \
146SubtableProcessor2.o \
147TrimmedArrayProcessor2.o
148
149## Header files to install
150HEADERS= $(srcdir)/LayoutEngine.h $(srcdir)/LE*.h $(srcdir)/loengine.h
151
152STATIC_OBJECTS = $(OBJECTS:.o=.$(STATIC_O))
153
154DEPS = $(OBJECTS:.o=.d)
155
156-include Makefile.local
157
158## List of phony targets
159.PHONY : all all-local install install-local clean clean-local	\
160distclean distclean-local install-library install-headers dist	\
161dist-local check check-local check-exhaustive
162
163## Clear suffix list
164.SUFFIXES :
165
166## List of standard targets
167all: all-local
168install: install-local
169clean: clean-local
170distclean : distclean-local
171dist: dist-local
172check: all check-local
173
174check-exhaustive: check
175
176all-local: $(ALL_TARGETS)
177
178install-local: install-headers install-library
179
180install-library: all-local
181	$(MKINSTALLDIRS) $(DESTDIR)$(libdir)
182ifneq ($(ENABLE_STATIC),)
183	$(INSTALL-L) $(TARGET) $(DESTDIR)$(libdir)
184endif
185ifneq ($(ENABLE_SHARED),)
186	$(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(libdir)
187ifneq ($(FINAL_SO_TARGET),$(SO_TARGET))
188	cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(SO_TARGET))
189ifneq ($(FINAL_SO_TARGET),$(MIDDLE_SO_TARGET))
190	cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(MIDDLE_SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(MIDDLE_SO_TARGET))
191endif
192endif
193ifneq ($(IMPORT_LIB_EXT),)
194	$(INSTALL-L) $(FINAL_IMPORT_LIB) $(DESTDIR)$(libdir)
195ifneq ($(IMPORT_LIB),$(FINAL_IMPORT_LIB))
196	cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(IMPORT_LIB)) && ln -s $(notdir $(FINAL_IMPORT_LIB)) $(notdir $(IMPORT_LIB))
197endif
198ifneq ($(MIDDLE_IMPORT_LIB),$(FINAL_IMPORT_LIB))
199	cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(MIDDLE_IMPORT_LIB)) && ln -s $(notdir $(FINAL_IMPORT_LIB)) $(notdir $(MIDDLE_IMPORT_LIB))
200endif
201endif
202endif
203
204install-headers:
205	$(MKINSTALLDIRS) $(DESTDIR)$(includedir)/layout
206	@for file in $(HEADERS); do \
207	 echo "$(INSTALL_DATA) $$file $(DESTDIR)$(includedir)/layout"; \
208	 $(INSTALL_DATA) $$file $(DESTDIR)$(includedir)/layout || exit; \
209	done
210
211dist-local:
212
213clean-local:
214	test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES)
215	$(RMV) $(OBJECTS) $(STATIC_OBJECTS) $(ALL_TARGETS) $(SO_VERSION_DATA)
216
217distclean-local: clean-local
218	$(RMV) Makefile
219
220check-local:
221
222Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
223	cd $(top_builddir) \
224	 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
225
226ifneq ($(ENABLE_STATIC),)
227$(TARGET): $(STATIC_OBJECTS)
228	$(AR) $(ARFLAGS) $(AR_OUTOPT)$@ $^
229	$(RANLIB) $@
230endif
231
232ifneq ($(ENABLE_SHARED),)
233$(SHARED_OBJECT): $(OBJECTS) $(SO_VERSION_DATA)
234	$(SHLIB.cc) $(LD_SONAME) $(OUTOPT)$@ $^ $(LIBS)
235ifeq ($(ENABLE_RPATH),YES)
236ifneq ($(wildcard $(libdir)/$(MIDDLE_SO_TARGET)),)
237	$(warning RPATH warning: --enable-rpath means test programs may use existing $(libdir)/$(MIDDLE_SO_TARGET))
238endif
239endif
240
241ifeq ($(OS390BATCH),1)
242$(BATCH_TARGET):$(OBJECTS)
243	$(SHLIB.cc) $(LD_SONAME) $(OUTOPT)$@ $^ $(BATCH_LIBS)
244endif   # OS390BATCH
245endif   # ENABLE_SHARED
246
247ifeq (,$(MAKECMDGOALS))
248-include $(DEPS)
249else
250ifneq ($(patsubst %clean,,$(MAKECMDGOALS)),)
251-include $(DEPS)
252endif
253endif
254