1652 |
kaklik |
1 |
# makefile, written by kaklik |
|
|
2 |
MCU=atmega8 |
|
|
3 |
CC=avr-gcc |
|
|
4 |
OBJCOPY=avr-objcopy |
|
|
5 |
# optimize for size: |
|
|
6 |
CFLAGS=-g -mmcu=$(MCU) -Wall -Wstrict-prototypes -Os -mcall-prologues |
|
|
7 |
#------------------- |
|
|
8 |
all: DOGFINDER_TX.hex |
|
|
9 |
#------------------- |
|
|
10 |
help: |
|
|
11 |
@echo "Usage: make all|load|load_pre|rdfuses|wrfuse1mhz|wrfuse4mhz|wrfusecrystal" |
|
|
12 |
@echo "Warning: you will not be able to undo wrfusecrystal unless you connect an" |
|
|
13 |
@echo " external crystal! uC is dead after wrfusecrystal if you do not" |
|
|
14 |
@echo " have an external crystal." |
|
|
15 |
#------------------- |
|
|
16 |
DOGFINDER_TX.hex : DOGFINDER_TX.out |
|
|
17 |
$(OBJCOPY) -R .eeprom -O ihex DOGFINDER_TX.out DOGFINDER_TX.hex |
|
|
18 |
DOGFINDER_TX.out : DOGFINDER_TX.o |
|
|
19 |
$(CC) $(CFLAGS) -o DOGFINDER_TX.out -Wl,-Map,DOGFINDER_TX.map DOGFINDER_TX.o |
|
|
20 |
DOGFINDER_TX.o : DOGFINDER_TX.c |
|
|
21 |
$(CC) $(CFLAGS) -Os -c DOGFINDER_TX.c |
|
|
22 |
#------------------- |
|
|
23 |
clean: |
|
|
24 |
rm -f *.o *.map *.out *.hex |
|
|
25 |
#------------------- |