1 #******************************************************************************
3 # Copyright (C) 1999-2014, International Business Machines
4 # Corporation and others. All Rights Reserved.
6 #******************************************************************************
7 ## Makefile.in for ICU - layout
9 ## Source directory information
11 top_srcdir = @top_srcdir@
15 ## All the flags and other definitions are included here.
16 include $(top_builddir)/icudefs.mk
18 ## Build directory information
21 ## Extra files to remove for 'make clean'
22 CLEANFILES = *~ $(DEPS) $(IMPORT_LIB) $(MIDDLE_IMPORT_LIB) $(FINAL_IMPORT_LIB)
26 TARGET_STUBNAME=$(LAYOUTEX_STUBNAME)
28 ifneq ($(ENABLE_STATIC),)
29 TARGET = $(LIBDIR)/$(LIBSICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX).$(A)
32 ifneq ($(ENABLE_SHARED),)
33 SO_TARGET = $(LIBDIR)/$(LIBICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX).$(SO)
34 ALL_SO_TARGETS = $(SO_TARGET) $(MIDDLE_SO_TARGET) $(FINAL_SO_TARGET) $(SHARED_OBJECT)
36 ifeq ($(ENABLE_SO_VERSION_DATA),1)
37 SO_VERSION_DATA = layoutex.res
40 ifeq ($(OS390BATCH),1)
41 BATCH_TARGET = $(BATCH_LAYOUTEX_TARGET)
42 BATCH_LIBS = $(BATCH_LIBICUUC) $(BATCH_LIBICULE) -lm
47 ALL_TARGETS = $(TARGET) $(ALL_SO_TARGETS) $(BATCH_TARGET)
49 DYNAMICCPPFLAGS = $(SHAREDLIBCPPFLAGS)
50 DYNAMICCFLAGS = $(SHAREDLIBCFLAGS)
51 DYNAMICCXXFLAGS = $(SHAREDLIBCXXFLAGS)
52 CFLAGS += $(LIBCFLAGS)
53 CXXFLAGS += $(LIBCXXFLAGS)
56 ifeq ($(USING_ICULEHB),no)
57 # cppflags: load .. so that #include <layout/...> works
58 ICULE_CFLAGS=-I$(srcdir)/..
60 ICULE_CFLAGS=$(ICULEHB_CFLAGS)
63 CPPFLAGS += -I$(srcdir) -I$(srcdir)/unicode -I$(top_srcdir)/common $(ICULE_CFLAGS) $(LIBCPPFLAGS)
64 DEFS += -DU_LAYOUTEX_IMPLEMENTATION
65 LDFLAGS += $(LDFLAGSICULX)
66 LIBS = $(LIBICUUC) $(LIBICULE) $(DEFAULT_LIBS)
68 OBJECTS = ParagraphLayout.o \
74 ## Header files to install
75 HEADERS= $(srcdir)/layout/ParagraphLayout.h $(srcdir)/layout/RunArrays.h $(srcdir)/layout/playout.h $(srcdir)/layout/plruns.h
77 STATIC_OBJECTS = $(OBJECTS:.o=.$(STATIC_O))
79 DEPS = $(OBJECTS:.o=.d)
81 -include Makefile.local
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 \
86 dist-local check check-local check-exhaustive
91 ## List of standard targets
93 install: install-local
95 distclean : distclean-local
97 check: all check-local
99 check-exhaustive: check
101 all-local: $(ALL_TARGETS)
103 install-local: install-headers install-library
104 ifneq ($(ICULE_CFLAGS),)
105 @echo "Installing icu-lx.pc"
106 $(MAKE) ALL_PKGCONFIG_SUFFIX=lx -C .. install-pkgconfig
109 install-library: all-local
110 $(MKINSTALLDIRS) $(DESTDIR)$(libdir)
111 ifneq ($(ENABLE_STATIC),)
112 $(INSTALL-L) $(TARGET) $(DESTDIR)$(libdir)
114 ifneq ($(ENABLE_SHARED),)
115 $(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(libdir)
116 ifneq ($(FINAL_SO_TARGET),$(SO_TARGET))
117 cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(SO_TARGET))
118 ifneq ($(FINAL_SO_TARGET),$(MIDDLE_SO_TARGET))
119 cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(MIDDLE_SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(MIDDLE_SO_TARGET))
122 ifneq ($(IMPORT_LIB_EXT),)
123 $(INSTALL-L) $(FINAL_IMPORT_LIB) $(DESTDIR)$(libdir)
124 ifneq ($(IMPORT_LIB),$(FINAL_IMPORT_LIB))
125 cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(IMPORT_LIB)) && ln -s $(notdir $(FINAL_IMPORT_LIB)) $(notdir $(IMPORT_LIB))
127 ifneq ($(MIDDLE_IMPORT_LIB),$(FINAL_IMPORT_LIB))
128 cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(MIDDLE_IMPORT_LIB)) && ln -s $(notdir $(FINAL_IMPORT_LIB)) $(notdir $(MIDDLE_IMPORT_LIB))
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; \
143 test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES)
144 $(RMV) $(OBJECTS) $(STATIC_OBJECTS) $(ALL_TARGETS) $(SO_VERSION_DATA)
146 distclean-local: clean-local
151 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
153 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
155 ifneq ($(ENABLE_STATIC),)
156 $(TARGET): $(STATIC_OBJECTS)
157 $(AR) $(ARFLAGS) $(AR_OUTOPT)$@ $^
161 ifneq ($(ENABLE_SHARED),)
162 $(SHARED_OBJECT): $(OBJECTS) $(SO_VERSION_DATA)
163 $(SHLIB.cc) $(LD_SONAME) $(OUTOPT)$@ $^ $(LIBS)
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))
170 ifeq ($(OS390BATCH),1)
171 $(BATCH_TARGET):$(OBJECTS)
172 $(SHLIB.cc) $(LD_SONAME) $(OUTOPT)$@ $^ $(BATCH_LIBS)
174 endif # ENABLE_SHARED
176 ifeq (,$(MAKECMDGOALS))
179 ifneq ($(patsubst %clean,,$(MAKECMDGOALS)),)