Makefile target multiple sources but only one target -


while working on makefile need write rule executes:

$(grit) $(gritflags) inputfile -ff $(addsuffix .grit,$(basename inputfile)) -o grit.c 

whereas inputfile list of xxx.png files. in same directory there xxx.grit file needs passed via -ff option. pairs of .png , .grit files provide same output file, grit.c (grit uses file appending). tried use rules patterns when wanted rule grit.c: %.png %.grit, seems not allowed use patterns target not contain pattern.

any idea how solve problem?

edit: major problem is, can not pass lits of input files (as done in example above) towards grit. show problem. need call grit every single .png/.grit-file combination

grit.c: $(images)     png in $?; \       $(grit) $(gritflags) $$png -ff $${png%.png}.grit -o $@; \     done 

Popular posts from this blog

node.js - How do I prevent MongoDB replica set from querying the primary? -

c# - Randomly pick a specific int from a 2D Array -

php - Angularjs http.delete is not working after deploying project on server -