From 540194df06a4a689d56019347ec4fa5d29994834 Mon Sep 17 00:00:00 2001 From: Debabrata Sengupta Date: Tue, 24 Jul 2012 19:21:36 +0000 Subject: [PATCH] ICU-9441 changes made to makefiles to enable static build of /source/samples X-SVN-Rev: 32060 --- icu4c/source/samples/defs.mk | 4 ++-- icu4c/source/samples/rules.mk | 4 ++-- icu4c/source/samples/udata/Makefile | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/icu4c/source/samples/defs.mk b/icu4c/source/samples/defs.mk index 5e50fdd086a..1ff77f3e7b7 100644 --- a/icu4c/source/samples/defs.mk +++ b/icu4c/source/samples/defs.mk @@ -1,4 +1,4 @@ -# Copyright (c) 2002-2011 IBM, Inc. and others +# Copyright (c) 2002-2012 IBM, Inc. and others # Sample code makefile definitions CLEANFILES=*~ $(TARGET).out @@ -10,7 +10,7 @@ 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) +LDFLAGS =$^ $(shell icu-config --ldflags) LDFLAGS_USTDIO =$(shell icu-config --ldflags-icuio) INVOKE=$(shell icu-config --invoke) GENRB=$(shell icu-config --invoke=genrb) diff --git a/icu4c/source/samples/rules.mk b/icu4c/source/samples/rules.mk index f0eec929b21..ac0e27e4f12 100644 --- a/icu4c/source/samples/rules.mk +++ b/icu4c/source/samples/rules.mk @@ -1,4 +1,4 @@ -# Copyright (c) 2002-2010 IBM, Inc. and others +# Copyright (c) 2002-2012 IBM, Inc. and others # sample code rules for a single-target simple sample # list of targets that aren't actually created @@ -7,7 +7,7 @@ all: $(ALL_SUBDIR) $(RESTARGET) $(TARGET) $(TARGET): $(OBJECTS) - $(LINK.cc) $^ $(LOADLIBES) $(LDLIBS) -o $@ $(XTRALIBS) + $(LINK.cc) $(LOADLIBES) $(LDLIBS) -o $@ $(XTRALIBS) -licui18n -licuuc $(RESTARGET): $(RESFILES) $(PKGDATA) --name $(RESNAME) --mode $(RESMODE) $(PKGDATAOPTS) $(RESLIST) diff --git a/icu4c/source/samples/udata/Makefile b/icu4c/source/samples/udata/Makefile index 525c6f9ebd0..450e7ded4c0 100644 --- a/icu4c/source/samples/udata/Makefile +++ b/icu4c/source/samples/udata/Makefile @@ -1,4 +1,4 @@ -# Copyright (c) 2000-2010 IBM, Inc. and others +# Copyright (c) 2000-2012 IBM, Inc. and others # udata sample code # Usage: # - configure, build, install ICU @@ -56,10 +56,10 @@ distclean clean: # Can change this to LINK.c if it is a C only program # Can add more libraries here. $(TARGET1): $(OBJECTS1) - $(CC) -o $@ $^ $(LDFLAGS) + $(CXX) -o $@ $(LDFLAGS) $(TARGET2): $(OBJECTS2) - $(CC) -o $@ $^ $(LDFLAGS) + $(CXX) -o $@ $(LDFLAGS) -licui18n -licuuc # Make check: simply runs the sample, logged to a file check: $(TARGET1) $(TARGET2)