blob: bc8e9dcee51c448e4833e605aa315f477a938891 [file] [log] [blame]
## Makefile.in for ICU tools
## Copyright (c) 1999-2000, International Business Machines Corporation and
## others. All Rights Reserved.
## Shell to use
SHELL = @SHELL@
VERSION = @VERSION@
## Install directory information
srcdir = @srcdir@
top_srcdir = @top_srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
CC = @CC@
CXX = @CXX@
CPPFLAGS = @CPPFLAGS@ -I$(top_srcdir)/common
CFLAGS = @CFLAGS@
CXXFLAGS = @CXXFLAGS@
@host_frag@
bindir = @bindir@
sbindir = @sbindir@
datadir = @datadir@
libdir = @libdir@
includedir = @includedir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
ICUDATADIR=$(pkgdatadir)/$(VERSION)
SRCDATADIR=$(top_builddir)/../data
## Build directory information
top_builddir = ..
subdir = tools
## Install program information
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
## for cleaning up libraries
STRIP = @STRIP@
## Package information
PACKAGE = @PACKAGE@
VERSION = @VERSION@
SUBDIRS = ctestfw toolutil makeconv genrb gencol rbdump \
genccode gennames gencmn gencnval gentz
## List of phony targets
.PHONY : all all-local all-recursive install install-local install-everything install-files install-dlls build-data build-cmnfile build-dll \
install-recursive clean clean-local clean-recursive distclean \
distclean-local distclean-recursive dist dist-local dist-recursive \
check check-local check-recursive
## Clear suffix list
.SUFFIXES :
## List of standard targets
all: all-recursive all-local
install: install-recursive install-local
clean: clean-recursive clean-local
distclean : distclean-recursive distclean-local
dist: dist-recursive dist-local
check: check-recursive check-local
## Recursive targets
all-recursive install-recursive clean-recursive distclean-recursive dist-recursive check-recursive:
@dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
local_target="$$target-local"; \
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $$local_target); \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) "$$target-local" || exit 1; \
fi
all-local: build-local
DAT_FILES=unames.dat cnvalias.dat tz.dat
BRK_FILES=char.brk line.brk line_th.brk sent.brk word.brk word_th.brk
DATAFILESD=$(DAT_FILES:%=$(SRCDATADIR)/%)
DATAFILESB=$(BRK_FILES:%=$(SRCDATADIR)/%)
# copy the right endianness
ifeq (@U_IS_BIG_ENDIAN@,1)
%.brk: %BE.brk
cp $< $@
else
%.brk: %LE.brk
cp $< $@
endif
include makeconv/ucmfiles.mk
-include makeconv/ucmlocal.mk
ALL_UCM_SOURCE= $(UCM_SOURCE) $(UCM_SOURCE_LOCAL)
UCM_FILES = $(ALL_UCM_SOURCE:%=$(top_srcdir)/../data/%)
CNV_FILES = $(UCM_FILES:.ucm=.cnv)
DATAFILESC=$(CNV_FILES)
DATAFILES=$(DATAFILESD) $(DATAFILESC) $(DATAFILESB)
SRCDATAFILESD=$(DATAFILESD:.dat=_dat.c)
SRCDATAFILESC=$(DATAFILESC:%.cnv=%_cnv.c)
SRCDATAFILESB=$(DATAFILESB:%.brk=%_brk.c)
SRCDATAFILES=$(SRCDATAFILESD) $(SRCDATAFILESC) $(SRCDATAFILESB)
OBJDATAFILES=$(SRCDATAFILES:%.c=%.o)
COMMONFILE=$(SRCDATADIR)/icudata.dat
COMMONDLL=$(SRCDATADIR)/libicudata.$(SO)
# the files to be installed -- the COMMON ones + any stragglers
UDATA_FILES=icudata.dat
UDATA_DLLS=libicudata.$(SO)
### use the "--enable-mapped=" option to configure, to get mapped file behavior.
# the case where '--enable-mapped=yes'
@USE_MAPPED_TRUE@build-local: build-data build-cmnfile
# the case where '--enable-mapped=no' (DEFAULT)
@USE_MAPPED_FALSE@build-local: build-data build-dll
###
# check for any other generated data here
install-data: $(DATAFILES)
build-cmnfile: $(COMMONFILE)
# the -Wpath [etc] has relative DLL paths in it
# so we have to cd into the other dir..
gencmn/mkmap.tmp: Makefile
$(COMMONFILE): $(DATAFILES)
@-rm -f gencmn/mkmap.tmp
@for file in $(DATAFILES); do \
echo `pwd`/$$file >> gencmn/mkmap.tmp; \
done;
@echo -n Generating common file $(COMMONFILE). Number of files:
-@wc -l gencmn/mkmap.tmp
-rm -f $(COMMONFILE)
@(cd gencmn ; ICU_DATA=../$(SRCDATADIR) ./gencmn 1000000 mkmap.tmp )
-@ls -l $(COMMONFILE)
build-dll: $(COMMONDLL)
%_dat.c: %.dat
(cd genccode ; ./genccode ../$< )
%_cnv.c: %.cnv
(cd genccode ; ./genccode ../$< )
%_brk.c: %.brk
(cd genccode ; ./genccode ../$< )
## Note: this generates a dummy C++ file to cause the HPUX CC linker
## to load exception handling (when requested..)
hpux_junk_obj.cpp:
echo "void to_emit_cxx_stuff_in_the_linker(){}" >> hpux_junk_obj.cpp
hpux_junk_obj.o: hpux_junk_obj.cpp
$(COMPILE.cc) -o $@ $<
# strip is optional
# -$(STRIP) $@
# HPUX_JUNK_OBJ is usually unset except by mh-hpux-cc
$(COMMONDLL): $(OBJDATAFILES) $(HPUX_JUNK_OBJ)
$(SHLIB.c) -o $@ $^
-ls -l $@
srcs: $(SRCDATAFILES)
## Files to remove for 'make clean'
CLEANFILES = *~ $(BRK_FILES)
### use the "--enable-mapped=" option to configure, to get mapped file behavior.
# the case where '--enable-mapped=yes' - raw files [which can be mapped]
@USE_MAPPED_TRUE@install-udata: install-files
# the case where '--enable-mapped=no' (DEFAULT) - DLL's [so's to you]
@USE_MAPPED_FALSE@install-udata: install-dlls
###
install-local: build-local install-udata
install-everything: install-files install-dlls
install-files:
@for file in $(UDATA_FILES); do \
echo $(INSTALL_DATA) $(top_builddir)/../data/$$file $(pkgdatadir)/$(VERSION)/$$file; \
$(INSTALL_DATA) $(top_builddir)/../data/$$file $(pkgdatadir)/$(VERSION)/$$file; \
done
install-dlls:
@for file in $(UDATA_DLLS); do \
echo $(INSTALL_DATA) $(top_builddir)/../data/$$file $(pkgdatadir)/$(VERSION)/$$file; \
$(INSTALL_DATA) $(top_builddir)/../data/$$file $(pkgdatadir)/$(VERSION)/$$file; \
done
dist-local:
clean-local:
test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-local:
rm -f Makefile
check-local:
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) \
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status