1 # Copyright (c) 2001 IBM, Inc. and others
2 # conversion sample code $Revision: 1.1.1.1 $
6 # - configure and build ICU [see the docs] .. use "--prefix=" something
7 # (I used --prefix=/home/srl/III )
9 # - do 'make install' of icu
11 # - set the variable ICU_PREFIX to point at $(prefix)
12 # (will look for $(prefix)/lib/icu/Makefile.inc )
14 # - set the variable ICU_LEGACY (read the README)
15 # ( Will look for ICU_LEGACY/include/unicode/ucol.h )
17 # - do 'make' in this directory
19 #ICU_PREFIX=/home/weiv/build/current
20 #ICU_LEGACY = /home/weiv/build/icu-1-8-1
22 LEGACY_INCLUDE = $(ICU_LEGACY)/include
24 ICU_INC=$(ICU_PREFIX)/lib/icu/Makefile.inc
32 # All object files (C or C++)
33 OBJECTS=legacy.o newcol.o oldcol.o
35 CLEANFILES=*~ $(TARGET).out
39 # turn on super warnings
42 all: $(TARGET) $(ICU_INC)
44 .PHONY: all clean distclean check report
46 oldcol.o : oldcol.cpp $(LEGACY_INCLUDE)/unicode/ucol.h
47 $(CXX) -I$(LEGACY_INCLUDE) $(DEFS) $(CPPFLAGS) $(CXXFLAGS) -c oldcol.cpp
50 -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
51 -$(RMV) $(OBJECTS) $(TARGET)
54 # Can change this to LINK.c if it is a C only program
55 # Can add more libraries here.
57 $(LINK.cc) -o $@ $^ $(ICULIBS) $(ICU_PREFIX)/lib/libicuuc.so.18 $(ICU_PREFIX)/lib/libicui18n.so.18
59 # Make check: simply runs the sample, logged to a file
61 $(INVOKE) ./$(TARGET) | tee $(TARGET).out
63 # Make report: creates a 'report file' with both source and sample run
64 report: $(TARGET).report
66 $(TARGET).report: check $(TARGET).cpp
67 more $(TARGET).cpp $(TARGET).out > $@
70 @echo ICU_PREFIX variable is not set correctly
71 @echo "Please read the directions at the top of this file (Makefile)"
72 @echo "And the README"
73 @echo "Can't open $(ICU_INC)"
76 $(LEGACY_INCLUDE)/unicode/ucol.h:
77 @echo ICU_LEGACY variable is not set correctly.
78 @echo "Please read the directions at the top of this file (Makefile)"
79 @echo "And the README"
83 ifneq ($(MAKECMDGOALS),distclean)