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