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