Hello all,
I'm trying to build a generic makefile rule, so that every time I get some more app code for one of my classes, I don't have to add a bunch of rules to the makefile, I just have to add the output binary to one place, and make magically finds it.

I'm not having very much success, though. Here are the relevant portions of the makefile.


BIN_FILES=\ lab5.bin \ lab4d.bin \ lab4c.bin \ lab4b.bin

$(BIN_FILES): %.bin: %.s
       nasm $@ -o $< -l %.lst


By my understanding, assuming the makefile knows how to build the corresponding .s file, this should do that, and then build the .bin file. This rule should be applicable for each of the files specified in the BIN_FILES variable. Except, it doesn't work. I simply the following back from make:

mustard ee425lab $ make
Make: Don't know how to make %.bin:.  Stop.

I've checked the GNU make documentation online, and this seems to be the convention that they use. Any ideas why it isn't working for me?

Thanks,
Hyrum

--
Fruit flies like a banana.

http://www.hyrumwright.org

Attachment: signature.asc
Description: OpenPGP digital signature

____________________
BYU Unix Users Group 
http://uug.byu.edu/ 
___________________________________________________________________
List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list

Reply via email to