1 # Copyright (c) 2000-2004 IBM, Inc. and others
4 # - configure, build, install ICU
5 # - ensure that 'icu-config' is in the PATH (PREFIX/bin/icu-config)
6 # - if ICU is not built relative to this directory,
7 # set the variable ICU_PATH to the 'icu' directory
9 # - do 'make' in this directory
12 # Include ICU standard definitions
15 # look for the ICU_PATH variable, guess if not there
16 ICU_DEFAULT_PATH=../../..
18 ifeq ($(strip $(ICU_PATH)),)
19 ICU_PATH=$(ICU_DEFAULT_PATH)
26 # All object files (C or C++)
29 OBJECTS=$(OBJECTS1) $(OBJECTS2)
31 CLEANFILES=*~ $(TARGET).out
33 all: $(TARGET1) $(TARGET2)
35 # The following lines are to make sure ICU_PATH is set properly.
36 writer.o: $(ICU_PATH)/source/tools/toolutil/uoptions.h
38 $(ICU_PATH)/source/tools/toolutil/uoptions.h:
40 @echo "*** Please read the directions at the top of this file (Makefile)"
41 @echo "*** Can't open $@ - check ICU_PATH"
45 # Only the writer needs these, actually.
46 CPPFLAGS += -I$(ICU_PATH)/source/tools/toolutil
47 LDFLAGS += -L$(ICU_PATH)/source/tools/toolutil $(shell icu-config --ldflags-toolutil)
50 .PHONY: all clean distclean check report
53 -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
54 -$(RMV) $(OBJECTS) $(TARGET1) $(TARGET2)
56 # Can change this to LINK.c if it is a C only program
57 # Can add more libraries here.
58 $(TARGET1): $(OBJECTS1)
59 $(CC) -o $@ $^ $(LDFLAGS)
61 $(TARGET2): $(OBJECTS2)
62 $(CC) -o $@ $^ $(LDFLAGS)
64 # Make check: simply runs the sample, logged to a file
65 check: $(TARGET1) $(TARGET2)
66 $(INVOKE) ./$(TARGET2) | tee $(TARGET2).out
67 $(INVOKE) ./$(TARGET1) | tee $(TARGET1).out