Mark Galeck wrote:
> The target-specific variables are only in effect in recipes, not in
> prerequisites and other targets, so the above won't work.
>
> You have to hack your own "target-specific" variable name, depending on the
> target, like this:
>
> mwb_DDI_SUFFIX := _mwb
>
> $(foreach goal, owb mwb, $(eval $(goal):
> ../../rootfs$($(goal)_DDI_SUFFIX)/partition/APP_HBBTV))
>
> %/decrypt: decrypt.c
I ended up giving up begin able to build the two targets in a single
invocation of make. So I went with:
CC = mips-linux-gnu-gcc
ifeq "$(MAKECMDGOALS)" "mwb"
DDI_SUFFIX = _mwb
endif
APP = ../../rootfs$(DDI_SUFFIX)/partition/APP_HBBTV
.SUFFIXES:
help:
@echo VALID TARGETS: owb mwb
owb: $(APP)/decrypt
mwb: $(APP)/decrypt
$(APP)/decrypt: decrypt.c
$(LINK.c) $^ $(LDLIBS) -o $@
mips-linux-gnu-strip $@
While I was looking for a better solution, I came across several
of Paul's articles, which I'll post here, for my reference.
http://mad-scientist.net/make/rules.html
http://mad-scientist.net/make/vpath.html
http://mad-scientist.net/make/multi-arch.html
--
Regards.
_______________________________________________
Help-make mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-make