Problem creating a Makefile.

I just wrote my first program in Win AVR and when I tried to create a “makefile” it ran the file supplied in Sparks tutorial “blink_1MHz”. I removed all traces of the many files supplied in the zip file and now it does nothing. How do I get it to create all the files required to create a “makefile” for my C program? All I really changed was turning on a single pin (PC0) instead of all I/o Pins as in the supplied blink file. Here is my program.

/* My Blink it program 03/08/09 */

#include <avr/interrupt.h>

#define F_CPU 100000UL

#include <util/delay.h>

int main () {

DDRD = _BV(PC0); /* enable output on port D, pin 0 */

while(1)

{

PORTC = _BV(PC0);

_delay_ms(1000);

PORTC = &= ~_BV(PC0);

_delay_ms(1000);

}

return(0);

}

Thanks for any help on this, I am at a loss as to what to do.

Upon further investigation my question has changed. How do I create the HEX file from my C program?

I just figured it out. I mean what a “makefile” is; a template!! I never set the target file correctly.

Now what I was trying to do works!!