annotate Makefile @ 0:93d4ddff7dd0

Jumbo commit since I appear to have forgotten to do this before..
author Daniel O'Connor <darius@dons.net.au>
date Wed, 04 Jan 2012 23:19:12 +1030
parents
children be930b34fcd3
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
93d4ddff7dd0 Jumbo commit since I appear to have forgotten to do this before..
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
1 PROG= sprink
93d4ddff7dd0 Jumbo commit since I appear to have forgotten to do this before..
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
2 SRCS= sprink.c cons.c ds1307.c 1wire.c
93d4ddff7dd0 Jumbo commit since I appear to have forgotten to do this before..
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
3
93d4ddff7dd0 Jumbo commit since I appear to have forgotten to do this before..
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
4 TPREFIX= /usr/local/CrossPack-AVR/bin
93d4ddff7dd0 Jumbo commit since I appear to have forgotten to do this before..
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
5
93d4ddff7dd0 Jumbo commit since I appear to have forgotten to do this before..
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
6 # Should be 324A but that doesn't work (broken avr-gcc?)
93d4ddff7dd0 Jumbo commit since I appear to have forgotten to do this before..
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
7 PART=324p
93d4ddff7dd0 Jumbo commit since I appear to have forgotten to do this before..
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
8 PROGPART=m324p
93d4ddff7dd0 Jumbo commit since I appear to have forgotten to do this before..
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
9 MCU=atmega${PART}
93d4ddff7dd0 Jumbo commit since I appear to have forgotten to do this before..
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
10
93d4ddff7dd0 Jumbo commit since I appear to have forgotten to do this before..
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
11 # Clock frequency
93d4ddff7dd0 Jumbo commit since I appear to have forgotten to do this before..
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
12 CFLAGS+=-DF_CPU=8000000
93d4ddff7dd0 Jumbo commit since I appear to have forgotten to do this before..
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
13
93d4ddff7dd0 Jumbo commit since I appear to have forgotten to do this before..
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
14 CFLAGS+=--param inline-call-cost=2
93d4ddff7dd0 Jumbo commit since I appear to have forgotten to do this before..
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
15
93d4ddff7dd0 Jumbo commit since I appear to have forgotten to do this before..
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
16 # Enable optimisation & debugging
93d4ddff7dd0 Jumbo commit since I appear to have forgotten to do this before..
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
17 CFLAGS+=-Os -Wall -g
93d4ddff7dd0 Jumbo commit since I appear to have forgotten to do this before..
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
18 #CFLAGS+=-Wunreachable-code
93d4ddff7dd0 Jumbo commit since I appear to have forgotten to do this before..
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
19 #CFLAGS+= -mcall-prologues -frename-registers -fstrict-aliasing -fnew-ra
93d4ddff7dd0 Jumbo commit since I appear to have forgotten to do this before..
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
20
93d4ddff7dd0 Jumbo commit since I appear to have forgotten to do this before..
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
21 #CFLAGS+=-DOW_DEBUG
93d4ddff7dd0 Jumbo commit since I appear to have forgotten to do this before..
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
22
93d4ddff7dd0 Jumbo commit since I appear to have forgotten to do this before..
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
23 # Use minimal printf
93d4ddff7dd0 Jumbo commit since I appear to have forgotten to do this before..
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
24 #LDFLAGS+=-Wl,-u,vfprintf -lprintf_min
93d4ddff7dd0 Jumbo commit since I appear to have forgotten to do this before..
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
25
93d4ddff7dd0 Jumbo commit since I appear to have forgotten to do this before..
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
26 # Allow linker relaxation - optimise after linking
93d4ddff7dd0 Jumbo commit since I appear to have forgotten to do this before..
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
27 #LDFLAGS+=-Wl,-relax
93d4ddff7dd0 Jumbo commit since I appear to have forgotten to do this before..
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
28
93d4ddff7dd0 Jumbo commit since I appear to have forgotten to do this before..
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
29 #PROGTYPE=dragon_isp
93d4ddff7dd0 Jumbo commit since I appear to have forgotten to do this before..
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
30 #PROGPORT=usb
93d4ddff7dd0 Jumbo commit since I appear to have forgotten to do this before..
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
31
93d4ddff7dd0 Jumbo commit since I appear to have forgotten to do this before..
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
32 PROGTYPE=buspirate
93d4ddff7dd0 Jumbo commit since I appear to have forgotten to do this before..
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
33 PROGPORT=/dev/cu.usbserial-BP1
93d4ddff7dd0 Jumbo commit since I appear to have forgotten to do this before..
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
34
93d4ddff7dd0 Jumbo commit since I appear to have forgotten to do this before..
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
35 # Holds cons, ds1307 & 1wire
93d4ddff7dd0 Jumbo commit since I appear to have forgotten to do this before..
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
36 LIBDIR= ../avr-lib
93d4ddff7dd0 Jumbo commit since I appear to have forgotten to do this before..
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
37 CFLAGS+=-I${LIBDIR} -I.
93d4ddff7dd0 Jumbo commit since I appear to have forgotten to do this before..
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
38 .PATH: ${LIBDIR}
93d4ddff7dd0 Jumbo commit since I appear to have forgotten to do this before..
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
39
93d4ddff7dd0 Jumbo commit since I appear to have forgotten to do this before..
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
40 .include "${LIBDIR}/Makefile.avr"