1#******************************************************************************
2#
3#   Copyright (C) 1999-2011, 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 = layoutex
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=$(LAYOUTEX_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 = layoutex.res
38endif
39
40ifeq ($(OS390BATCH),1)
41BATCH_TARGET = $(BATCH_LAYOUTEX_TARGET)
42BATCH_LIBS = $(BATCH_LIBICUUC) $(BATCH_LIBICULE) -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)/unicode -I$(srcdir)/.. -I$(top_srcdir)/common $(LIBCPPFLAGS)
56DEFS += -DU_LAYOUTEX_IMPLEMENTATION
57LDFLAGS += $(LDFLAGSICULX)
58LIBS = $(LIBICUUC) $(LIBICULE) $(DEFAULT_LIBS)
59
60OBJECTS =  ParagraphLayout.o \
61RunArrays.o \
62LXUtilities.o  \
63playout.o \
64plruns.o
65
66## Header files to install
67HEADERS= $(srcdir)/layout/ParagraphLayout.h $(srcdir)/layout/RunArrays.h $(srcdir)/layout/playout.h $(srcdir)/layout/plruns.h
68
69STATIC_OBJECTS = $(OBJECTS:.o=.$(STATIC_O))
70
71DEPS = $(OBJECTS:.o=.d)
72
73-include Makefile.local
74
75## List of phony targets
76.PHONY : all all-local install install-local clean clean-local	\
77distclean distclean-local install-library install-headers dist	\
78dist-local check check-local check-exhaustive
79
80## Clear suffix list
81.SUFFIXES :
82
83## List of standard targets
84all: all-local
85install: install-local
86clean: clean-local
87distclean : distclean-local
88dist: dist-local
89check: all check-local
90
91check-exhaustive: check
92
93all-local: $(ALL_TARGETS)
94
95install-local: install-headers install-library
96
97install-library: all-local
98	$(MKINSTALLDIRS) $(DESTDIR)$(libdir)
99ifneq ($(ENABLE_STATIC),)
100	$(INSTALL-L) $(TARGET) $(DESTDIR)$(libdir)
101endif
102ifneq ($(ENABLE_SHARED),)
103	$(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(libdir)
104ifneq ($(FINAL_SO_TARGET),$(SO_TARGET))
105	cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(SO_TARGET))
106ifneq ($(FINAL_SO_TARGET),$(MIDDLE_SO_TARGET))
107	cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(MIDDLE_SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(MIDDLE_SO_TARGET))
108endif
109endif
110ifneq ($(IMPORT_LIB_EXT),)
111	$(INSTALL-L) $(FINAL_IMPORT_LIB) $(DESTDIR)$(libdir)
112ifneq ($(IMPORT_LIB),$(FINAL_IMPORT_LIB))
113	cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(IMPORT_LIB)) && ln -s $(notdir $(FINAL_IMPORT_LIB)) $(notdir $(IMPORT_LIB))
114endif
115ifneq ($(MIDDLE_IMPORT_LIB),$(FINAL_IMPORT_LIB))
116	cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(MIDDLE_IMPORT_LIB)) && ln -s $(notdir $(FINAL_IMPORT_LIB)) $(notdir $(MIDDLE_IMPORT_LIB))
117endif
118endif
119endif
120
121install-headers:
122	$(MKINSTALLDIRS) $(DESTDIR)$(includedir)/layout
123	@for file in $(HEADERS); do \
124	 echo "$(INSTALL_DATA) $$file $(DESTDIR)$(includedir)/layout"; \
125	 $(INSTALL_DATA) $$file $(DESTDIR)$(includedir)/layout || exit; \
126	done
127
128dist-local:
129
130clean-local:
131	test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES)
132	$(RMV) $(OBJECTS) $(STATIC_OBJECTS) $(ALL_TARGETS) $(SO_VERSION_DATA)
133
134distclean-local: clean-local
135	$(RMV) Makefile
136
137check-local:
138
139Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
140	cd $(top_builddir) \
141	 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
142
143ifneq ($(ENABLE_STATIC),)
144$(TARGET): $(STATIC_OBJECTS)
145	$(AR) $(ARFLAGS) $(AR_OUTOPT)$@ $^
146	$(RANLIB) $@
147endif
148
149ifneq ($(ENABLE_SHARED),)
150$(SHARED_OBJECT): $(OBJECTS) $(SO_VERSION_DATA)
151	$(SHLIB.cc) $(LD_SONAME) $(OUTOPT)$@ $^ $(LIBS)
152ifeq ($(ENABLE_RPATH),YES)
153ifneq ($(wildcard $(libdir)/$(MIDDLE_SO_TARGET)),)
154	$(warning RPATH warning: --enable-rpath means test programs may use existing $(libdir)/$(MIDDLE_SO_TARGET))
155endif
156endif
157
158ifeq ($(OS390BATCH),1)
159$(BATCH_TARGET):$(OBJECTS)
160	$(SHLIB.cc) $(LD_SONAME) $(OUTOPT)$@ $^ $(BATCH_LIBS)
161endif   # OS390BATCH
162endif   # ENABLE_SHARED
163
164ifeq (,$(MAKECMDGOALS))
165-include $(DEPS)
166else
167ifneq ($(patsubst %clean,,$(MAKECMDGOALS)),)
168-include $(DEPS)
169endif
170endif
171
172