2012-07-24 19:21:36 +00:00
|
|
|
# Copyright (c) 2002-2012 IBM, Inc. and others
|
2002-05-08 23:25:29 +00:00
|
|
|
# sample code rules for a single-target simple sample
|
|
|
|
|
2002-05-10 20:32:34 +00:00
|
|
|
# list of targets that aren't actually created
|
|
|
|
.PHONY: all clean distclean check report
|
|
|
|
|
|
|
|
all: $(ALL_SUBDIR) $(RESTARGET) $(TARGET)
|
2002-05-08 23:25:29 +00:00
|
|
|
|
|
|
|
$(TARGET): $(OBJECTS)
|
2012-07-24 19:21:36 +00:00
|
|
|
$(LINK.cc) $(LOADLIBES) $(LDLIBS) -o $@ $(XTRALIBS) -licui18n -licuuc
|
2002-05-08 23:25:29 +00:00
|
|
|
|
2002-05-10 20:32:34 +00:00
|
|
|
$(RESTARGET): $(RESFILES)
|
|
|
|
$(PKGDATA) --name $(RESNAME) --mode $(RESMODE) $(PKGDATAOPTS) $(RESLIST)
|
|
|
|
|
|
|
|
res-install: $(RESTARGET)
|
|
|
|
$(PKGDATA) --name $(RESNAME) --mode $(RESMODE) $(PKGDATAOPTS) $(RESLIST) --install $(shell icu-config --libdir)
|
2002-05-08 23:25:29 +00:00
|
|
|
|
|
|
|
# clean out files
|
2002-05-10 20:32:34 +00:00
|
|
|
distclean clean: $(CLEAN_SUBDIR)
|
2005-05-04 05:07:52 +00:00
|
|
|
-test -z "$(CLEANFILES)" || rm -rf $(CLEANFILES)
|
|
|
|
-rm -rf $(OBJECTS) $(TARGET) $(RESTARGET) $(RESFILES)
|
2002-05-08 23:25:29 +00:00
|
|
|
|
|
|
|
# Make check: simply runs the sample, logged to a file
|
2010-01-30 07:36:56 +00:00
|
|
|
check: $(ALL_SUBDIR) $(RESTARGET) $(TARGET)
|
2002-05-10 20:32:34 +00:00
|
|
|
$(INVOKE) $(CHECK_VARS) ./$(TARGET) $(CHECK_ARGS) | tee $(TARGET).out
|
2002-05-08 23:25:29 +00:00
|
|
|
|
2002-05-10 20:32:34 +00:00
|
|
|
## resources
|
2005-05-04 05:07:52 +00:00
|
|
|
%.res: %.txt
|
|
|
|
@echo "generating $@"
|
|
|
|
$(GENRB) $(GENRBOPT) $^
|
|
|
|
|
|
|
|
$(RESNAME)/%.res: %.txt
|
2002-05-10 20:32:34 +00:00
|
|
|
@echo "generating $@"
|
|
|
|
$(GENRB) $(GENRBOPT) $^
|
2006-08-30 18:22:48 +00:00
|
|
|
|
|
|
|
## Some platforms don't have .cpp as a default suffix, so add the rule here
|
|
|
|
%.o: %.cpp
|
|
|
|
$(COMPILE.cc) $< $(OUTPUT_OPTION)
|