## Makefile.in for ICUapps - icuapps/locexp
## Steven  R. Loomis

# Uncomment the following to set a custom URL prefix on things such as
# gifs, etc.   Put the contents of html/ somewhere where this URL can
# access them.   The example below would construct a URL such as
#   /~srl/localeexplorer/closed.gif
#  ^^^^^^^  
#
#URLPREFIX=-DURLPREFIX=\"/~srl\"

srcdir=@srcdir@
top_srcdir=@top_srcdir@

# srcdir must be set before this is included
include @ICU_MAKEFILE@

## Build directory information
top_builddir = ..
subdir = locexp

SUBDIRS=tools util resource

## Extra files to remove for 'make clean'
CLEANFILES = *~

## Target information
TARGET = locexp

OBJECTS = locexp.o

DEPS = $(OBJECTS:.o=.d)

ICULIBS += -lusort -llxutil -lustdio

# We want to get the local copies of these files first, as the
# dependency. Even though they do get exported.
LDFLAGS := -L../usort/lib -L./util $(LDFLAGS)

# get the hostname the code is built on
CPPFLAGS := $(URLPREFIX) -DLXHOSTNAME=\"`hostname`\" -I../usort/lib -I./util $(CPPFLAGS)

## List of phony targets
.PHONY : all all-local install install-local clean clean-local \
distclean distclean-local dist dist-local check check-local all-recursive \
 install-recursive clean-recursive distclean-recursive dist-recursive \
 distclean-recursive check-recursive icudata-dir  icudata-res icudata-conv icudata-clean icudata-dir 

## Clear suffix list
.SUFFIXES :

## List of standard targets
all: all-local all-recursive
install: install-recursive install-local
	@echo "NOT installing anything from the icudata directory. Read icudata/README for more information!"

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: $(TARGET) icudata-dir

install-local: install-target

mkinstalldirs = $(SHELL) $(sbindir)/mkinstalldirs

install-target: all-local
	$(mkinstalldirs) $(bindir)
	$(INSTALL) $(TARGET) $(bindir)/$(TARGET)

dist-local:

clean-local:
	test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
	rm -f $(OBJECTS) $(TARGET)

distclean-local: clean-local
	rm -f Makefile $(DEPS)

check-local:

Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
	cd $(top_builddir) \
	 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status

# ICULIBS includes all standard ICU libraries.
# if we wanted only part of the ICU, we could use (for example) just
#         '$(LIBS) -licu-uc -lusort' ...

$(TARGET) : $(OBJECTS)
	$(LINK.c) -o $@ $^ $(ICULIBS)

ifneq ($(MAKECMDGOALS),distclean)
-include $(DEPS)
endif

icudata-all: icudata-dir icudata-res icudata-conv

icudata-dir:
	@test -d icudata || tar xvfpz icudata.tgz

icudata-res: icudata-dir
	$(sbindir)/genrb icudata/*.txt

icudata-conv: icudata-dir
	$(sbindir)/makeconv icudata/*.ucm

icudata-clean: icudata-dir
	-rm -f icudata/*.cnv icudata/*.res

icudata-tgz: icudata-clean
	tar cvfpz icudata.tgz icudata/
