]> git.saurik.com Git - apple/icu.git/blame - icuSources/extra/uconv/Makefile.in
ICU-3.13.tar.gz
[apple/icu.git] / icuSources / extra / uconv / Makefile.in
CommitLineData
b75a7d8f
A
1## ******************************************************************************
2## *
3## * Copyright (C) 1999-2000, International Business Machines
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)
29RESFILES=$(RESSRC:$(RESOURCESDIR)$(FILESEPCHAR)%.txt=$(RESDIR)/$(RESOURCESDIR)$(FILESEPCHAR)$(MSGNAME)_%.res)
30
31##
32
33SECTION = 1
34
35ALL_MAN_FILES = $(TARGET).$(SECTION)
36
37## Extra files to remove for 'make clean'
38CLEANFILES = *~ $(DEPS) $(ALL_MAN_FILES)
39
40## Target information
41TARGET = uconv
42
43CPPFLAGS += -I$(top_builddir)/common -I$(top_srcdir)/common -I$(top_srcdir)/i18n -I$(srcdir)/../toolutil
44LIBS = $(LIBICUI18N) $(LIBICUUC) $(DEFAULT_LIBS) $(LIB_M)
45
46## generic settings for data - common.
47PKGMODE=common
48INSTALLTO=$(DESTDIR)$(ICUDATA_DIR)
49UCONVMSG_LIB=dummy
50
51## Static mode
52ifeq ($(UCONVMSG_MODE),static)
53DEFS += -DUCONVMSG_LINK=$(MSGNAME)
54UCONVMSG_LIB = $(RESDIR)/lib$(MSGNAME).a
55LIBS += $(UCONVMSG_LIB)
56PKGMODE=static
57INSTALLTO=$(libdir)
58endif
59
60## DLL mode
61ifeq ($(UCONVMSG_MODE),dll)
62DEFS += -DUCONVMSG_LINK=$(MSGNAME)
63LIBS += -L$(RESDIR) -l$(MSGNAME)
64PKGMODE=dll
65INSTALLTO=$(libdir)
66endif
67
68OBJECTS = uconv.o uwmsg.o
69
70DEPS = $(OBJECTS:.o=.d)
71
72## List of phony targets
73.PHONY : all all-local install install-local clean clean-local \
74distclean resclean distclean-local dist dist-local check check-local resfiles package-resfiles install-resfiles install-man
75
76## Clear suffix list
77.SUFFIXES :
78
79## List of standard targets
80all: all-local
81
82install: install-local
83clean: clean-local
84distclean : distclean-local
85dist: dist-local
86check: check-local
87
88all-local: $(TARGET) resfiles $(ALL_MAN_FILES)
89
90install-local: all-local install-target install-resfiles install-man
91
92install-target: all-local
93 $(MKINSTALLDIRS) $(DESTDIR)$(bindir)
94 $(INSTALL) $(TARGET) $(DESTDIR)$(bindir)/$(TARGET)
95
96dist-local:
97
98clean-local: resclean
99 test -z "$(CLEANFILES)" || $(RMV) $(CLEANFILES) $(RESFILES)
100 $(RMV) $(OBJECTS) $(TARGET)
101
102resclean:
103 -$(INVOKE) $(top_builddir)/tools/pkgdata/pkgdata --clean -p $(RESDIR) -O pkgdata.inc -m $(PKGMODE) -d $(RESDIR) -T $(RESDIR) $(RESDIR)/$(RESDIR).lst
104 $(RMV) pkgdata.inc $(RESDIR)
105
106distclean-local: clean-local
107 $(RMV) Makefile $(DEPS)
108
109check-local:
110
111Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
112 cd $(top_builddir) \
113 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
114
115pkgdata.inc: $(srcdir)/pkgdata.inc.in $(top_builddir)/config.status
116 cd $(top_builddir) \
117 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
118
119$(TARGET) : $(OBJECTS) $(UCONVMSG_LIB)
120 $(LINK.cc) -o $@ $(OBJECTS) $(LIBS)
121
122resfiles: $(RESFILES) package-resfiles
123
124ifeq ($(UCONVMSG_STATIC),YES)
125$(UCONVMSG_LIB): resfiles
126endif
127
128
129package-resfiles: $(RESDIR)/$(RESDIR).lst pkgdata.inc
130 $(INVOKE) $(top_builddir)/tools/pkgdata/pkgdata -p $(RESDIR) -O pkgdata.inc -m $(PKGMODE) -d $(RESDIR) -T $(RESDIR) $(RESDIR)/$(RESDIR).lst
131
132$(RESDIR)/$(RESDIR).lst: Makefile pkgdata.inc $(srcdir)/resfiles.mk
133 @$(MKINSTALLDIRS) $(RESDIR)
134 @-$(RMV) $@
135 @for file in $(RESFILES); do \
136 echo `pwd`/$$file >> $@; \
137 done;
138
139# no install for static mode
140ifneq ($(UCONVMSG_MODE),static)
141install-resfiles: $(RESFILES)
142 $(MKINSTALLDIRS) $(DESTDIR)$(ICUDATA_DIR)
143 $(INVOKE) $(top_builddir)/tools/pkgdata/pkgdata -p $(RESDIR) -O pkgdata.inc -m $(PKGMODE) -d $(RESDIR) -I $(INSTALLTO) -T $(RESDIR) $(RESDIR)/$(RESDIR).lst
144endif
145
146##
147$(UCONVMSG_LIB): resfiles
148
149$(RESDIR)/$(RESOURCESDIR)/$(MSGNAME)_%.res: $(srcdir)/$(RESOURCESDIR)/%.txt
150 $(MKINSTALLDIRS) $(@D)
151 $(INVOKE) $(top_builddir)/tools/genrb/genrb -p $(MSGNAME) -e UTF-8 -s $(^D) -d $(@D) $(^F)
152
153install-man: $(ALL_MAN_FILES)
154 $(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man$(SECTION)
155 $(INSTALL_DATA) $? $(DESTDIR)$(mandir)/man$(SECTION)
156
157%.$(SECTION): $(srcdir)/%.$(SECTION).in
158 cd $(top_builddir) \
159 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
160
161# Don't do this. This is a problem when changing platforms.
162#ifneq ($(MAKECMDGOALS),distclean)
163#-include $(DEPS)
164#endif
165