]> git.saurik.com Git - apple/icu.git/blame - icuSources/extra/uconv/Makefile.in
ICU-57166.0.1.tar.gz
[apple/icu.git] / icuSources / extra / uconv / Makefile.in
CommitLineData
b75a7d8f
A
1## ******************************************************************************
2## *
57a6839d 3## * Copyright (C) 1999-2014, International Business Machines
b75a7d8f
A
4## * Corporation and others. All Rights Reserved.
5## *
6## *******************************************************************************
7## Makefile.in for ICU - uconv
8## Steven R. Loomis
9
10## Set the following to dll or static or common..
11UCONVMSG_MODE=static
12##############################################################
13
14srcdir=@srcdir@
15top_srcdir=@top_srcdir@
16
17top_builddir = ../..
18subdir = extra/uconv
19
20include $(top_builddir)/icudefs.mk
21
22MSGNAME=uconvmsg
23
24# RESSRC comes from resfiles.mk
25FILESEPCHAR=/
26include $(srcdir)/resfiles.mk
27
28RESDIR=$(MSGNAME)
73c04bcf 29RESFILES=$(RESSRC:$(RESOURCESDIR)$(FILESEPCHAR)%.txt=$(RESDIR)/%.res)
b75a7d8f
A
30
31##
32
374ca955
A
33TARGET_STUB_NAME = uconv
34
b75a7d8f
A
35SECTION = 1
36
374ca955 37ALL_MAN_FILES = $(TARGET_STUB_NAME).$(SECTION)
b75a7d8f
A
38
39## Extra files to remove for 'make clean'
40CLEANFILES = *~ $(DEPS) $(ALL_MAN_FILES)
41
42## Target information
374ca955 43TARGET = $(BINDIR)/$(TARGET_STUB_NAME)$(EXEEXT)
b75a7d8f 44
4388f060 45CPPFLAGS += -I$(top_srcdir)/common -I$(top_srcdir)/i18n -I$(srcdir)/../toolutil
57a6839d 46CPPFLAGS += -DUNISTR_FROM_CHAR_EXPLICIT=explicit -DUNISTR_FROM_STRING_EXPLICIT=explicit
b75a7d8f
A
47LIBS = $(LIBICUI18N) $(LIBICUUC) $(DEFAULT_LIBS) $(LIB_M)
48
374ca955
A
49ifeq ($(PKGDATA_OPTS),)
50PKGDATA_OPTS = -O pkgdata.inc
51endif
52
b75a7d8f
A
53## generic settings for data - common.
54PKGMODE=common
55INSTALLTO=$(DESTDIR)$(ICUDATA_DIR)
51004dcb 56UCONVMSG_LIB=package-resfiles
b75a7d8f
A
57
58## Static mode
59ifeq ($(UCONVMSG_MODE),static)
60DEFS += -DUCONVMSG_LINK=$(MSGNAME)
4388f060 61UCONVMSG_LIB = $(RESDIR)/$(LIBPREFIX)$(STATIC_PREFIX_WHEN_USED)$(MSGNAME).$(A)
b75a7d8f
A
62LIBS += $(UCONVMSG_LIB)
63PKGMODE=static
64INSTALLTO=$(libdir)
65endif
66
67## DLL mode
68ifeq ($(UCONVMSG_MODE),dll)
69DEFS += -DUCONVMSG_LINK=$(MSGNAME)
70LIBS += -L$(RESDIR) -l$(MSGNAME)
71PKGMODE=dll
72INSTALLTO=$(libdir)
73endif
74
75OBJECTS = uconv.o uwmsg.o
76
77DEPS = $(OBJECTS:.o=.d)
78
79## List of phony targets
80.PHONY : all all-local install install-local clean clean-local \
51004dcb
A
81distclean resclean distclean-local dist dist-local \
82check check-local build-dir package-resfiles install-resfiles install-man
b75a7d8f
A
83
84## Clear suffix list
85.SUFFIXES :
86
87## List of standard targets
88all: all-local
89
90install: install-local
91clean: clean-local
92distclean : distclean-local
93dist: dist-local
94check: check-local
95
51004dcb 96all-local: build-dir $(TARGET) $(ALL_MAN_FILES)
b75a7d8f
A
97
98install-local: all-local install-target install-resfiles install-man
99
100install-target: all-local
101 $(MKINSTALLDIRS) $(DESTDIR)$(bindir)
374ca955 102 $(INSTALL) $(TARGET) $(DESTDIR)$(bindir)
b75a7d8f
A
103
104dist-local:
105
106clean-local: resclean
107 test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES) $(RESFILES)
108 $(RMV) $(OBJECTS) $(TARGET)
109
110resclean:
729e4ab9 111 @#-$(INVOKE) $(TOOLBINDIR)/pkgdata --clean -p $(RESDIR) -O pkgdata.inc -m $(PKGMODE) -d $(RESDIR) -T $(RESDIR) $(RESDIR)/$(RESDIR).lst
b75a7d8f
A
112 $(RMV) pkgdata.inc $(RESDIR)
113
114distclean-local: clean-local
115 $(RMV) Makefile $(DEPS)
116
729e4ab9
A
117check-local: $(TARGET)
118ifneq (,$(filter $(PKGDATA_MODE),files common))
119 @echo "Currently, pkgdata is in \"$(PKGDATA_MODE)\" mode."
120 @echo "To test uconv, run this manually after installing ICU:"
121 @echo "\"./$(TARGET) -f ibm-37 $(srcdir)/samples/ibm-37-test.txt\""
122else
123 $(INVOKE) ./$(TARGET) -f ibm-37 $(srcdir)/samples/ibm-37-test.txt
124endif
b75a7d8f 125
73c04bcf 126Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
b75a7d8f
A
127 cd $(top_builddir) \
128 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
129
729e4ab9
A
130pkgdata.inc: pkgdataMakefile
131 $(MAKE) -f pkgdataMakefile
132
51004dcb
A
133build-dir:
134 @$(MKINSTALLDIRS) $(RESDIR)
135
729e4ab9 136pkgdataMakefile:
b75a7d8f 137 cd $(top_builddir) \
729e4ab9 138 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
b75a7d8f 139
73c04bcf 140$(TARGET_STUB_NAME).$(SECTION): $(srcdir)/$(TARGET_STUB_NAME).$(SECTION).in pkgdata.inc
374ca955 141 cd $(top_builddir) \
73c04bcf 142 && CONFIG_FILES=$(subdir)/$(TARGET_STUB_NAME).$(SECTION) CONFIG_HEADERS= $(SHELL) ./config.status
374ca955 143
b75a7d8f 144$(TARGET) : $(OBJECTS) $(UCONVMSG_LIB)
374ca955 145 $(LINK.cc) $(OUTOPT)$@ $(OBJECTS) $(LIBS)
46f4442e 146 $(POST_BUILD_STEP)
b75a7d8f 147
51004dcb
A
148# The | is an order-only prerequisite. This helps when the -j option is used,
149# and we don't want the files to be built before the directories are built.
150ifneq ($(filter order-only,$(.FEATURES)),)
151$(RESFILES) $(RESDIR)/$(RESDIR).lst: | build-dir
b75a7d8f
A
152endif
153
51004dcb 154$(UCONVMSG_LIB): $(RESFILES) $(RESDIR)/$(RESDIR).lst pkgdata.inc
729e4ab9 155 $(INVOKE) $(PKGDATA_INVOKE_OPTS) $(TOOLBINDIR)/pkgdata -p $(MSGNAME) $(PKGDATA_OPTS) -m $(PKGMODE) -s $(RESDIR) -d $(RESDIR) -T $(RESDIR) $(RESDIR)/$(RESDIR).lst
b75a7d8f 156
73c04bcf 157$(RESDIR)/$(RESDIR).lst: Makefile $(srcdir)/resfiles.mk
b75a7d8f 158 @-$(RMV) $@
73c04bcf
A
159 @for file in $(RESFILES:$(RESDIR)/%.res=%.res); do \
160 echo $$file >> $@; \
b75a7d8f
A
161 done;
162
163# no install for static mode
164ifneq ($(UCONVMSG_MODE),static)
4388f060 165install-resfiles: $(RESFILES) $(RESDIR)/$(RESDIR).lst pkgdata.inc
b75a7d8f 166 $(MKINSTALLDIRS) $(DESTDIR)$(ICUDATA_DIR)
729e4ab9 167 $(INVOKE) $(TOOLBINDIR)/pkgdata -p $(RESDIR) -O pkgdata.inc -m $(PKGMODE) -d $(RESDIR) -I $(INSTALLTO) -T $(RESDIR) $(RESDIR)/$(RESDIR).lst
73c04bcf
A
168else
169install-resfiles:
b75a7d8f
A
170endif
171
73c04bcf 172$(MSGNAME)/%.res: $(srcdir)/$(RESOURCESDIR)/%.txt
729e4ab9 173 $(INVOKE) $(TOOLBINDIR)/genrb -e UTF-8 -s $(^D) -d $(@D) $(^F)
b75a7d8f
A
174
175install-man: $(ALL_MAN_FILES)
176 $(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man$(SECTION)
177 $(INSTALL_DATA) $? $(DESTDIR)$(mandir)/man$(SECTION)
178
b75a7d8f 179
b75a7d8f 180