annotate Makefile @ 9:e591c74304a2

Add datasheets and links to boards
author Daniel O'Connor <darius@dons.net.au>
date Sun, 15 Feb 2015 17:48:12 +1030
parents 951277329ee6
children
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
5
951277329ee6 Use splitargv instead of rolling our own.
Daniel O'Connor <darius@dons.net.au>
parents: 1
diff changeset
2 SRCS= sprink.c cons.c ds1307.c 1wire.c water.c splitargv.c
0
93d4ddff7dd0 Jumbo commit since I appear to have forgotten to do this before..
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
3
1
be930b34fcd3 Make it compile, no testing yet.
Daniel O'Connor <darius@dons.net.au>
parents: 0
diff changeset
4 #TPREFIX= /usr/local/CrossPack-AVR/bin/
0
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
1
be930b34fcd3 Make it compile, no testing yet.
Daniel O'Connor <darius@dons.net.au>
parents: 0
diff changeset
14 #CFLAGS+=--param inline-call-cost=2
0
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
5
951277329ee6 Use splitargv instead of rolling our own.
Daniel O'Connor <darius@dons.net.au>
parents: 1
diff changeset
23 CFLAGS+=-Werror
0
93d4ddff7dd0 Jumbo commit since I appear to have forgotten to do this before..
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
24 # 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
25 #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
26
93d4ddff7dd0 Jumbo commit since I appear to have forgotten to do this before..
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
27 # 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
28 #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
29
1
be930b34fcd3 Make it compile, no testing yet.
Daniel O'Connor <darius@dons.net.au>
parents: 0
diff changeset
30 PROGTYPE=dragon_isp
be930b34fcd3 Make it compile, no testing yet.
Daniel O'Connor <darius@dons.net.au>
parents: 0
diff changeset
31 PROGPORT=usb
0
93d4ddff7dd0 Jumbo commit since I appear to have forgotten to do this before..
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
32
1
be930b34fcd3 Make it compile, no testing yet.
Daniel O'Connor <darius@dons.net.au>
parents: 0
diff changeset
33 #PROGTYPE=buspirate
be930b34fcd3 Make it compile, no testing yet.
Daniel O'Connor <darius@dons.net.au>
parents: 0
diff changeset
34 #PROGPORT=/dev/cu.usbserial-BP1
0
93d4ddff7dd0 Jumbo commit since I appear to have forgotten to do this before..
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
35
93d4ddff7dd0 Jumbo commit since I appear to have forgotten to do this before..
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
36 # 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
37 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
38 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
39 .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
40
93d4ddff7dd0 Jumbo commit since I appear to have forgotten to do this before..
Daniel O'Connor <darius@dons.net.au>
parents:
diff changeset
41 .include "${LIBDIR}/Makefile.avr"