blob: f3dfda63dd785c09eb57b1c7dbfbceab9190575c [file] [log] [blame]
# Copyright (C) 2016 and later: Unicode, Inc. and others.
# License & terms of use:
# Copyright (c) 2001-2004 IBM, Inc. and others
# conversion sample code
# Usage:
# - configure and build ICU [see the docs] .. use "--prefix=" something
# (I used --prefix=/home/srl/III )
# - do 'make install' of icu
# - set the variable ICU_PREFIX to point at $(prefix)
# (will look for $(prefix)/lib/icu/ )
# - set the variable ICU_LEGACY (read the README)
# ( Will look for ICU_LEGACY/include/unicode/ucol.h )
# - do 'make' in this directory
#ICU_LEGACY = /home/weiv/build/icu-1-8-1
-include $(ICU_INC)
# Name of your target
# All object files (C or C++)
OBJECTS=legacy.o newcol.o oldcol.o
# turn on super warnings
#CPPFLAGS += -Wall
all: $(TARGET) $(ICU_INC)
.PHONY: all clean distclean check report
oldcol.o : oldcol.cpp $(LEGACY_INCLUDE)/unicode/ucol.h
distclean clean:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
-$(RMV) $(DEPS)
# Can change this to LINK.c if it is a C only program
# Can add more libraries here.
$( -o $@ $^ $(ICULIBS) $(ICU_PREFIX)/lib/ $(ICU_PREFIX)/lib/
# Make check: simply runs the sample, logged to a file
check: $(TARGET)
$(INVOKE) ./$(TARGET) | tee $(TARGET).out
# Make report: creates a 'report file' with both source and sample run
report: $(TARGET).report
$(TARGET).report: check $(TARGET).cpp
more $(TARGET).cpp $(TARGET).out > $@
@echo ICU_PREFIX variable is not set correctly
@echo "Please read the directions at the top of this file (Makefile)"
@echo "And the README"
@echo "Can't open $(ICU_INC)"
@echo ICU_LEGACY variable is not set correctly.
@echo "Please read the directions at the top of this file (Makefile)"
@echo "And the README"
@echo "Can't open $@"
ifneq ($(MAKECMDGOALS),distclean)
-include $(DEPS)