~ubuntu-branches/ubuntu/quantal/icu/quantal

« back to all changes in this revision

Viewing changes to source/samples/ucnv/Makefile

  • Committer: Package Import Robot
  • Author(s): Yves Arrouye
  • Date: 2002-03-03 15:31:13 UTC
  • Revision ID: package-import@ubuntu.com-20020303153113-3ssceqlq45xbmbnc
Tags: upstream-2.0-2.1pre20020303
ImportĀ upstreamĀ versionĀ 2.0-2.1pre20020303

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.4 $
 
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)/lib/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=/home/srl/II
 
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=convsamp
 
31
 
 
32
# All object files (C or C++)
 
33
OBJECTS=convsamp.o flagcb.o
 
34
 
 
35
CLEANFILES=*~ $(TARGET).out
 
36
 
 
37
DEPS=$(OBJECTS:.o=.d)
 
38
 
 
39
# turn on super warnings
 
40
#CPPFLAGS += -Wall
 
41
 
 
42
 
 
43
all: $(TARGET)
 
44
 
 
45
.PHONY: all clean distclean check report
 
46
 
 
47
distclean clean:
 
48
        -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
 
49
        -$(RMV) $(OBJECTS) $(TARGET)
 
50
        -$(RMV) $(DEPS)
 
51
 
 
52
# Can change this to LINK.c if it is a C only program
 
53
# Can add more libraries here. 
 
54
$(TARGET): $(OBJECTS)
 
55
        $(LINK.cc) -o $@ $^ $(ICULIBS)
 
56
 
 
57
# Make check: simply runs the sample, logged to a file
 
58
check: $(TARGET)
 
59
        $(TARGET) | tee $(TARGET).out
 
60
 
 
61
# Make report: creates a 'report file' with both source and sample run
 
62
report: $(TARGET).report
 
63
 
 
64
$(TARGET).report: check $(TARGET).cpp
 
65
        more $(TARGET).cpp $(TARGET).out > $@
 
66
 
 
67
$(ICU_INC):
 
68
        @echo "Please read the directions at the top of this file (Makefile)"
 
69
        @echo "Can't open $(ICU_INC)"
 
70
        @false
 
71
 
 
72
ifneq ($(MAKECMDGOALS),distclean)
 
73
-include $(DEPS)
 
74
endif