How do I specify target dependant prerequisits with GNUMake?
问题 Say I have a list of source files like this: SOURCE=aaa.src bbb.src ccc.src I want to create a rule to build each corresponding target in its own folder, the name of which depends on the soruce file. Sourcefile ----> Corresponding output file / target aaa.src -------------------> aaa/aaa.out bbb.src -------------------> bbb/bbb.out ccc.src -------------------> ccc/ccc.out How do I write a rule for this using GNUMake? My best effort was the following Makefile: .PHONY: all clean CC=somecompiler