-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy pathMakefile
48 lines (39 loc) · 964 Bytes
/
Makefile
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
45
46
47
48
OS = linux
VERSION = 1.4.2
DISTFILES = src \
includes \
tests \
README.md \
CHANGELOG.md \
USAGE.md \
AUTHORS \
COPYING \
Makefile \
PREFIX ?= /usr/local
TARGET_INCLUDE_PATH ?= $(PREFIX)/include/avr
CDEFS = -DDEFAULT_INCLUDE_PATH='"$(TARGET_INCLUDE_PATH)"' \
-DVERSION='"$(VERSION)"'
export CDEFS
.PHONY: all
all:
$(MAKE) -C src -f makefiles/Makefile.$(OS)
.PHONY: clean
clean:
$(MAKE) -C src -f makefiles/Makefile.$(OS) clean
avra-$(VERSION).tar.gz: $(DISTFILES) clean
mkdir avra-$(VERSION)
cp -r $(DISTFILES) avra-$(VERSION)/
tar cvf avra-$(VERSION).tar avra-$(VERSION)/*
gzip -9 -f avra-$(VERSION).tar
rm -r avra-$(VERSION)
.PHONY: dist
dist: avra-$(VERSION).tar.gz
.PHONY: install
install: all
install -d $(DESTDIR)$(PREFIX)/bin
install -m 755 src/avra $(DESTDIR)$(PREFIX)/bin
install -d $(DESTDIR)$(TARGET_INCLUDE_PATH)
cp includes/* $(DESTDIR)$(TARGET_INCLUDE_PATH)
.PHONY: check
check: all
cd tests/regression && ./runtests.sh