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