UPDATE:
- The Makefile has been updated.
- There is no need for the "compile.sh" file anymore.
- Linking issues have been sorted
- make a directory for you codes.
- place all the codes (only .c and .h files!!) in that directory.
- Copy the above "Makefile" into the folder.
- Change the project variable to name of your project
- Change the remaining variables appropriately
Thats it!! you are good to go..!!
make allcompiles all the code and generates .hex file
make programprograms the target device using avrdude
make readreads flash from the target device using avrdude
make eraseerases target device flash