Home | History | Annotate | Download | only in layoutex
      1 #******************************************************************************
      2 #
      3 #   Copyright (C) 1999-2008, International Business Machines
      4 #   Corporation and others.  All Rights Reserved.
      5 #
      6 #******************************************************************************
      7 ## Makefile.in for ICU - layout
      8 
      9 ## Source directory information
     10 srcdir = @srcdir@
     11 top_srcdir = @top_srcdir@
     12 
     13 top_builddir = ..
     14 
     15 ## All the flags and other definitions are included here.
     16 include $(top_builddir)/icudefs.mk
     17 
     18 ## Build directory information
     19 subdir = layoutex
     20 
     21 ## Extra files to remove for 'make clean'
     22 CLEANFILES = *~ $(DEPS) $(IMPORT_LIB) $(MIDDLE_IMPORT_LIB) $(FINAL_IMPORT_LIB)
     23 
     24 ## Target information
     25 
     26 TARGET_STUBNAME=$(LAYOUTEX_STUBNAME)
     27 
     28 ifneq ($(ENABLE_STATIC),)
     29 TARGET = $(LIBDIR)/$(LIBSICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX).$(A)
     30 endif
     31 
     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)
     35 
     36 ifeq ($(ENABLE_SO_VERSION_DATA),1)
     37 SO_VERSION_DATA = layoutex.res
     38 endif
     39 
     40 ifeq ($(OS390BATCH),1)
     41 BATCH_TARGET = $(BATCH_LAYOUTEX_TARGET)
     42 BATCH_LIBS = $(BATCH_LIBICUUC) $(BATCH_LIBICULE) -lm
     43 endif   # OS390BATCH
     44 
     45 endif   # ENABLE_SHARED
     46 
     47 ALL_TARGETS = $(TARGET) $(ALL_SO_TARGETS) $(BATCH_TARGET)
     48 
     49 DYNAMICCPPFLAGS = $(SHAREDLIBCPPFLAGS)
     50 DYNAMICCFLAGS = $(SHAREDLIBCFLAGS)
     51 DYNAMICCXXFLAGS = $(SHAREDLIBCXXFLAGS)
     52 CFLAGS += $(LIBCFLAGS)
     53 CXXFLAGS += $(LIBCXXFLAGS)
     54 
     55 ifneq ($(top_builddir),$(top_srcdir))
     56 CPPFLAGS += -I$(top_builddir)/common
     57 endif
     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)
     62 
     63 OBJECTS =  ParagraphLayout.o \
     64 RunArrays.o \
     65 LXUtilities.o  \
     66 playout.o \
     67 plruns.o
     68 
     69 ## Header files to install
     70 HEADERS= $(srcdir)/layout/ParagraphLayout.h $(srcdir)/layout/RunArrays.h $(srcdir)/layout/playout.h $(srcdir)/layout/plruns.h
     71 
     72 STATIC_OBJECTS = $(OBJECTS:.o=.$(STATIC_O))
     73 
     74 DEPS = $(OBJECTS:.o=.d)
     75 
     76 -include Makefile.local
     77 
     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
     82 
     83 ## Clear suffix list
     84 .SUFFIXES :
     85 
     86 ## List of standard targets
     87 all: all-local
     88 install: install-local
     89 clean: clean-local
     90 distclean : distclean-local
     91 dist: dist-local
     92 check: all check-local
     93 
     94 all-local: $(ALL_TARGETS)
     95 
     96 install-local: install-headers install-library
     97 
     98 install-library: all-local
     99 	$(MKINSTALLDIRS) $(DESTDIR)$(libdir)
    100 ifneq ($(ENABLE_STATIC),)
    101 	$(INSTALL-L) $(TARGET) $(DESTDIR)$(libdir)
    102 endif
    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))
    109 endif
    110 endif
    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))
    115 endif
    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))
    118 endif
    119 endif
    120 endif
    121 
    122 install-headers:
    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; \
    127 	done
    128 
    129 dist-local:
    130 
    131 clean-local:
    132 	test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES)
    133 	$(RMV) $(OBJECTS) $(STATIC_OBJECTS) $(ALL_TARGETS) $(SO_VERSION_DATA)
    134 
    135 distclean-local: clean-local
    136 	$(RMV) Makefile
    137 
    138 check-local:
    139 
    140 Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
    141 	cd $(top_builddir) \
    142 	 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
    143 
    144 ifneq ($(ENABLE_STATIC),)
    145 $(TARGET): $(STATIC_OBJECTS)
    146 	$(AR) $(ARFLAGS) $(AR_OUTOPT)$@ $^
    147 	$(RANLIB) $@
    148 endif
    149 
    150 ifneq ($(ENABLE_SHARED),)
    151 $(SHARED_OBJECT): $(OBJECTS) $(SO_VERSION_DATA)
    152 	$(SHLIB.cc) $(LD_SONAME) $(OUTOPT)$@ $^ $(LIBS)
    153 
    154 ifeq ($(OS390BATCH),1)
    155 $(BATCH_TARGET):$(OBJECTS)
    156 	$(SHLIB.cc) $(LD_SONAME) $(OUTOPT)$@ $^ $(BATCH_LIBS)
    157 endif   # OS390BATCH
    158 endif   # ENABLE_SHARED
    159 
    160 ifeq (,$(MAKECMDGOALS))
    161 -include $(DEPS)
    162 else
    163 ifneq ($(patsubst %clean,,$(MAKECMDGOALS)),)
    164 -include $(DEPS)
    165 endif
    166 endif
    167 
    168