~ubuntu-branches/ubuntu/gutsy/icu/gutsy-updates

« back to all changes in this revision

Viewing changes to source/samples/ustring/Makefile

  • Committer: Package Import Robot
  • Author(s): Jay Berkenbilt
  • Date: 2005-11-19 11:29:31 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20051119112931-vcizkrp10tli4enw
Tags: 3.4-3
Explicitly build with g++ 3.4.  The current ICU fails its test suite
with 4.0 but not with 3.4.  Future versions should work properly with
4.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (c) 2000 IBM, Inc. and others
2
 
# conversion sample code $Revision: 1.3 $
3
 
 
4
 
 
5
 
# Usage:
6
 
#  - configure and build ICU [see the docs] .. use "--prefix=" something
7
 
#     (I  used --prefix=/home/srl/III )
8
 
9
 
#  - do 'make install' of icu 
10
 
#
11
 
#  - change the following line to point to the $(prefix) that 
12
 
#    was used (will look for $(prefix)/share/icu/Makefile.inc )
13
 
#      OR 
14
 
#   set the variable ICU_PREFIX to point at $(prefix)
15
 
#  
16
 
#  - do 'make' in this directory
17
 
 
18
 
ICU_DEFAULT_PREFIX=~/icu
19
 
 
20
 
ifeq ($(strip $(ICU_PREFIX)),)
21
 
  ICU_INC=$(ICU_DEFAULT_PREFIX)/lib/icu/Makefile.inc
22
 
else
23
 
  ICU_INC=$(ICU_PREFIX)/lib/icu/Makefile.inc
24
 
endif
25
 
ICUPATH=
26
 
 
27
 
include $(ICU_INC)
28
 
 
29
 
# Name of your target
30
 
TARGET=ustring
31
 
 
32
 
# All object files (C or C++)
33
 
OBJECTS=ustring.o
34
 
 
35
 
CLEANFILES=*~ $(TARGET).out
36
 
 
37
 
DEPS=$(OBJECTS:.o=.d)
38
 
 
39
 
all: $(TARGET)
40
 
 
41
 
.PHONY: all clean distclean check report
42
 
 
43
 
distclean clean:
44
 
        -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
45
 
        -$(RMV) $(OBJECTS) $(TARGET)
46
 
        -$(RMV) $(DEPS)
47
 
 
48
 
# Can change this to LINK.c if it is a C only program
49
 
# Can add more libraries here. 
50
 
$(TARGET): $(OBJECTS)
51
 
        $(LINK.cc) -o $@ $^ $(ICULIBS)
52
 
 
53
 
# Make check: simply runs the sample, logged to a file
54
 
check: $(TARGET)
55
 
        $(INVOKE) ./$(TARGET) | tee $(TARGET).out
56
 
 
57
 
# Make report: creates a 'report file' with both source and sample run
58
 
report: $(TARGET).report
59
 
 
60
 
$(TARGET).report: check $(TARGET).cpp
61
 
        more $(TARGET).cpp $(TARGET).out > $@
62
 
 
63
 
$(ICU_INC):
64
 
        @echo "Please read the directions at the top of this file (Makefile)"
65
 
        @echo "Can't open $(ICU_INC)"
66
 
        @false
67
 
 
68
 
ifneq ($(MAKECMDGOALS),distclean)
69
 
-include $(DEPS)
70
 
endif