]> git.saurik.com Git - apple/icu.git/blame - icuSources/extra/uconv/Makefile.in
ICU-400.42.tar.gz
[apple/icu.git] / icuSources / extra / uconv / Makefile.in
CommitLineData
b75a7d8f
A
1## ******************************************************************************
2## *
73c04bcf 3## * Copyright (C) 1999-2006, 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
A
44
45CPPFLAGS += -I$(top_builddir)/common -I$(top_srcdir)/common -I$(top_srcdir)/i18n -I$(srcdir)/../toolutil
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)
55UCONVMSG_LIB=dummy
56
57## Static mode
58ifeq ($(UCONVMSG_MODE),static)
59DEFS += -DUCONVMSG_LINK=$(MSGNAME)
374ca955 60UCONVMSG_LIB = $(RESDIR)/$(LIBPREFIX)$(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 \
80distclean resclean distclean-local dist dist-local check check-local resfiles package-resfiles install-resfiles install-man
81
82## Clear suffix list
83.SUFFIXES :
84
85## List of standard targets
86all: all-local
87
88install: install-local
89clean: clean-local
90distclean : distclean-local
91dist: dist-local
92check: check-local
93
94all-local: $(TARGET) resfiles $(ALL_MAN_FILES)
95
96install-local: all-local install-target install-resfiles install-man
97
98install-target: all-local
99 $(MKINSTALLDIRS) $(DESTDIR)$(bindir)
374ca955 100 $(INSTALL) $(TARGET) $(DESTDIR)$(bindir)
b75a7d8f
A
101
102dist-local:
103
104clean-local: resclean
105 test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES) $(RESFILES)
106 $(RMV) $(OBJECTS) $(TARGET)
107
108resclean:
73c04bcf 109 @#-$(INVOKE) $(BINDIR)/pkgdata --clean -p $(RESDIR) -O pkgdata.inc -m $(PKGMODE) -d $(RESDIR) -T $(RESDIR) $(RESDIR)/$(RESDIR).lst
b75a7d8f
A
110 $(RMV) pkgdata.inc $(RESDIR)
111
112distclean-local: clean-local
113 $(RMV) Makefile $(DEPS)
114
115check-local:
116
73c04bcf 117Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
b75a7d8f
A
118 cd $(top_builddir) \
119 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
120
73c04bcf 121pkgdata.inc: $(srcdir)/pkgdata.inc.in $(top_builddir)/config.status
b75a7d8f
A
122 cd $(top_builddir) \
123 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
124
73c04bcf 125$(TARGET_STUB_NAME).$(SECTION): $(srcdir)/$(TARGET_STUB_NAME).$(SECTION).in pkgdata.inc
374ca955 126 cd $(top_builddir) \
73c04bcf 127 && CONFIG_FILES=$(subdir)/$(TARGET_STUB_NAME).$(SECTION) CONFIG_HEADERS= $(SHELL) ./config.status
374ca955 128
b75a7d8f 129$(TARGET) : $(OBJECTS) $(UCONVMSG_LIB)
374ca955 130 $(LINK.cc) $(OUTOPT)$@ $(OBJECTS) $(LIBS)
46f4442e 131 $(POST_BUILD_STEP)
b75a7d8f
A
132
133resfiles: $(RESFILES) package-resfiles
134
135ifeq ($(UCONVMSG_STATIC),YES)
136$(UCONVMSG_LIB): resfiles
137endif
138
139
140package-resfiles: $(RESDIR)/$(RESDIR).lst pkgdata.inc
73c04bcf 141 $(INVOKE) $(PKGDATA_INVOKE_OPTS) $(BINDIR)/pkgdata -p $(MSGNAME) $(PKGDATA_OPTS) -m $(PKGMODE) -s $(RESDIR) -d $(RESDIR) -T $(RESDIR) $(RESDIR)/$(RESDIR).lst
b75a7d8f 142
73c04bcf 143$(RESDIR)/$(RESDIR).lst: Makefile $(srcdir)/resfiles.mk
b75a7d8f
A
144 @$(MKINSTALLDIRS) $(RESDIR)
145 @-$(RMV) $@
73c04bcf
A
146 @for file in $(RESFILES:$(RESDIR)/%.res=%.res); do \
147 echo $$file >> $@; \
b75a7d8f
A
148 done;
149
150# no install for static mode
151ifneq ($(UCONVMSG_MODE),static)
152install-resfiles: $(RESFILES)
153 $(MKINSTALLDIRS) $(DESTDIR)$(ICUDATA_DIR)
374ca955 154 $(INVOKE) $(BINDIR)/pkgdata -p $(RESDIR) -O pkgdata.inc -m $(PKGMODE) -d $(RESDIR) -I $(INSTALLTO) -T $(RESDIR) $(RESDIR)/$(RESDIR).lst
73c04bcf
A
155else
156install-resfiles:
b75a7d8f
A
157endif
158
159##
160$(UCONVMSG_LIB): resfiles
161
73c04bcf 162$(MSGNAME)/%.res: $(srcdir)/$(RESOURCESDIR)/%.txt
b75a7d8f 163 $(MKINSTALLDIRS) $(@D)
73c04bcf 164 $(INVOKE) $(BINDIR)/genrb -e UTF-8 -s $(^D) -d $(@D) $(^F)
b75a7d8f
A
165
166install-man: $(ALL_MAN_FILES)
167 $(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man$(SECTION)
168 $(INSTALL_DATA) $? $(DESTDIR)$(mandir)/man$(SECTION)
169
b75a7d8f 170
b75a7d8f 171