1# Copyright (C) 2016 and later: Unicode, Inc. and others. 2# License & terms of use: http://www.unicode.org/copyright.html#License 3# 4# Copyright (c) 2002-2012 IBM, Inc. and others 5# sample code rules for a single-target simple sample 6 7# list of targets that aren't actually created 8.PHONY: all clean distclean check report 9 10all: $(ALL_SUBDIR) $(RESTARGET) $(TARGET) 11 12$(TARGET): $(OBJECTS) 13 $(LINK.cc) $(LOADLIBES) $(LDLIBS) -o $@ $(XTRALIBS) -licui18n -licuuc 14 15$(RESTARGET): $(RESFILES) 16 $(PKGDATA) --name $(RESNAME) --mode $(RESMODE) $(PKGDATAOPTS) $(RESLIST) 17 18res-install: $(RESTARGET) 19 $(PKGDATA) --name $(RESNAME) --mode $(RESMODE) $(PKGDATAOPTS) $(RESLIST) --install $(shell icu-config --libdir) 20 21# clean out files 22distclean clean: $(CLEAN_SUBDIR) 23 -test -z "$(CLEANFILES)" || rm -rf $(CLEANFILES) 24 -rm -rf $(OBJECTS) $(TARGET) $(RESTARGET) $(RESFILES) 25 26# Make check: simply runs the sample, logged to a file 27check: $(ALL_SUBDIR) $(RESTARGET) $(TARGET) 28 $(INVOKE) $(CHECK_VARS) ./$(TARGET) $(CHECK_ARGS) | tee $(TARGET).out 29 30## resources 31%.res: %.txt 32 @echo "generating $@" 33 $(GENRB) $(GENRBOPT) $^ 34 35$(RESNAME)/%.res: %.txt 36 @echo "generating $@" 37 $(GENRB) $(GENRBOPT) $^ 38 39## Some platforms don't have .cpp as a default suffix, so add the rule here 40%.o: %.cpp 41 $(COMPILE.cc) $< $(OUTPUT_OPTION) 42