mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-14 09:21:03 +00:00
ICU-1861 update for aix
X-SVN-Rev: 8573
This commit is contained in:
parent
80aced9fe9
commit
0825e7cca7
4 changed files with 58 additions and 98 deletions
20
icu4c/source/samples/defs.mk
Normal file
20
icu4c/source/samples/defs.mk
Normal file
|
@ -0,0 +1,20 @@
|
|||
# Copyright (c) 2002 IBM, Inc. and others
|
||||
# Sample code makefile definitions
|
||||
|
||||
CLEANFILES=*~ $(TARGET).out
|
||||
####################################################################
|
||||
# Load ICU information. You can copy this to other makefiles #######
|
||||
####################################################################
|
||||
CC=$(shell icu-config --cc)
|
||||
CXX=$(shell icu-config --cxx)
|
||||
CPPFLAGS=$(shell icu-config --cppflags)
|
||||
CFLAGS=$(shell icu-config --cflags)
|
||||
CXXFLAGS=$(shell icu-config --cxxflags)
|
||||
LDFLAGS =$(shell icu-config --ldflags)
|
||||
INVOKE=$(shell icu-config --invoke)
|
||||
####################################################################
|
||||
### Project independent things (common)
|
||||
### We depend on gmake for the bulk of the work
|
||||
|
||||
# link with C++ compiler
|
||||
LINK.o=$(LINK.cc)
|
21
icu4c/source/samples/rules.mk
Normal file
21
icu4c/source/samples/rules.mk
Normal file
|
@ -0,0 +1,21 @@
|
|||
# Copyright (c) 2002 IBM, Inc. and others
|
||||
# sample code rules for a single-target simple sample
|
||||
|
||||
all: $(TARGET)
|
||||
|
||||
$(TARGET): $(OBJECTS)
|
||||
|
||||
# list of targets that aren't actually created
|
||||
.PHONY: all clean distclean check report
|
||||
|
||||
# clean out files
|
||||
distclean clean:
|
||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
-rm $(OBJECTS) $(TARGET)
|
||||
|
||||
# Make check: simply runs the sample, logged to a file
|
||||
check: $(TARGET)
|
||||
$(INVOKE) ./$(TARGET) | tee $(TARGET).out
|
||||
|
||||
|
||||
|
|
@ -1,6 +1,5 @@
|
|||
# Copyright (c) 2000 IBM, Inc. and others
|
||||
# conversion sample code $Revision: 1.6 $
|
||||
|
||||
# Copyright (c) 2000-2002 IBM, Inc. and others
|
||||
# sample code makefile
|
||||
|
||||
# Usage:
|
||||
# - configure, build, install ICU (make install)
|
||||
|
@ -14,41 +13,11 @@ TARGET=convsamp
|
|||
# All object files (C or C++)
|
||||
OBJECTS=convsamp.o flagcb.o
|
||||
|
||||
CLEANFILES=*~ $(TARGET).out
|
||||
|
||||
####################################################################
|
||||
# Load ICU information. You can copy this to other makefiles #######
|
||||
####################################################################
|
||||
CC=$(shell icu-config --cc)
|
||||
CXX=$(shell icu-config --cxx)
|
||||
CPPFLAGS=$(shell icu-config --cppflags)
|
||||
CFLAGS=$(shell icu-config --cflags)
|
||||
CXXFLAGS=$(shell icu-config --cxxflags)
|
||||
LDFLAGS =$(shell icu-config --ldflags)
|
||||
####################################################################
|
||||
|
||||
# turn on super warnings
|
||||
#CPPFLAGS += -Wall
|
||||
|
||||
$(TARGET): $(OBJECTS)
|
||||
|
||||
all: $(TARGET)
|
||||
|
||||
.PHONY: all clean distclean check report
|
||||
|
||||
distclean clean:
|
||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
-rm $(OBJECTS) $(TARGET)
|
||||
|
||||
# Make check: simply runs the sample, logged to a file
|
||||
check: $(TARGET)
|
||||
./$(TARGET) | tee $(TARGET).out
|
||||
|
||||
# Make report: creates a 'report file' with both source and sample run
|
||||
report: $(TARGET).report
|
||||
|
||||
$(TARGET).report: check $(TARGET).cpp
|
||||
more $(TARGET).cpp $(TARGET).out > $@
|
||||
|
||||
# Load in standard makefile definitions
|
||||
include ../defs.mk
|
||||
|
||||
# extra files to clean up
|
||||
CLEANFILES += *.out data40.utf16 data41.utf16
|
||||
|
||||
# the actual rules (this is a simple sample)
|
||||
include ../rules.mk
|
||||
|
|
|
@ -1,70 +1,20 @@
|
|||
# Copyright (c) 2000 IBM, Inc. and others
|
||||
# conversion sample code $Revision: 1.3 $
|
||||
|
||||
# Copyright (c) 2002 IBM, Inc. and others
|
||||
# sample code makefile
|
||||
|
||||
# Usage:
|
||||
# - configure and build ICU [see the docs] .. use "--prefix=" something
|
||||
# (I used --prefix=/home/srl/III )
|
||||
#
|
||||
# - do 'make install' of icu
|
||||
#
|
||||
# - change the following line to point to the $(prefix) that
|
||||
# was used (will look for $(prefix)/share/icu/Makefile.inc )
|
||||
# OR
|
||||
# set the variable ICU_PREFIX to point at $(prefix)
|
||||
#
|
||||
# - configure, build, install ICU (make install)
|
||||
# - make sure "icu-config" (in the ICU installed bin directory) is on
|
||||
# the path
|
||||
# - do 'make' in this directory
|
||||
|
||||
ICU_DEFAULT_PREFIX=~/icu
|
||||
|
||||
ifeq ($(strip $(ICU_PREFIX)),)
|
||||
ICU_INC=$(ICU_DEFAULT_PREFIX)/lib/icu/Makefile.inc
|
||||
else
|
||||
ICU_INC=$(ICU_PREFIX)/lib/icu/Makefile.inc
|
||||
endif
|
||||
ICUPATH=
|
||||
|
||||
include $(ICU_INC)
|
||||
|
||||
# Name of your target
|
||||
TARGET=ustring
|
||||
|
||||
# All object files (C or C++)
|
||||
OBJECTS=ustring.o
|
||||
|
||||
CLEANFILES=*~ $(TARGET).out
|
||||
# Load in standard makefile definitions
|
||||
include ../defs.mk
|
||||
|
||||
DEPS=$(OBJECTS:.o=.d)
|
||||
|
||||
all: $(TARGET)
|
||||
|
||||
.PHONY: all clean distclean check report
|
||||
|
||||
distclean clean:
|
||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
-$(RMV) $(OBJECTS) $(TARGET)
|
||||
-$(RMV) $(DEPS)
|
||||
|
||||
# Can change this to LINK.c if it is a C only program
|
||||
# Can add more libraries here.
|
||||
$(TARGET): $(OBJECTS)
|
||||
$(LINK.cc) -o $@ $^ $(ICULIBS)
|
||||
|
||||
# Make check: simply runs the sample, logged to a file
|
||||
check: $(TARGET)
|
||||
$(INVOKE) ./$(TARGET) | tee $(TARGET).out
|
||||
|
||||
# Make report: creates a 'report file' with both source and sample run
|
||||
report: $(TARGET).report
|
||||
|
||||
$(TARGET).report: check $(TARGET).cpp
|
||||
more $(TARGET).cpp $(TARGET).out > $@
|
||||
|
||||
$(ICU_INC):
|
||||
@echo "Please read the directions at the top of this file (Makefile)"
|
||||
@echo "Can't open $(ICU_INC)"
|
||||
@false
|
||||
|
||||
ifneq ($(MAKECMDGOALS),distclean)
|
||||
-include $(DEPS)
|
||||
endif
|
||||
# the actual rules (this is a simple sample)
|
||||
include ../rules.mk
|
||||
|
|
Loading…
Add table
Reference in a new issue