]> granicus.if.org Git - icu/commitdiff
ICU-9441 changes made to makefiles to enable static build of /source/samples
authorDebabrata Sengupta <dsengup@svn.icu-project.org>
Tue, 24 Jul 2012 19:21:36 +0000 (19:21 +0000)
committerDebabrata Sengupta <dsengup@svn.icu-project.org>
Tue, 24 Jul 2012 19:21:36 +0000 (19:21 +0000)
X-SVN-Rev: 32060

icu4c/source/samples/defs.mk
icu4c/source/samples/rules.mk
icu4c/source/samples/udata/Makefile

index 5e50fdd086a5a4ec100bf9bfe5cfcf25ae6f1646..1ff77f3e7b7b8425b93da6a58c0edac0479e8f72 100644 (file)
@@ -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)
index f0eec929b2196bf6fcc20b32d7bfadfde48e86d1..ac0e27e4f120eb1acb61d5c68f193ed2ff6df84e 100644 (file)
@@ -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)
index 525c6f9ebd0eceb26e36778736f7101c88bf41c0..450e7ded4c0a7fc3b310dc4053b8997f8ec9441f 100644 (file)
@@ -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)