File: rules.mk

package info (click to toggle)
icu 76.1-4
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 121,296 kB
  • sloc: cpp: 522,712; ansic: 113,387; sh: 4,983; makefile: 4,709; perl: 3,198; python: 2,847; xml: 2,652; sed: 36; lisp: 12
file content (41 lines) | stat: -rw-r--r-- 1,294 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Copyright (C) 2016 and later: Unicode, Inc. and others.
# License & terms of use: http://www.unicode.org/copyright.html
#
# 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
.PHONY: all clean distclean check report 

all: $(ALL_SUBDIR) $(RESTARGET) $(TARGET)  

$(TARGET): $(OBJECTS)
	$(LINK.cc) $(LOADLIBES) $(LDLIBS) -o $@ $(XTRALIBS) -licui18n -licuuc

$(RESTARGET): $(RESFILES)
	$(PKGDATA) --name $(RESNAME) --mode $(RESMODE) $(PKGDATAOPTS) $(RESLIST)

res-install: $(RESTARGET)
	$(PKGDATA) --name $(RESNAME) --mode $(RESMODE) $(PKGDATAOPTS) $(RESLIST) --install $(shell icu-config --libdir)

# clean out files
distclean clean: $(CLEAN_SUBDIR)
	-test -z "$(CLEANFILES)" || rm -rf $(CLEANFILES)
	-rm -rf $(OBJECTS) $(TARGET) $(RESTARGET) $(RESFILES)

# Make check: simply runs the sample, logged to a file
check: $(ALL_SUBDIR) $(RESTARGET) $(TARGET)
	$(INVOKE) $(CHECK_VARS) ./$(TARGET) $(CHECK_ARGS) | tee $(TARGET).out

## resources
%.res: %.txt
	@echo "generating $@"
	$(GENRB) $(GENRBOPT) $^

$(RESNAME)/%.res: %.txt
	@echo "generating $@"
	$(GENRB) $(GENRBOPT) $^

## Some platforms don't have .cpp as a default suffix, so add the rule here
%.o:	%.cpp
	$(COMPILE.cc) $< $(OUTPUT_OPTION)