The NO$ emulators are Win32 applications written in x86 assembly language. Their developer Martin Korth has mentioned code generation inefficiencies of "HLL" (that is, C or C++) code in GBATEK, the reference that accompanies NO$GBA. (And the most common abbreviation for assembly language is asm, not asy.)
This is what a makefile does:
Code:
obj/snes/kitten.chrgb: tilesets/kitten.png
tools/pngtochr --format gb tilesets/kitten.png obj/snes/kitten.chrgb
This means "The file kitten.chrgb in the obj/snes folder can be created from the file kitten.png in the tilesets folder by running the command
tools/pngtochr --format gb tilesets/kitten.png obj/snes/kitten.chrgb." This way you can specify how to run the conversion tool on each file.
Make also allows wildcard rules:
Code:
obj/snes/%.chrsfc: tilesets/%.png
tools/pngtochr --format snes $< $@
This means "Files in the obj/snes folder named (something).chrsfc can be created from the corresponding file in the tilesets folder named (something).png by running the command
tools/pngtochr --format snes followed by the first source file path and the target file path.
If one file has has
.include or
.incbin directives that refer to another file, you specify multiple dependencies:
Code:
obj/snes/graphics.o: src/graphics.s obj/snes/kitten.chrgb obj/snes/yarnball.chrsfc
ca65 $< -o $@
This means "The file graphics.o in the obj/snes folder can be created from the file graphics.s in the tilesets folder, the file kitten.chrgb in the obj/snes folder, and the file yarnball.chrsfc in the obj/snes folder by running the command
ca65 followed by the first source file path followed by
-o followed by the target file path."
Then when you run Make, it'll build a map of what depends on what, find what's up to date and what's out of date based on last modification time, and determine in which order the programs need to be run to build your project. For example, if it has to build kitten.chrgb and yarnball.chrsfc before building graphics.o, it'll do so.