Hey there all.
I'm having some problems with using Makefiles. Despite my attempts to comprehend the manual I am still confused.
Basically i just want to modify the example makefile from the winavr distribution so it can compile multipul C files - Just not too sure what to change.
(the makefile i'm talking about is looks like this: (abbreviated)
PRG = main
OBJ = main.o
MCU_TARGET = atmega8
OPTIMIZE = -O2
# You should not have to change anything below here.
CC = avr-gcc
# Override is only needed by avr-lib build system.
override CFLAGS = -g -Wall $(OPTIMIZE) -mmcu=$(MCU_TARGET) $(DEFS)
override LDFLAGS = -Wl,-Map,$(PRG).map
OBJCOPY = avr-objcopy
OBJDUMP = avr-objdump
all: $(PRG).elf lst text eeprom
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
basically i have a timer.c file (and it's header) and I want the makefile to use this so it can find my timer routines :)
Any help would be appreciated.