1 # Copyright (C) 2016 and later: Unicode, Inc. and others.
2 # License & terms of use: http://www.unicode.org/copyright.html#License
4 # Copyright (c) 2001-2004 IBM, Inc. and others
5 # conversion sample code
9 # - configure and build ICU [see the docs] .. use "--prefix=" something
10 # (I used --prefix=/home/srl/III )
12 # - do 'make install' of icu
14 # - set the variable ICU_PREFIX to point at $(prefix)
15 # (will look for $(prefix)/lib/icu/Makefile.inc )
17 # - set the variable ICU_LEGACY (read the README)
18 # ( Will look for ICU_LEGACY/include/unicode/ucol.h )
20 # - do 'make' in this directory
22 #ICU_PREFIX=/home/weiv/build/current
23 #ICU_LEGACY = /home/weiv/build/icu-1-8-1
25 LEGACY_INCLUDE = $(ICU_LEGACY)/include
27 ICU_INC=$(ICU_PREFIX)/lib/icu/Makefile.inc
35 # All object files (C or C++)
36 OBJECTS=legacy.o newcol.o oldcol.o
38 CLEANFILES=*~ $(TARGET).out
42 # turn on super warnings
45 all: $(TARGET) $(ICU_INC)
47 .PHONY: all clean distclean check report
49 oldcol.o : oldcol.cpp $(LEGACY_INCLUDE)/unicode/ucol.h
50 $(CXX) -I$(LEGACY_INCLUDE) $(DEFS) $(CPPFLAGS) $(CXXFLAGS) -c oldcol.cpp
53 -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
54 -$(RMV) $(OBJECTS) $(TARGET)
57 # Can change this to LINK.c if it is a C only program
58 # Can add more libraries here.
60 $(LINK.cc) -o $@ $^ $(ICULIBS) $(ICU_PREFIX)/lib/libicuuc.so.18 $(ICU_PREFIX)/lib/libicui18n.so.18
62 # Make check: simply runs the sample, logged to a file
64 $(INVOKE) ./$(TARGET) | tee $(TARGET).out
66 # Make report: creates a 'report file' with both source and sample run
67 report: $(TARGET).report
69 $(TARGET).report: check $(TARGET).cpp
70 more $(TARGET).cpp $(TARGET).out > $@
73 @echo ICU_PREFIX variable is not set correctly
74 @echo "Please read the directions at the top of this file (Makefile)"
75 @echo "And the README"
76 @echo "Can't open $(ICU_INC)"
79 $(LEGACY_INCLUDE)/unicode/ucol.h:
80 @echo ICU_LEGACY variable is not set correctly.
81 @echo "Please read the directions at the top of this file (Makefile)"
82 @echo "And the README"
86 ifneq ($(MAKECMDGOALS),distclean)