-# Copyright (c) 2002-2011 IBM, Inc. and others
+# Copyright (c) 2002-2012 IBM, Inc. and others
# Sample code makefile definitions
CLEANFILES=*~ $(TARGET).out
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)
-# 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
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)
-# Copyright (c) 2000-2010 IBM, Inc. and others
+# Copyright (c) 2000-2012 IBM, Inc. and others
# udata sample code
# Usage:
# - configure, build, install ICU
# 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)