]>
Commit | Line | Data |
---|---|---|
f3c0d7a5 A |
1 | # Copyright (C) 2016 and later: Unicode, Inc. and others. |
2 | # License & terms of use: http://www.unicode.org/copyright.html | |
73c04bcf A |
3 | #****************************************************************************** |
4 | # | |
4388f060 | 5 | # Copyright (C) 1999-2011, International Business Machines |
73c04bcf A |
6 | # Corporation and others. All Rights Reserved. |
7 | # | |
8 | #****************************************************************************** | |
b75a7d8f | 9 | ## Makefile.in for ICU - tools/ctestfw |
b75a7d8f A |
10 | ## Stephen F. Booth |
11 | ||
12 | ## Source directory information | |
13 | srcdir = @srcdir@ | |
14 | top_srcdir = @top_srcdir@ | |
15 | ||
16 | top_builddir = ../.. | |
17 | ||
73c04bcf | 18 | ## All the flags and other definitions are included here. |
b75a7d8f A |
19 | include $(top_builddir)/icudefs.mk |
20 | ||
21 | ## Build directory information | |
22 | subdir = tools/ctestfw | |
23 | ||
24 | ## Extra files to remove for 'make clean' | |
374ca955 | 25 | CLEANFILES = *~ $(DEPS) $(IMPORT_LIB) $(MIDDLE_IMPORT_LIB) $(FINAL_IMPORT_LIB) |
b75a7d8f A |
26 | |
27 | ## Target information | |
28 | ||
73c04bcf A |
29 | TARGET_STUBNAME=$(CTESTFW_STUBNAME) |
30 | ||
b75a7d8f | 31 | ifneq ($(ENABLE_STATIC),) |
73c04bcf | 32 | TARGET = $(LIBSICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX).$(A) |
b75a7d8f A |
33 | endif |
34 | ||
b75a7d8f | 35 | ifneq ($(ENABLE_SHARED),) |
73c04bcf A |
36 | SO_TARGET = $(LIBICU)$(TARGET_STUBNAME)$(ICULIBSUFFIX).$(SO) |
37 | ALL_SO_TARGETS = $(SO_TARGET) $(MIDDLE_SO_TARGET) $(FINAL_SO_TARGET) $(SHARED_OBJECT) | |
b75a7d8f A |
38 | endif |
39 | ||
40 | ALL_TARGETS = $(TARGET) $(ALL_SO_TARGETS) | |
41 | ||
42 | DYNAMICCPPFLAGS = $(SHAREDLIBCPPFLAGS) | |
43 | DYNAMICCFLAGS = $(SHAREDLIBCFLAGS) | |
44 | DYNAMICCXXFLAGS = $(SHAREDLIBCXXFLAGS) | |
46f4442e A |
45 | CFLAGS += $(LIBCFLAGS) |
46 | CXXFLAGS += $(LIBCXXFLAGS) | |
b75a7d8f | 47 | |
729e4ab9 | 48 | CPPFLAGS += -I$(top_srcdir)/common -I$(top_srcdir)/i18n -I$(srcdir)/../toolutil -I$(srcdir) $(LIBCPPFLAGS) $(CPPFLAGSCTESTFW) |
73c04bcf | 49 | DEFS += -DT_CTEST_IMPLEMENTATION |
374ca955 | 50 | LDFLAGS += $(LDFLAGSCTESTFW) |
73c04bcf | 51 | LIBS = $(LIBICUTOOLUTIL) $(LIBICUI18N) $(LIBICUUC) $(DEFAULT_LIBS) |
b75a7d8f | 52 | |
729e4ab9 | 53 | OBJECTS = ctest.o tstdtmod.o testdata.o datamap.o uperf.o ucln_ct.o |
b75a7d8f A |
54 | |
55 | STATIC_OBJECTS = $(OBJECTS:.o=.$(STATIC_O)) | |
56 | ||
57 | DEPS = $(OBJECTS:.o=.d) | |
58 | ||
73c04bcf A |
59 | -include Makefile.local |
60 | ||
b75a7d8f A |
61 | ## List of phony targets |
62 | .PHONY : all all-local install install-local clean clean-local \ | |
63 | distclean distclean-local dist dist-local check check-local | |
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 | all-local: $(ALL_TARGETS) | |
77 | ||
78 | install-local: install-library | |
79 | ||
80 | install-library: all-local | |
729e4ab9 A |
81 | $(MKINSTALLDIRS) $(DESTDIR)$(libdir) |
82 | ifneq ($(ENABLE_STATIC),) | |
83 | $(INSTALL-L) $(TARGET) $(DESTDIR)$(libdir) | |
84 | endif | |
85 | ifneq ($(ENABLE_SHARED),) | |
86 | $(INSTALL-L) $(FINAL_SO_TARGET) $(DESTDIR)$(libdir) | |
87 | ifneq ($(FINAL_SO_TARGET),$(SO_TARGET)) | |
88 | cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(SO_TARGET)) | |
89 | ifneq ($(FINAL_SO_TARGET),$(MIDDLE_SO_TARGET)) | |
90 | cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(MIDDLE_SO_TARGET)) && ln -s $(notdir $(FINAL_SO_TARGET)) $(notdir $(MIDDLE_SO_TARGET)) | |
91 | endif | |
92 | endif | |
93 | ifneq ($(IMPORT_LIB_EXT),) | |
94 | $(INSTALL-L) $(FINAL_IMPORT_LIB) $(DESTDIR)$(libdir) | |
95 | ifneq ($(IMPORT_LIB),$(FINAL_IMPORT_LIB)) | |
96 | cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(IMPORT_LIB)) && ln -s $(notdir $(FINAL_IMPORT_LIB)) $(notdir $(IMPORT_LIB)) | |
97 | endif | |
98 | ifneq ($(MIDDLE_IMPORT_LIB),$(FINAL_IMPORT_LIB)) | |
99 | cd $(DESTDIR)$(libdir) && $(RM) $(notdir $(MIDDLE_IMPORT_LIB)) && ln -s $(notdir $(FINAL_IMPORT_LIB)) $(notdir $(MIDDLE_IMPORT_LIB)) | |
100 | endif | |
101 | endif | |
102 | endif | |
b75a7d8f A |
103 | |
104 | dist-local: | |
105 | ||
106 | clean-local: | |
107 | test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES) | |
374ca955 | 108 | $(RMV) $(OBJECTS) $(STATIC_OBJECTS) $(ALL_TARGETS) |
b75a7d8f A |
109 | |
110 | distclean-local: clean-local | |
111 | $(RMV) Makefile | |
112 | ||
113 | check-local: all-local | |
114 | ||
115 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status | |
116 | cd $(top_builddir) \ | |
117 | && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status | |
118 | ||
119 | ifneq ($(ENABLE_STATIC),) | |
46f4442e A |
120 | $(TARGET): $(STATIC_OBJECTS) |
121 | $(AR) $(ARFLAGS) $(AR_OUTOPT)$@ $^ | |
b75a7d8f A |
122 | $(RANLIB) $@ |
123 | endif | |
124 | ||
125 | ifneq ($(ENABLE_SHARED),) | |
73c04bcf | 126 | $(SHARED_OBJECT): $(OBJECTS) |
b75a7d8f | 127 | $(SHLIB.cc) $(LD_SONAME) $(OUTOPT)$@ $^ $(LIBS) |
4388f060 A |
128 | ifeq ($(ENABLE_RPATH),YES) |
129 | ifneq ($(wildcard $(libdir)/$(MIDDLE_SO_TARGET)),) | |
130 | $(warning RPATH warning: --enable-rpath means test programs may use existing $(libdir)/$(MIDDLE_SO_TARGET)) | |
131 | endif | |
132 | endif | |
b75a7d8f A |
133 | endif |
134 | ||
135 | ifeq (,$(MAKECMDGOALS)) | |
136 | -include $(DEPS) | |
137 | else | |
138 | ifneq ($(patsubst %clean,,$(MAKECMDGOALS)),) | |
139 | -include $(DEPS) | |
140 | endif | |
141 | endif | |
73c04bcf | 142 |