1 #******************************************************************************
3 # Copyright (C) 1999-2008, 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)
55 ifneq ($(top_builddir),$(top_srcdir))
56 CPPFLAGS += -I$(top_builddir)/common
58 CPPFLAGS += -I$(srcdir) -I$(srcdir)/unicode -I$(srcdir)/.. -I$(top_srcdir)/common $(LIBCPPFLAGS)
59 DEFS += -DU_LAYOUTEX_IMPLEMENTATION
60 LDFLAGS += $(LDFLAGSICULX)
61 LIBS = $(LIBICUUC) $(LIBICULE) $(DEFAULT_LIBS)
63 OBJECTS = ParagraphLayout.o \
69 ## Header files to install
70 HEADERS= $(srcdir)/layout/ParagraphLayout.h $(srcdir)/layout/RunArrays.h $(srcdir)/layout/playout.h $(srcdir)/layout/plruns.h
72 STATIC_OBJECTS = $(OBJECTS:.o=.$(STATIC_O))
74 DEPS = $(OBJECTS:.o=.d)
76 -include Makefile.local
78 ## List of phony targets
79 .PHONY : all all-local install install-local clean clean-local \
80 distclean distclean-local install-library install-headers dist \
81 dist-local check check-local
86 ## List of standard targets
88 install: install-local
90 distclean : distclean-local
92 check: all check-local
94 all-local: $(ALL_TARGETS)
96 install-local: install-headers install-library
98 install-library: all-local
99 $(MKINSTALLDIRS) $(DESTDIR)$(libdir)
100 ifneq ($(ENABLE_STATIC),)
101 $(INSTALL-L) $(TARGET) $(DESTDIR)$(libdir)
103 ifneq ($(ENABLE_SHARED),)
104 $(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(libdir)
105 ifneq ($(FINAL_SO_TARGET),$(SO_TARGET))
106 cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(SO_TARGET))
107 ifneq ($(FINAL_SO_TARGET),$(MIDDLE_SO_TARGET))
108 cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(MIDDLE_SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(MIDDLE_SO_TARGET))
111 ifneq ($(IMPORT_LIB_EXT),)
112 $(INSTALL-L) $(FINAL_IMPORT_LIB) $(DESTDIR)$(libdir)
113 ifneq ($(IMPORT_LIB),$(FINAL_IMPORT_LIB))
114 cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(IMPORT_LIB)) && ln -s $(notdir $(FINAL_IMPORT_LIB)) $(notdir $(IMPORT_LIB))
116 ifneq ($(MIDDLE_IMPORT_LIB),$(FINAL_IMPORT_LIB))
117 cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(MIDDLE_IMPORT_LIB)) && ln -s $(notdir $(FINAL_IMPORT_LIB)) $(notdir $(MIDDLE_IMPORT_LIB))
123 $(MKINSTALLDIRS) $(DESTDIR)$(includedir)/layout
124 @for file in $(HEADERS); do \
125 echo "$(INSTALL_DATA) $$file $(DESTDIR)$(includedir)/layout"; \
126 $(INSTALL_DATA) $$file $(DESTDIR)$(includedir)/layout || exit; \
132 test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES)
133 $(RMV) $(OBJECTS) $(STATIC_OBJECTS) $(ALL_TARGETS) $(SO_VERSION_DATA)
135 distclean-local: clean-local
140 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
142 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
144 ifneq ($(ENABLE_STATIC),)
145 $(TARGET): $(STATIC_OBJECTS)
146 $(AR) $(ARFLAGS) $(AR_OUTOPT)$@ $^
150 ifneq ($(ENABLE_SHARED),)
151 $(SHARED_OBJECT): $(OBJECTS) $(SO_VERSION_DATA)
152 $(SHLIB.cc) $(LD_SONAME) $(OUTOPT)$@ $^ $(LIBS)
154 ifeq ($(OS390BATCH),1)
155 $(BATCH_TARGET):$(OBJECTS)
156 $(SHLIB.cc) $(LD_SONAME) $(OUTOPT)$@ $^ $(BATCH_LIBS)
158 endif # ENABLE_SHARED
160 ifeq (,$(MAKECMDGOALS))
163 ifneq ($(patsubst %clean,,$(MAKECMDGOALS)),)