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