• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
70SOURCES = $(shell cat $(srcdir)/sources.txt)
71OBJECTS = $(SOURCES:.cpp=.o)
72
73## Header files to install
74HEADERS= $(srcdir)/layout/ParagraphLayout.h $(srcdir)/layout/RunArrays.h $(srcdir)/layout/playout.h $(srcdir)/layout/plruns.h
75
76STATIC_OBJECTS = $(OBJECTS:.o=.$(STATIC_O))
77
78DEPS = $(OBJECTS:.o=.d)
79
80-include Makefile.local
81
82## List of phony targets
83.PHONY : all all-local install install-local clean clean-local	\
84distclean distclean-local install-library install-headers dist	\
85dist-local check check-local check-exhaustive
86
87## Clear suffix list
88.SUFFIXES :
89
90## List of standard targets
91all: all-local
92install: install-local
93clean: clean-local
94distclean : distclean-local
95dist: dist-local
96check: all check-local
97
98check-exhaustive: check
99
100all-local: $(ALL_TARGETS)
101
102install-local: install-headers install-library
103ifneq ($(ICULE_CFLAGS),)
104	@echo "Installing icu-lx.pc"
105	$(MAKE) ALL_PKGCONFIG_SUFFIX=lx -C .. install-pkgconfig
106endif
107
108install-library: all-local
109	$(MKINSTALLDIRS) $(DESTDIR)$(libdir)
110ifneq ($(ENABLE_STATIC),)
111	$(INSTALL-L) $(TARGET) $(DESTDIR)$(libdir)
112endif
113ifneq ($(ENABLE_SHARED),)
114# For MinGW, do we want the DLL to go in the bin location?
115ifeq ($(MINGW_MOVEDLLSTOBINDIR),YES)
116	$(MKINSTALLDIRS) $(DESTDIR)$(bindir)
117	$(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(bindir)
118else
119	$(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(libdir)
120ifneq ($(FINAL_SO_TARGET),$(SO_TARGET))
121	cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(SO_TARGET))
122ifneq ($(FINAL_SO_TARGET),$(MIDDLE_SO_TARGET))
123	cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(MIDDLE_SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(MIDDLE_SO_TARGET))
124endif
125endif
126endif
127ifneq ($(IMPORT_LIB_EXT),)
128	$(INSTALL-L) $(FINAL_IMPORT_LIB) $(DESTDIR)$(libdir)
129ifneq ($(IMPORT_LIB),$(FINAL_IMPORT_LIB))
130	cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(IMPORT_LIB)) && ln -s $(notdir $(FINAL_IMPORT_LIB)) $(notdir $(IMPORT_LIB))
131endif
132ifneq ($(MIDDLE_IMPORT_LIB),$(FINAL_IMPORT_LIB))
133	cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(MIDDLE_IMPORT_LIB)) && ln -s $(notdir $(FINAL_IMPORT_LIB)) $(notdir $(MIDDLE_IMPORT_LIB))
134endif
135endif
136endif
137
138install-headers:
139	$(MKINSTALLDIRS) $(DESTDIR)$(includedir)/layout
140	@for file in $(HEADERS); do \
141	 echo "$(INSTALL_DATA) $$file $(DESTDIR)$(includedir)/layout"; \
142	 $(INSTALL_DATA) $$file $(DESTDIR)$(includedir)/layout || exit; \
143	done
144
145dist-local:
146
147clean-local:
148	test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES)
149	$(RMV) $(OBJECTS) $(STATIC_OBJECTS) $(ALL_TARGETS) $(SO_VERSION_DATA)
150
151distclean-local: clean-local
152	$(RMV) Makefile
153
154check-local:
155
156Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
157	cd $(top_builddir) \
158	 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
159
160ifneq ($(ENABLE_STATIC),)
161$(TARGET): $(STATIC_OBJECTS)
162	$(AR) $(ARFLAGS) $(AR_OUTOPT)$@ $^
163	$(RANLIB) $@
164endif
165
166ifneq ($(ENABLE_SHARED),)
167$(SHARED_OBJECT): $(OBJECTS) $(SO_VERSION_DATA)
168	$(SHLIB.cc) $(LD_SONAME) $(OUTOPT)$@ $^ $(LIBS)
169ifeq ($(ENABLE_RPATH),YES)
170ifneq ($(wildcard $(libdir)/$(MIDDLE_SO_TARGET)),)
171	$(warning RPATH warning: --enable-rpath means test programs may use existing $(libdir)/$(MIDDLE_SO_TARGET))
172endif
173endif
174
175ifeq ($(OS390BATCH),1)
176$(BATCH_TARGET):$(OBJECTS)
177	$(SHLIB.cc) $(LD_SONAME) $(OUTOPT)$@ $^ $(BATCH_LIBS)
178endif   # OS390BATCH
179endif   # ENABLE_SHARED
180
181ifeq (,$(MAKECMDGOALS))
182-include $(DEPS)
183else
184ifneq ($(patsubst %clean,,$(MAKECMDGOALS)),)
185-include $(DEPS)
186endif
187endif
188
189