Home | History | Annotate | Download | only in stubdata
      1 #******************************************************************************
      2 #
      3 #   Copyright (C) 1999-2011, International Business Machines
      4 #   Corporation and others.  All Rights Reserved.
      5 #
      6 #******************************************************************************
      7 ## Makefile.in for ICU stubdata
      8 ## Stephen F. Booth
      9 
     10 ## Source directory information
     11 srcdir = @srcdir@
     12 top_srcdir = @top_srcdir@
     13 
     14 top_builddir = ..
     15 
     16 ## All the flags and other definitions are included here.
     17 include $(top_builddir)/icudefs.mk
     18 
     19 ## Build directory information
     20 subdir = stubdata
     21 
     22 ## Extra files to remove for 'make clean'
     23 CLEANFILES = *~ $(DEPS) $(IMPORT_LIB) $(MIDDLE_IMPORT_LIB) $(FINAL_IMPORT_LIB)
     24 
     25 ## Target information
     26 
     27 TARGET_STUBNAME=$(DATA_STUBNAME)
     28 
     29 ifneq ($(ENABLE_STATIC),)
     30 TARGET = $(STUBDATA_LIBDIR)$(LIBSICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX).$(A)
     31 endif
     32 
     33 
     34 ifneq ($(ENABLE_SHARED),)
     35 SO_TARGET = $(STUBDATA_LIBDIR)$(LIBICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX)$(STUB_SUFFIX).$(SO)
     36 ALL_SO_TARGETS = $(FINAL_SO_TARGET) $(MIDDLE_SO_TARGET) $(SO_TARGET) $(BATCH_STUB_TARGET) $(SHARED_OBJECT)
     37 endif
     38 
     39 
     40 ALL_TARGETS = $(TARGET) $(ALL_SO_TARGETS)
     41 
     42 DYNAMICCPPFLAGS = $(SHAREDLIBCPPFLAGS)
     43 DYNAMICCFLAGS = $(SHAREDLIBCFLAGS)
     44 DYNAMICCXXFLAGS = $(SHAREDLIBCXXFLAGS)
     45 
     46 CPPFLAGS += -I$(top_srcdir)/common $(LIBCPPFLAGS)
     47 LDFLAGS += $(LDFLAGSICUDT)
     48 
     49 OBJECTS = stubdata.o
     50 
     51 ## Header files to install
     52 HEADERS = 
     53 
     54 STATIC_OBJECTS = $(OBJECTS:.o=.$(STATIC_O))
     55 
     56 DEPS = $(OBJECTS:.o=.d)
     57 
     58 -include Makefile.local
     59 
     60 ## List of phony targets
     61 .PHONY : all all-local install install-local clean clean-local	\
     62 distclean distclean-local install-library dist	\
     63 dist-local check check-local check-exhaustive
     64 
     65 ## Clear suffix list
     66 .SUFFIXES :
     67 
     68 ## List of standard targets
     69 all: all-local
     70 install: install-local
     71 clean: clean-local
     72 distclean : distclean-local
     73 dist: dist-local
     74 check: all check-local
     75 
     76 check-exhaustive: check
     77 
     78 all-local: $(ALL_TARGETS)
     79 
     80 install-local: install-library
     81 
     82 install-library: all-local
     83 	$(MKINSTALLDIRS) $(DESTDIR)$(libdir)
     84 ifneq ($(ENABLE_STATIC),)
     85 	$(INSTALL-L) $(TARGET) $(DESTDIR)$(libdir)
     86 endif
     87 ifneq ($(ENABLE_SHARED),)
     88 	$(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(libdir)
     89 ifneq ($(FINAL_SO_TARGET),$(SO_TARGET))
     90 	cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(SO_TARGET))
     91 ifneq ($(FINAL_SO_TARGET),$(MIDDLE_SO_TARGET))
     92 	cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(MIDDLE_SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(MIDDLE_SO_TARGET))
     93 endif
     94 endif
     95 ifneq ($(IMPORT_LIB_EXT),)
     96 	$(INSTALL-L) $(FINAL_IMPORT_LIB) $(DESTDIR)$(libdir)
     97 ifneq ($(IMPORT_LIB),$(FINAL_IMPORT_LIB))
     98 	cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(IMPORT_LIB)) && ln -s $(notdir $(FINAL_IMPORT_LIB)) $(notdir $(IMPORT_LIB))
     99 endif
    100 ifneq ($(MIDDLE_IMPORT_LIB),$(FINAL_IMPORT_LIB))
    101 	cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(MIDDLE_IMPORT_LIB)) && ln -s $(notdir $(FINAL_IMPORT_LIB)) $(notdir $(MIDDLE_IMPORT_LIB))
    102 endif
    103 endif
    104 endif
    105 
    106 dist-local:
    107 
    108 clean-local:
    109 	test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES)
    110 	$(RMV) $(OBJECTS) $(STATIC_OBJECTS) $(ALL_TARGETS)
    111 
    112 distclean-local: clean-local
    113 	$(RMV) Makefile
    114 
    115 check-local:
    116 
    117 Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
    118 	cd $(top_builddir) \
    119 	&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
    120 
    121 ifneq ($(ENABLE_STATIC),)
    122 $(TARGET): $(STATIC_OBJECTS)
    123 	$(AR) $(ARFLAGS) $(AR_OUTOPT)$@ $^
    124 	$(RANLIB) $@
    125 endif
    126 
    127 ifneq ($(ENABLE_SHARED),)
    128 $(SHARED_OBJECT): $(OBJECTS)
    129 	$(SHLIB.c) $(LD_SONAME) $(OUTOPT)$@ $^ $(LIBS)
    130 ifeq ($(ENABLE_RPATH),YES)
    131 ifneq ($(wildcard $(libdir)/$(MIDDLE_SO_TARGET)),)
    132 	$(warning RPATH warning: --enable-rpath means test programs may use existing $(libdir)/$(MIDDLE_SO_TARGET))
    133 endif
    134 endif
    135 
    136 ifeq ($(OS390BATCH),1)
    137 $(BATCH_STUB_TARGET): $(OBJECTS)
    138 	$(SHLIB.c) $(LD_SONAME) $(OUTOPT)$@ $^ $(LIBS)
    139 endif   # OS390BATCH
    140 endif   # ENABLE_SHARED
    141 
    142 ifeq (,$(MAKECMDGOALS))
    143 -include $(DEPS)
    144 else
    145 ifneq ($(patsubst %clean,,$(MAKECMDGOALS)),)
    146 -include $(DEPS)
    147 endif
    148 endif
    149 
    150