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-2011, International Business Machines 6# Corporation and others. All Rights Reserved. 7# 8#****************************************************************************** 9## Makefile.in for ICU - tools/ctestfw 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 = tools/ctestfw 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=$(CTESTFW_STUBNAME) 30 31ifneq ($(ENABLE_STATIC),) 32TARGET = $(LIBSICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX).$(A) 33endif 34 35ifneq ($(ENABLE_SHARED),) 36SO_TARGET = $(LIBICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX).$(SO) 37ALL_SO_TARGETS = $(SO_TARGET) $(MIDDLE_SO_TARGET) $(FINAL_SO_TARGET) $(SHARED_OBJECT) 38endif 39 40ALL_TARGETS = $(TARGET) $(ALL_SO_TARGETS) 41 42DYNAMICCPPFLAGS = $(SHAREDLIBCPPFLAGS) 43DYNAMICCFLAGS = $(SHAREDLIBCFLAGS) 44DYNAMICCXXFLAGS = $(SHAREDLIBCXXFLAGS) 45CFLAGS += $(LIBCFLAGS) 46CXXFLAGS += $(LIBCXXFLAGS) 47 48CPPFLAGS += -I$(top_srcdir)/common -I$(top_srcdir)/i18n -I$(srcdir)/../toolutil -I$(srcdir) $(LIBCPPFLAGS) $(CPPFLAGSCTESTFW) 49DEFS += -DT_CTEST_IMPLEMENTATION 50LDFLAGS += $(LDFLAGSCTESTFW) 51LIBS = $(LIBICUTOOLUTIL) $(LIBICUI18N) $(LIBICUUC) $(DEFAULT_LIBS) 52 53OBJECTS = ctest.o tstdtmod.o testdata.o datamap.o uperf.o ucln_ct.o 54 55STATIC_OBJECTS = $(OBJECTS:.o=.$(STATIC_O)) 56 57DEPS = $(OBJECTS:.o=.d) 58 59-include Makefile.local 60 61## List of phony targets 62.PHONY : all all-local install install-local clean clean-local \ 63distclean distclean-local dist dist-local check check-local 64 65## Clear suffix list 66.SUFFIXES : 67 68## List of standard targets 69all: all-local 70install: install-local 71clean: clean-local 72distclean : distclean-local 73dist: dist-local 74check: all check-local 75 76all-local: $(ALL_TARGETS) 77 78install-local: install-library 79 80install-library: all-local 81 $(MKINSTALLDIRS) $(DESTDIR)$(libdir) 82ifneq ($(ENABLE_STATIC),) 83 $(INSTALL-L) $(TARGET) $(DESTDIR)$(libdir) 84endif 85ifneq ($(ENABLE_SHARED),) 86# For MinGW, do we want the DLL to go in the bin location? 87ifeq ($(MINGW_MOVEDLLSTOBINDIR),YES) 88 $(MKINSTALLDIRS) $(DESTDIR)$(bindir) 89 $(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(bindir) 90else 91 $(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(libdir) 92ifneq ($(FINAL_SO_TARGET),$(SO_TARGET)) 93 cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(SO_TARGET)) 94ifneq ($(FINAL_SO_TARGET),$(MIDDLE_SO_TARGET)) 95 cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(MIDDLE_SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(MIDDLE_SO_TARGET)) 96endif 97endif 98endif 99ifneq ($(IMPORT_LIB_EXT),) 100 $(INSTALL-L) $(FINAL_IMPORT_LIB) $(DESTDIR)$(libdir) 101ifneq ($(IMPORT_LIB),$(FINAL_IMPORT_LIB)) 102 cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(IMPORT_LIB)) && ln -s $(notdir $(FINAL_IMPORT_LIB)) $(notdir $(IMPORT_LIB)) 103endif 104ifneq ($(MIDDLE_IMPORT_LIB),$(FINAL_IMPORT_LIB)) 105 cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(MIDDLE_IMPORT_LIB)) && ln -s $(notdir $(FINAL_IMPORT_LIB)) $(notdir $(MIDDLE_IMPORT_LIB)) 106endif 107endif 108endif 109 110dist-local: 111 112clean-local: 113 test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES) 114 $(RMV) $(OBJECTS) $(STATIC_OBJECTS) $(ALL_TARGETS) 115 116distclean-local: clean-local 117 $(RMV) Makefile 118 119check-local: all-local 120 121Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status 122 cd $(top_builddir) \ 123 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status 124 125ifneq ($(ENABLE_STATIC),) 126$(TARGET): $(STATIC_OBJECTS) 127 $(AR) $(ARFLAGS) $(AR_OUTOPT)$@ $^ 128 $(RANLIB) $@ 129endif 130 131ifneq ($(ENABLE_SHARED),) 132$(SHARED_OBJECT): $(OBJECTS) 133 $(SHLIB.cc) $(LD_SONAME) $(OUTOPT)$@ $^ $(LIBS) 134ifeq ($(ENABLE_RPATH),YES) 135ifneq ($(wildcard $(libdir)/$(MIDDLE_SO_TARGET)),) 136 $(warning RPATH warning: --enable-rpath means test programs may use existing $(libdir)/$(MIDDLE_SO_TARGET)) 137endif 138endif 139endif 140 141ifeq (,$(MAKECMDGOALS)) 142-include $(DEPS) 143else 144ifneq ($(patsubst %clean,,$(MAKECMDGOALS)),) 145-include $(DEPS) 146endif 147endif 148 149