-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
44 lines (37 loc) · 963 Bytes
/
Makefile
File metadata and controls
44 lines (37 loc) · 963 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Name: Makefile
# Author: Jon Nall
# Copyright: (c) 2009 Jon Nall, All rights reserved.
# License: LGPL http://www.gnu.org/licenses/lgpl-3.0.txt
#############################
# Begin configuration section
#
DEVICE ?= attiny13
CLOCK ?= 4800000
ONEWIRE_USE_MACROS ?= 0
ONEWIRE_CHECK_CRC ?= 1
ONEWIRE_PORTIN ?= PINB
ONEWIRE_PORT ?= PORTB
ONEWIRE_IO_CTL ?= DDRB
ONEWIRE_PIN ?= 0
#
# End configuration section
#############################
COMPILE = avr-gcc -std=c99 -g -Wall -Os \
-DF_CPU=$(CLOCK) \
-mmcu=$(DEVICE) \
-DONEWIRE_CHECK_CRC=$(ONEWIRE_CHECK_CRC) \
-DONEWIRE_USE_MACROS=$(ONEWIRE_USE_MACROS) \
-DONEWIRE_PORTIN=$(ONEWIRE_PORTIN) \
-DONEWIRE_PORT=$(ONEWIRE_PORT) \
-DONEWIRE_IO_CTL=$(ONEWIRE_IO_CTL) \
-DONEWIRE_PIN=$(ONEWIRE_PIN)
AR = avr-ar
OBJECTS = DS18B20.o OneWire.o
# symbolic targets:
all: lib1wire.a
lib1wire.a: $(OBJECTS)
$(AR) -r -v $@ $(OBJECTS)
.c.o:
$(COMPILE) -c $< -o $@
clean:
rm -f lib1wire.a $(OBJECTS)