blob: 4551b9ea70b5c85cf48ce9db309bddd4d21a28e1 [file] [log] [blame]
aliguori17759182009-01-21 18:12:52 +00001
Juan Quintela5ab28862009-10-06 21:11:14 +02002# Don't use implicit rules or variables
3# we have explicit rules for everything
4MAKEFLAGS += -rR
5
6# Files with this suffixes are final, don't try to generate them
7# using implicit rules
8%.d:
9%.h:
10%.c:
Peter Maydellc3dc9fd2014-02-05 17:27:27 +000011%.cc:
Tomoki Sekiyama83f73fc2013-08-07 11:39:36 -040012%.cpp:
Juan Quintela5ab28862009-10-06 21:11:14 +020013%.m:
14%.mak:
15
Tomoki Sekiyama83f73fc2013-08-07 11:39:36 -040016# Flags for C++ compilation
17QEMU_CXXFLAGS = -D__STDC_LIMIT_MACROS $(filter-out -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wold-style-declaration -Wold-style-definition -Wredundant-decls, $(QEMU_CFLAGS))
18
Stefan Weil7ebf54b2009-11-19 20:07:52 +010019# Flags for dependency generation
Victor Kaplansky998b7b12015-08-09 12:39:53 +030020QEMU_DGFLAGS += -MMD -MP -MT $@ -MF $(@D)/$(*F).d
malc02d54672009-10-11 17:08:57 +040021
Paolo Bonzini9d9199a2012-09-17 10:21:52 +020022# Same as -I$(SRC_PATH) -I., but for the nested source/object directories
Dunrong Huang7e7da8e2013-04-29 22:52:12 +080023QEMU_INCLUDES += -I$(<D) -I$(@D)
Paolo Bonzini9d9199a2012-09-17 10:21:52 +020024
Fam Zhengc261d772014-09-01 18:35:10 +080025WL_U := -Wl,-u,
Stefan Weil4852ee92014-09-18 21:55:08 +020026find-symbols = $(if $1, $(sort $(shell $(NM) -P -g $1 | $2)))
Fam Zhengc261d772014-09-01 18:35:10 +080027defined-symbols = $(call find-symbols,$1,awk '$$2!="U"{print $$1}')
28undefined-symbols = $(call find-symbols,$1,awk '$$2=="U"{print $$1}')
29
30# All the .mo objects in -m variables are also added into corresponding -y
31# variable in unnest-vars, but filtered out here, when LINK is called.
32#
33# The .mo objects are supposed to be linked as a DSO, for module build. So here
34# they are only used as a placeholders to generate those "archive undefined"
35# symbol options (-Wl,-u,$symbol_name), which are the archive functions
36# referenced by the code in the DSO.
37#
38# Also the presence in -y variables will also guarantee they are built before
39# linking executables that will load them. So we can look up symbol reference
40# in LINK.
41#
42# This is necessary because the exectuable itself may not use the function, in
43# which case the function would not be linked in. Then the DSO loading will
44# fail because of the missing symbol.
45process-archive-undefs = $(filter-out %.a %.mo,$1) \
46 $(addprefix $(WL_U), \
47 $(filter $(call defined-symbols,$(filter %.a, $1)), \
48 $(call undefined-symbols,$(filter %.mo,$1)))) \
49 $(filter %.a,$1)
50
Paolo Bonzinif2770152014-06-16 16:43:25 +020051extract-libs = $(strip $(foreach o,$1,$($o-libs)))
Fam Zheng17969262014-02-10 14:48:56 +080052expand-objs = $(strip $(sort $(filter %.o,$1)) \
53 $(foreach o,$(filter %.mo,$1),$($o-objs)) \
54 $(filter-out %.o %.mo,$1))
Fam Zheng5c0d52b2014-02-10 14:48:53 +080055
Andreas Färber0e8c9212010-01-06 20:24:05 +010056%.o: %.c
Fam Zheng5c0d52b2014-02-10 14:48:53 +080057 $(call quiet-command,$(CC) $(QEMU_INCLUDES) $(QEMU_CFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) $($@-cflags) -c -o $@ $<," CC $(TARGET_DIR)$@")
Paolo Bonzini6821cdc2013-04-27 00:25:31 +020058%.o: %.rc
59 $(call quiet-command,$(WINDRES) -I. -o $@ $<," RC $(TARGET_DIR)$@")
aliguori17759182009-01-21 18:12:52 +000060
Peter Maydell3144f782014-02-05 17:27:27 +000061# If we have a CXX we might have some C++ objects, in which case we
62# must link with the C++ compiler, not the plain C compiler.
63LINKPROG = $(or $(CXX),$(CC))
64
Alon Levy44dc0ca2011-05-15 11:51:28 +030065ifeq ($(LIBTOOL),)
Fam Zheng1c33ac52014-05-27 15:54:19 +080066LINK = $(call quiet-command, $(LINKPROG) $(QEMU_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ \
Fam Zhengc261d772014-09-01 18:35:10 +080067 $(call process-archive-undefs, $1) \
68 $(version-obj-y) $(call extract-libs,$1) $(LIBS)," LINK $(TARGET_DIR)$@")
Alon Levy44dc0ca2011-05-15 11:51:28 +030069else
Paolo Bonzinif141ccf2012-12-20 18:32:53 +010070LIBTOOL += $(if $(V),,--quiet)
Alon Levy44dc0ca2011-05-15 11:51:28 +030071%.lo: %.c
Paolo Bonzini0db564e2014-05-08 14:34:09 +020072 $(call quiet-command,$(LIBTOOL) --mode=compile --tag=CC $(CC) $(QEMU_INCLUDES) $(QEMU_CFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) $($*.o-cflags) -c -o $@ $<," lt CC $@")
Paolo Bonzini6821cdc2013-04-27 00:25:31 +020073%.lo: %.rc
74 $(call quiet-command,$(LIBTOOL) --mode=compile --tag=RC $(WINDRES) -I. -o $@ $<,"lt RC $(TARGET_DIR)$@")
Paolo Bonzini2c13ec52012-12-21 09:23:18 +010075%.lo: %.dtrace
76 $(call quiet-command,$(LIBTOOL) --mode=compile --tag=CC dtrace -o $@ -G -s $<, " lt GEN $(TARGET_DIR)$@")
77
Paolo Bonzini21655882012-12-20 18:57:45 +010078LINK = $(call quiet-command,\
Fam Zheng17969262014-02-10 14:48:56 +080079 $(if $(filter %.lo %.la,$1),$(LIBTOOL) --mode=link --tag=CC \
Fam Zhengc261d772014-09-01 18:35:10 +080080 )$(LINKPROG) $(QEMU_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ \
81 $(call process-archive-undefs, $1)\
Fam Zheng17969262014-02-10 14:48:56 +080082 $(if $(filter %.lo %.la,$1),$(version-lobj-y),$(version-obj-y)) \
83 $(if $(filter %.lo %.la,$1),$(LIBTOOLFLAGS)) \
Paolo Bonzini0db564e2014-05-08 14:34:09 +020084 $(call extract-libs,$(1:.lo=.o)) $(LIBS),$(if $(filter %.lo %.la,$1),"lt LINK ", " LINK ")"$(TARGET_DIR)$@")
Alon Levy44dc0ca2011-05-15 11:51:28 +030085endif
86
Blue Swirl3dd46c72013-01-05 10:10:27 +000087%.asm: %.S
88 $(call quiet-command,$(CPP) $(QEMU_INCLUDES) $(QEMU_CFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) -o $@ $<," CPP $(TARGET_DIR)$@")
89
90%.o: %.asm
91 $(call quiet-command,$(AS) $(ASFLAGS) -o $@ $<," AS $(TARGET_DIR)$@")
aliguori17759182009-01-21 18:12:52 +000092
Peter Maydellc3dc9fd2014-02-05 17:27:27 +000093%.o: %.cc
Paolo Bonzini0db564e2014-05-08 14:34:09 +020094 $(call quiet-command,$(CXX) $(QEMU_INCLUDES) $(QEMU_CXXFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) $($@-cflags) -c -o $@ $<," CXX $(TARGET_DIR)$@")
Peter Maydellc3dc9fd2014-02-05 17:27:27 +000095
Tomoki Sekiyama83f73fc2013-08-07 11:39:36 -040096%.o: %.cpp
Paolo Bonzini0db564e2014-05-08 14:34:09 +020097 $(call quiet-command,$(CXX) $(QEMU_INCLUDES) $(QEMU_CXXFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) $($@-cflags) -c -o $@ $<," CXX $(TARGET_DIR)$@")
Tomoki Sekiyama83f73fc2013-08-07 11:39:36 -040098
aliguori17759182009-01-21 18:12:52 +000099%.o: %.m
Paolo Bonzini0db564e2014-05-08 14:34:09 +0200100 $(call quiet-command,$(OBJCC) $(QEMU_INCLUDES) $(QEMU_CFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) $($@-cflags) -c -o $@ $<," OBJC $(TARGET_DIR)$@")
aliguori17759182009-01-21 18:12:52 +0000101
Paolo Bonzini2c13ec52012-12-21 09:23:18 +0100102%.o: %.dtrace
103 $(call quiet-command,dtrace -o $@ -G -s $<, " GEN $(TARGET_DIR)$@")
104
Fam Zhengd24697e2015-05-07 14:55:15 +0800105DSO_OBJ_CFLAGS := -fPIC -DBUILD_DSO
106module-common.o: CFLAGS += $(DSO_OBJ_CFLAGS)
Fam Zheng17969262014-02-10 14:48:56 +0800107%$(DSOSUF): LDFLAGS += $(LDFLAGS_SHARED)
Fam Zhengc261d772014-09-01 18:35:10 +0800108%$(DSOSUF): %.mo
Fam Zheng17969262014-02-10 14:48:56 +0800109 $(call LINK,$^)
Fam Zhenge26110c2014-02-10 14:48:57 +0800110 @# Copy to build root so modules can be loaded when program started without install
111 $(if $(findstring /,$@),$(call quiet-command,cp $@ $(subst /,-,$@), " CP $(subst /,-,$@)"))
Fam Zheng17969262014-02-10 14:48:56 +0800112
Fam Zhengc261d772014-09-01 18:35:10 +0800113
114LD_REL := $(CC) -nostdlib -Wl,-r
115
116%.mo:
117 $(call quiet-command,$(LD_REL) -o $@ $^," LD -r $(TARGET_DIR)$@")
118
Fam Zheng17969262014-02-10 14:48:56 +0800119.PHONY: modules
120modules:
121
aliguori3aa892d2009-01-21 18:13:02 +0000122%$(EXESUF): %.o
Anthony Liguori0bfe3ca2009-05-14 19:29:53 +0100123 $(call LINK,$^)
aliguori4f188f82009-01-21 18:13:09 +0000124
aliguori93a0dba2009-01-21 18:13:16 +0000125%.a:
aliguori28c699a2009-01-26 17:07:46 +0000126 $(call quiet-command,rm -f $@ && $(AR) rcs $@ $^," AR $(TARGET_DIR)$@")
aliguori93a0dba2009-01-21 18:13:16 +0000127
aliguori28c699a2009-01-26 17:07:46 +0000128quiet-command = $(if $(V),$1,$(if $(2),@echo $2 && $1, @$1))
Juan Quintela70071e12009-07-21 14:11:18 +0200129
130# cc-option
Juan Quintela8a2e6ab2009-08-31 00:48:45 +0200131# Usage: CFLAGS+=$(call cc-option, -falign-functions=0, -malign-functions=0)
Juan Quintela70071e12009-07-21 14:11:18 +0200132
Thomas Monjalonfc3baad2009-09-11 18:45:40 +0200133cc-option = $(if $(shell $(CC) $1 $2 -S -o /dev/null -xc /dev/null \
134 >/dev/null 2>&1 && echo OK), $2, $3)
Juan Quintela1215c6e2009-10-07 02:40:58 +0200135
Peter Maydellc3dc9fd2014-02-05 17:27:27 +0000136VPATH_SUFFIXES = %.c %.h %.S %.cc %.cpp %.m %.mak %.texi %.sh %.rc
Nathan Froyd288e7bc2010-04-26 14:52:23 -0700137set-vpath = $(if $1,$(foreach PATTERN,$(VPATH_SUFFIXES),$(eval vpath $(PATTERN) $1)))
Paolo Bonzini076d2472009-12-21 10:06:55 +0100138
Michael Tokarev0d659422014-06-22 10:55:23 +0400139# install-prog list, dir
140define install-prog
141 $(INSTALL_DIR) "$2"
142 $(INSTALL_PROG) $1 "$2"
143 $(if $(STRIP),$(STRIP) $(foreach T,$1,"$2/$(notdir $T)"),)
144endef
145
Paolo Bonzini2b2e59e2010-10-21 10:18:40 +0200146# find-in-path
147# Usage: $(call find-in-path, prog)
148# Looks in the PATH if the argument contains no slash, else only considers one
149# specific directory. Returns an # empty string if the program doesn't exist
150# there.
151find-in-path = $(if $(find-string /, $1), \
152 $(wildcard $1), \
153 $(wildcard $(patsubst %, %/$1, $(subst :, ,$(PATH)))))
154
Peter Maydell837a2e22013-09-13 18:25:51 +0100155# Logical functions (for operating on y/n values like CONFIG_FOO vars)
156# Inputs to these must be either "y" (true) or "n" or "" (both false)
157# Output is always either "y" or "n".
158# Usage: $(call land,$(CONFIG_FOO),$(CONFIG_BAR))
159# Logical NOT
160lnot = $(if $(subst n,,$1),n,y)
161# Logical AND
162land = $(if $(findstring yy,$1$2),y,n)
163# Logical OR
164lor = $(if $(findstring y,$1$2),y,n)
165# Logical XOR (note that this is the inverse of leqv)
166lxor = $(if $(filter $(call lnot,$1),$(call lnot,$2)),n,y)
167# Logical equivalence (note that leqv "","n" is true)
168leqv = $(if $(filter $(call lnot,$1),$(call lnot,$2)),y,n)
169# Logical if: like make's $(if) but with an leqv-like test
170lif = $(if $(subst n,,$1),$2,$3)
171
Peter Maydell9ef622e2013-09-13 18:25:52 +0100172# String testing functions: inputs to these can be any string;
173# the output is always either "y" or "n". Leading and trailing whitespace
174# is ignored when comparing strings.
175# String equality
176eq = $(if $(subst $2,,$1)$(subst $1,,$2),n,y)
177# String inequality
178ne = $(if $(subst $2,,$1)$(subst $1,,$2),y,n)
179# Emptiness/non-emptiness tests:
180isempty = $(if $1,n,y)
181notempty = $(if $1,y,n)
182
Lluís Vilanovac0424932012-04-18 20:15:45 +0200183# Generate files with tracetool
184TRACETOOL=$(PYTHON) $(SRC_PATH)/scripts/tracetool.py
185
Juan Quintela1215c6e2009-10-07 02:40:58 +0200186# Generate timestamp files for .h include files
187
Michael S. Tsirkin4b259662013-01-15 13:12:35 +0200188config-%.h: config-%.h-timestamp
189 @cmp $< $@ >/dev/null 2>&1 || cp $< $@
Juan Quintela1215c6e2009-10-07 02:40:58 +0200190
Michael S. Tsirkin4b259662013-01-15 13:12:35 +0200191config-%.h-timestamp: config-%.mak
192 $(call quiet-command, sh $(SRC_PATH)/scripts/create_config < $< > $@, " GEN $(TARGET_DIR)config-$*.h")
Michael S. Tsirkin7dbbbb02009-12-07 21:04:52 +0200193
Michael S. Tsirkin75863172013-01-15 13:27:54 +0200194.PHONY: clean-timestamp
195clean-timestamp:
196 rm -f *.timestamp
197clean: clean-timestamp
198
Michael S. Tsirkin7dbbbb02009-12-07 21:04:52 +0200199# will delete the target of a rule if commands exit with a nonzero exit status
200.DELETE_ON_ERROR:
Paolo Bonzinie05804e2012-05-22 13:41:27 +0200201
Fam Zheng1c33ac52014-05-27 15:54:19 +0800202# save-vars
203# Usage: $(call save-vars, vars)
204# Save each variable $v in $vars as save-vars-$v, save their object's
205# variables, then clear $v.
206define save-vars
207 $(foreach v,$1,
208 $(eval save-vars-$v := $(value $v))
209 $(foreach o,$($v),
210 $(foreach k,cflags libs objs,
211 $(if $($o-$k),
212 $(eval save-vars-$o-$k := $($o-$k))
213 $(eval $o-$k := ))))
214 $(eval $v := ))
Paolo Bonzinie05804e2012-05-22 13:41:27 +0200215endef
216
Fam Zheng1c33ac52014-05-27 15:54:19 +0800217# load-vars
218# Usage: $(call load-vars, vars, add_var)
219# Load the saved value for each variable in @vars, and the per object
220# variables.
221# Append @add_var's current value to the loaded value.
222define load-vars
223 $(eval $2-new-value := $(value $2))
224 $(foreach v,$1,
225 $(eval $v := $(value save-vars-$v))
226 $(foreach o,$($v),
227 $(foreach k,cflags libs objs,
228 $(if $(save-vars-$o-$k),
229 $(eval $o-$k := $(save-vars-$o-$k))
230 $(eval save-vars-$o-$k := ))))
231 $(eval save-vars-$v := ))
232 $(eval $2 := $(value $2) $($2-new-value))
Paolo Bonzinie05804e2012-05-22 13:41:27 +0200233endef
234
Fam Zheng1c33ac52014-05-27 15:54:19 +0800235# fix-paths
236# Usage: $(call fix-paths, obj_path, src_path, vars)
237# Add prefix @obj_path to all objects in @vars, and add prefix @src_path to all
238# directories in @vars.
239define fix-paths
240 $(foreach v,$3,
241 $(foreach o,$($v),
242 $(if $($o-libs),
243 $(eval $1$o-libs := $($o-libs)))
244 $(if $($o-cflags),
245 $(eval $1$o-cflags := $($o-cflags)))
246 $(if $($o-objs),
247 $(eval $1$o-objs := $(addprefix $1,$($o-objs)))))
248 $(eval $v := $(addprefix $1,$(filter-out %/,$($v))) \
249 $(addprefix $2,$(filter %/,$($v)))))
Fam Zheng5c0d52b2014-02-10 14:48:53 +0800250endef
251
Fam Zheng1c33ac52014-05-27 15:54:19 +0800252# unnest-var-recursive
253# Usage: $(call unnest-var-recursive, obj_prefix, vars, var)
254#
255# Unnest @var by including subdir Makefile.objs, while protect others in @vars
256# unchanged.
257#
258# @obj_prefix is the starting point of object path prefix.
259#
260define unnest-var-recursive
261 $(eval dirs := $(sort $(filter %/,$($3))))
262 $(eval $3 := $(filter-out %/,$($3)))
263 $(foreach d,$(dirs:%/=%),
264 $(call save-vars,$2)
265 $(eval obj := $(if $1,$1/)$d)
266 $(eval -include $(SRC_PATH)/$d/Makefile.objs)
267 $(call fix-paths,$(if $1,$1/)$d/,$d/,$2)
268 $(call load-vars,$2,$3)
269 $(call unnest-var-recursive,$1,$2,$3))
Paolo Bonzinie05804e2012-05-22 13:41:27 +0200270endef
271
Fam Zheng1c33ac52014-05-27 15:54:19 +0800272# unnest-vars
273# Usage: $(call unnest-vars, obj_prefix, vars)
274#
275# @obj_prefix: object path prefix, can be empty, or '..', etc. Don't include
276# ending '/'.
277#
278# @vars: the list of variable names to unnest.
279#
280# This macro will scan subdirectories's Makefile.objs, include them, to build
281# up each variable listed in @vars.
282#
283# Per object and per module cflags and libs are saved with relative path fixed
284# as well, those variables include -libs, -cflags and -objs. Items in -objs are
285# also fixed to relative path against SRC_PATH plus the prefix @obj_prefix.
286#
287# All nested variables postfixed by -m in names are treated as DSO variables,
288# and will be built as modules, if enabled.
289#
290# A simple example of the unnest:
291#
292# obj_prefix = ..
293# vars = hot cold
294# hot = fire.o sun.o season/
295# cold = snow.o water/ season/
296#
297# Unnest through a faked source directory structure:
298#
299# SRC_PATH
300# ├── water
301# │ └── Makefile.objs──────────────────┐
302# │ │ hot += steam.o │
303# │ │ cold += ice.mo │
304# │ │ ice.mo-libs := -licemaker │
305# │ │ ice.mo-objs := ice1.o ice2.o │
306# │ └──────────────────────────────┘
307# │
308# └── season
309# └── Makefile.objs──────┐
310# │ hot += summer.o │
311# │ cold += winter.o │
312# └──────────────────┘
313#
314# In the end, the result will be:
315#
316# hot = ../fire.o ../sun.o ../season/summer.o
317# cold = ../snow.o ../water/ice.mo ../season/winter.o
318# ../water/ice.mo-libs = -licemaker
319# ../water/ice.mo-objs = ../water/ice1.o ../water/ice2.o
320#
321# Note that 'hot' didn't include 'season/' in the input, so 'summer.o' is not
322# included.
323#
Paolo Bonzinie05804e2012-05-22 13:41:27 +0200324define unnest-vars
Fam Zheng1c33ac52014-05-27 15:54:19 +0800325 # In the case of target build (i.e. $1 == ..), fix path for top level
326 # Makefile.objs objects
327 $(if $1,$(call fix-paths,$1/,,$2))
328
329 # Descend and include every subdir Makefile.objs
Fam Zhengc88f68e2015-01-12 12:43:09 +0800330 $(foreach v, $2,
331 $(call unnest-var-recursive,$1,$2,$v)
332 # Pass the .mo-cflags and .mo-libs along to its member objects
333 $(foreach o, $(filter %.mo,$($v)),
334 $(foreach p,$($o-objs),
335 $(if $($o-cflags), $(eval $p-cflags += $($o-cflags)))
336 $(if $($o-libs), $(eval $p-libs += $($o-libs))))))
337
338 # For all %.mo objects that are directly added into -y, just expand them
339 $(foreach v,$(filter %-y,$2),
340 $(eval $v := $(foreach o,$($v),$(if $($o-objs),$($o-objs),$o))))
Fam Zheng1c33ac52014-05-27 15:54:19 +0800341
342 $(foreach v,$(filter %-m,$2),
343 # All .o found in *-m variables are single object modules, create .mo
344 # for them
345 $(foreach o,$(filter %.o,$($v)),
346 $(eval $(o:%.o=%.mo)-objs := $o))
347 # Now unify .o in -m variable to .mo
348 $(eval $v := $($v:%.o=%.mo))
349 $(eval modules-m += $($v))
350
351 # For module build, build shared libraries during "make modules"
352 # For non-module build, add -m to -y
353 $(if $(CONFIG_MODULES),
Fam Zhengc261d772014-09-01 18:35:10 +0800354 $(foreach o,$($v),
Fam Zhengd24697e2015-05-07 14:55:15 +0800355 $(eval $($o-objs): CFLAGS += $(DSO_OBJ_CFLAGS))
Fam Zhengc261d772014-09-01 18:35:10 +0800356 $(eval $o: $($o-objs)))
357 $(eval $(patsubst %-m,%-y,$v) += $($v))
Fam Zheng1c33ac52014-05-27 15:54:19 +0800358 $(eval modules: $($v:%.mo=%$(DSOSUF))),
359 $(eval $(patsubst %-m,%-y,$v) += $(call expand-objs, $($v)))))
360
361 # Post-process all the unnested vars
362 $(foreach v,$2,
363 $(foreach o, $(filter %.mo,$($v)),
364 # Find all the .mo objects in variables and add dependency rules
365 # according to .mo-objs. Report error if not set
366 $(if $($o-objs),
367 $(eval $(o:%.mo=%$(DSOSUF)): module-common.o $($o-objs)),
Fam Zhengc88f68e2015-01-12 12:43:09 +0800368 $(error $o added in $v but $o-objs is not set)))
Fam Zheng1c33ac52014-05-27 15:54:19 +0800369 $(shell mkdir -p ./ $(sort $(dir $($v))))
370 # Include all the .d files
Victor Kaplansky27fa7472015-08-09 12:39:59 +0300371 $(eval -include $(patsubst %.o,%.d,$(patsubst %.mo,%.d,$($v))))
Fam Zheng1c33ac52014-05-27 15:54:19 +0800372 $(eval $v := $(filter-out %/,$($v))))
Paolo Bonzinie05804e2012-05-22 13:41:27 +0200373endef