Subversion Repositories HomeAutomation

Rev

Rev 231 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed

Rev 231 Rev 232
Line 1... Line 1...
1
PRG            = main
1
PRG            = main
2
OBJ            = main.o
2
OBJ            = main.o
3
MCU_TARGET     = atmega8
3
MCU_TARGET     = atmega88
4
OPTIMIZE       = -Os -mcall-prologues
4
OPTIMIZE       = -Os -mcall-prologues
5
# grep bios.map for __bios_ram_end to retreive this value
5
# grep bios.map for __bios_ram_end to retreive this value
6
BIOS_RAM_END   = 0x008000bd
-
 
7
# In the future, this should be automatically inserted into *_app.ld at every bios compilation
6
# In the future, this should be automatically inserted into *_app.ld at every bios compilation
-
 
7
BIOS_RAM_END   = 0x0080015d
-
 
8
#uncomment this line if you're using m88, remove line when gcc-bug fixed
-
 
9
#EXTRA_LD        = avr-ld -m avr4 -o $(PRG).elf /usr/avr/lib/avr4/crtm88.o -L/usr/lib/gcc/avr/4.1.0/avr4 -L/usr/lib/gcc/avr/4.1.0/avr4 -L/usr/avr/lib/avr4 -Map $(PRG).map -L../AVR-Bios --defsym __bios_ram_end=0x0080015d -T$(MCU_TARGET)_app.ld $(PRG).o -lgcc -lc -lgcc
8
 
10
 
9
DEFS           = -I../AVR-Bios
11
DEFS           = -I../AVR-Bios
10
LIBS           =
12
LIBS           =
11
 
13
 
12
# You should not have to change anything below here.
14
# You should not have to change anything below here.
Line 32... Line 34...
32
 
34
 
33
all: $(PRG).elf lst text eeprom
35
all: $(PRG).elf lst text eeprom
34
 
36
 
35
$(PRG).elf: $(OBJ)
37
$(PRG).elf: $(OBJ)
36
	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
38
	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
-
 
39
	$(EXTRA_LD)
37
 
40
 
38
clean:
41
clean:
39
	rm -rf *.o $(PRG).elf *.eps *.png *.pdf *.bak 
42
	rm -rf *.o $(PRG).elf *.eps *.png *.pdf *.bak 
40
	rm -rf *.lst *.map $(EXTRA_CLEAN_FILES)
43
	rm -rf *.lst *.map $(EXTRA_CLEAN_FILES)
41
 
44