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

« back to all changes in this revision

Viewing changes to source/samples/legacy/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) 2001 IBM, Inc. and others
 
2
# conversion sample code $Revision: 1.1 $
 
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_PREFIX=/home/weiv/build/current
 
19
ICU_LEGACY = /home/weiv/build/icu-1-8-1
 
20
LEGACY_INCLUDE = $(ICU_LEGACY)/include
 
21
 
 
22
 
 
23
ifeq ($(strip $(ICU_PREFIX)),)
 
24
  ICU_INC=$(ICU_DEFAULT_PREFIX)/lib/icu/Makefile.inc
 
25
else
 
26
  ICU_INC=$(ICU_PREFIX)/lib/icu/Makefile.inc
 
27
endif
 
28
ICUPATH=
 
29
 
 
30
include $(ICU_INC)
 
31
 
 
32
# Name of your target
 
33
TARGET=legacy
 
34
 
 
35
# All object files (C or C++)
 
36
OBJECTS=legacy.o newcol.o oldcol.o
 
37
 
 
38
CLEANFILES=*~ $(TARGET).out
 
39
 
 
40
DEPS=$(OBJECTS:.o=.d)
 
41
 
 
42
# turn on super warnings
 
43
#CPPFLAGS += -Wall
 
44
 
 
45
 
 
46
all: $(TARGET)
 
47
 
 
48
.PHONY: all clean distclean check report
 
49
 
 
50
oldcol.o : oldcol.cpp
 
51
        $(CXX) -I$(LEGACY_INCLUDE) $(DEFS) $(CPPFLAGS) $(CXXFLAGS) -c oldcol.cpp
 
52
 
 
53
distclean clean:
 
54
        -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
 
55
        -$(RMV) $(OBJECTS) $(TARGET)
 
56
        -$(RMV) $(DEPS)
 
57
 
 
58
# Can change this to LINK.c if it is a C only program
 
59
# Can add more libraries here. 
 
60
$(TARGET): $(OBJECTS)
 
61
        $(LINK.cc) -o $@ $^ $(ICULIBS) $(ICU_PREFIX)/lib/libicuuc.so.18 $(ICU_PREFIX)/lib/libicui18n.so.18 
 
62
 
 
63
# Make check: simply runs the sample, logged to a file
 
64
check: $(TARGET)
 
65
        $(TARGET) | tee $(TARGET).out
 
66
 
 
67
# Make report: creates a 'report file' with both source and sample run
 
68
report: $(TARGET).report
 
69
 
 
70
$(TARGET).report: check $(TARGET).cpp
 
71
        more $(TARGET).cpp $(TARGET).out > $@
 
72
 
 
73
$(ICU_INC):
 
74
        @echo "Please read the directions at the top of this file (Makefile)"
 
75
        @echo "Can't open $(ICU_INC)"
 
76
        @false
 
77
 
 
78
ifneq ($(MAKECMDGOALS),distclean)
 
79
-include $(DEPS)
 
80
endif