-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathMakefile
More file actions
26 lines (21 loc) · 783 Bytes
/
Makefile
File metadata and controls
26 lines (21 loc) · 783 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
CC=gcc
CFLAGS=-g $(DEFINES)
all: help
rpi1: DEFINES:=$(DEFINES) -DRPI_V1
rpi2: DEFINES:=$(DEFINES) -DRPI_V2
rpi3: DEFINES:=$(DEFINES) -DRPI_V3
rpi1 rpi2 rpi3: dma-example dma-gpio
dma-example: dma-example.c
$(CC) $(CFLAGS) -o dma-example dma-example.c
dma-gpio: dma-gpio.c
$(CC) $(CFLAGS) -O2 -std=gnu99 -o dma-gpio dma-gpio.c -lrt
clean:
rm -rf dma-example dma-gpio
help:
@echo "Type make <target> where target is one of:"
@echo " * rpi1 (for the original Raspberry Pi A/B/A+/B+)"
@echo " * rpi2 (for the Raspberry Pi A2/B2)"
@echo " * rpi3 (for Raspberry Pi B3)"
@echo " Pi Zero users will most likely have success building for rpi1, since the Pi Zero uses its chipset."
@echo " Note: rpi2/3/zero support should be considered experimental."
.PHONY: clean help