1 # Copyright (C) 2016 and later: Unicode, Inc. and others.
2 # License & terms of use: http://www.unicode.org/copyright.html
3 #******************************************************************************
5 # Copyright (C) 1999-2014, International Business Machines
6 # Corporation and others. All Rights Reserved.
8 #******************************************************************************
9 ## Makefile.in for ICU - layout
11 ## Source directory information
13 top_srcdir = @top_srcdir@
17 ## All the flags and other definitions are included here.
18 include $(top_builddir)/icudefs.mk
20 ## Build directory information
23 ## Extra files to remove for 'make clean'
24 CLEANFILES = *~ $(DEPS) $(IMPORT_LIB) $(MIDDLE_IMPORT_LIB) $(FINAL_IMPORT_LIB)
28 TARGET_STUBNAME=$(LAYOUTEX_STUBNAME)
30 ifneq ($(ENABLE_STATIC),)
31 TARGET = $(LIBDIR)/$(LIBSICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX).$(A)
34 ifneq ($(ENABLE_SHARED),)
35 SO_TARGET = $(LIBDIR)/$(LIBICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX).$(SO)
36 ALL_SO_TARGETS = $(SO_TARGET) $(MIDDLE_SO_TARGET) $(FINAL_SO_TARGET) $(SHARED_OBJECT)
38 ifeq ($(ENABLE_SO_VERSION_DATA),1)
39 SO_VERSION_DATA = layoutex.res
42 ifeq ($(OS390BATCH),1)
43 BATCH_TARGET = $(BATCH_LAYOUTEX_TARGET)
44 BATCH_LIBS = $(BATCH_LIBICUUC) $(BATCH_LIBICULE) -lm
49 ALL_TARGETS = $(TARGET) $(ALL_SO_TARGETS) $(BATCH_TARGET)
51 DYNAMICCPPFLAGS = $(SHAREDLIBCPPFLAGS)
52 DYNAMICCFLAGS = $(SHAREDLIBCFLAGS)
53 DYNAMICCXXFLAGS = $(SHAREDLIBCXXFLAGS)
54 CFLAGS += $(LIBCFLAGS)
55 CXXFLAGS += $(LIBCXXFLAGS)
58 ifeq ($(USING_ICULEHB),no)
59 # cppflags: load .. so that #include <layout/...> works
60 ICULE_CFLAGS=-I$(srcdir)/..
62 ICULE_CFLAGS=$(ICULEHB_CFLAGS)
65 CPPFLAGS += -I$(srcdir) -I$(srcdir)/unicode -I$(top_srcdir)/common $(ICULE_CFLAGS) $(LIBCPPFLAGS)
66 DEFS += -DU_LAYOUTEX_IMPLEMENTATION
67 LDFLAGS += $(LDFLAGSICULX)
68 LIBS = $(LIBICUUC) $(LIBICULE) $(DEFAULT_LIBS)
70 OBJECTS = ParagraphLayout.o \
76 ## Header files to install
77 HEADERS= $(srcdir)/layout/ParagraphLayout.h $(srcdir)/layout/RunArrays.h $(srcdir)/layout/playout.h $(srcdir)/layout/plruns.h
79 STATIC_OBJECTS = $(OBJECTS:.o=.$(STATIC_O))
81 DEPS = $(OBJECTS:.o=.d)
83 -include Makefile.local
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 \
88 dist-local check check-local check-exhaustive
93 ## List of standard targets
95 install: install-local
97 distclean : distclean-local
99 check: all check-local
101 check-exhaustive: check
103 all-local: $(ALL_TARGETS)
105 install-local: install-headers install-library
106 ifneq ($(ICULE_CFLAGS),)
107 @echo "Installing icu-lx.pc"
108 $(MAKE) ALL_PKGCONFIG_SUFFIX=lx -C .. install-pkgconfig
111 install-library: all-local
112 $(MKINSTALLDIRS) $(DESTDIR)$(libdir)
113 ifneq ($(ENABLE_STATIC),)
114 $(INSTALL-L) $(TARGET) $(DESTDIR)$(libdir)
116 ifneq ($(ENABLE_SHARED),)
117 $(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(libdir)
118 ifneq ($(FINAL_SO_TARGET),$(SO_TARGET))
119 cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(SO_TARGET))
120 ifneq ($(FINAL_SO_TARGET),$(MIDDLE_SO_TARGET))
121 cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(MIDDLE_SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(MIDDLE_SO_TARGET))
124 ifneq ($(IMPORT_LIB_EXT),)
125 $(INSTALL-L) $(FINAL_IMPORT_LIB) $(DESTDIR)$(libdir)
126 ifneq ($(IMPORT_LIB),$(FINAL_IMPORT_LIB))
127 cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(IMPORT_LIB)) && ln -s $(notdir $(FINAL_IMPORT_LIB)) $(notdir $(IMPORT_LIB))
129 ifneq ($(MIDDLE_IMPORT_LIB),$(FINAL_IMPORT_LIB))
130 cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(MIDDLE_IMPORT_LIB)) && ln -s $(notdir $(FINAL_IMPORT_LIB)) $(notdir $(MIDDLE_IMPORT_LIB))
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; \
145 test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES)
146 $(RMV) $(OBJECTS) $(STATIC_OBJECTS) $(ALL_TARGETS) $(SO_VERSION_DATA)
148 distclean-local: clean-local
153 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
155 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
157 ifneq ($(ENABLE_STATIC),)
158 $(TARGET): $(STATIC_OBJECTS)
159 $(AR) $(ARFLAGS) $(AR_OUTOPT)$@ $^
163 ifneq ($(ENABLE_SHARED),)
164 $(SHARED_OBJECT): $(OBJECTS) $(SO_VERSION_DATA)
165 $(SHLIB.cc) $(LD_SONAME) $(OUTOPT)$@ $^ $(LIBS)
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))
172 ifeq ($(OS390BATCH),1)
173 $(BATCH_TARGET):$(OBJECTS)
174 $(SHLIB.cc) $(LD_SONAME) $(OUTOPT)$@ $^ $(BATCH_LIBS)
176 endif # ENABLE_SHARED
178 ifeq (,$(MAKECMDGOALS))
181 ifneq ($(patsubst %clean,,$(MAKECMDGOALS)),)