]>
Commit | Line | Data |
---|---|---|
f3c0d7a5 A |
1 | # Copyright (C) 2016 and later: Unicode, Inc. and others. |
2 | # License & terms of use: http://www.unicode.org/copyright.html#License | |
3 | # | |
51004dcb | 4 | # Copyright (c) 2002-2012 IBM, Inc. and others |
b75a7d8f A |
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 | ||
10 | all: $(ALL_SUBDIR) $(RESTARGET) $(TARGET) | |
11 | ||
12 | $(TARGET): $(OBJECTS) | |
51004dcb | 13 | $(LINK.cc) $(LOADLIBES) $(LDLIBS) -o $@ $(XTRALIBS) -licui18n -licuuc |
b75a7d8f A |
14 | |
15 | $(RESTARGET): $(RESFILES) | |
16 | $(PKGDATA) --name $(RESNAME) --mode $(RESMODE) $(PKGDATAOPTS) $(RESLIST) | |
17 | ||
18 | res-install: $(RESTARGET) | |
19 | $(PKGDATA) --name $(RESNAME) --mode $(RESMODE) $(PKGDATAOPTS) $(RESLIST) --install $(shell icu-config --libdir) | |
20 | ||
21 | # clean out files | |
22 | distclean clean: $(CLEAN_SUBDIR) | |
73c04bcf A |
23 | -test -z "$(CLEANFILES)" || rm -rf $(CLEANFILES) |
24 | -rm -rf $(OBJECTS) $(TARGET) $(RESTARGET) $(RESFILES) | |
b75a7d8f A |
25 | |
26 | # Make check: simply runs the sample, logged to a file | |
729e4ab9 | 27 | check: $(ALL_SUBDIR) $(RESTARGET) $(TARGET) |
b75a7d8f A |
28 | $(INVOKE) $(CHECK_VARS) ./$(TARGET) $(CHECK_ARGS) | tee $(TARGET).out |
29 | ||
30 | ## resources | |
73c04bcf A |
31 | %.res: %.txt |
32 | @echo "generating $@" | |
33 | $(GENRB) $(GENRBOPT) $^ | |
34 | ||
35 | $(RESNAME)/%.res: %.txt | |
b75a7d8f A |
36 | @echo "generating $@" |
37 | $(GENRB) $(GENRBOPT) $^ | |
46f4442e A |
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) |