next up previous contents

[ENGN3213 Home]

Scripts and Makefiles

In order to minimize typing and to make software development more efficient, scripts and makefiles are often used.

Download the script file bsvc-s.

You can now assemble and link your program under UNIX by simply typing:

./bsvc-s clab70s
(no .s) Check to see that this works correctly.

(Note: If you are doing this under MS WINDOWS at home you may use the .bat file bsvc-s.bat You can assemble and link your program under WINDOWS by simply typing:
bsvc-s clab70s
(no .s)).

For more complex software projects a makefile is often used. Download the makefile clab70s.make.

Save it in your current working directory with the other files above.

Delete the clab70s.s19, clab70s.lst and clab70s.o files. You can now assemble and link your program by simply typing:

make -f clab70s.make
Check to see that this works correctly.

Alternatively, you can type make -f clab70s.make clab70s.o to create the object file, or make -f clab70s.make clab70s.s19 to link and create the s-record, etc.

Another option is to rename the make file as makefile, in which case you can simply type make

You can also add rules for creating other programs to makefile (see below).


next up previous contents

[ENGN3213 Home]

ANU Engineering - ENGN3213