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