-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
61 lines (44 loc) · 1.19 KB
/
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
49
50
51
52
53
54
55
56
57
58
#
# Digole Display Driver library and test apps makefile
#
CFLAGS = -g -DDEBUG
CC=gcc
SYS=$(shell uname -m)
# default spi bus for non-x86
ifeq ($(SYS), x86_64)
BUS?=rs232
else
BUS?=spi
endif
# Pick serial interface for x86, SPI for PI
ifeq ($(BUS), rs232)
SERIAL=serial.c io.c
else
ifeq ($(BUS), i2c)
SERIAL=i2c.c io.c
else
SERIAL=rpi_spi.c io_spi.c
endif
endif
all: showtarget oledtest mandel fip imgload startup
showtarget:
@echo "Building for [$(SYS)/$(BUS)]"
oledtest: $(SERIAL) digole.c main.c \
amg_img.c black_cat_img.c img_262k.c img_256.c img_compass.c
$(CC) $(CFLAGS) $(SERIAL) digole.c amg_img.c black_cat_img.c \
img_262k.c img_256.c img_compass.c main.c -o $@
imgload: imgload.c digole.c $(SERIAL)
$(CC) $(CFLAGS) imgload.c digole.c $(SERIAL) -o $@
mandel: digole.c $(SERIAL) mandel.c
$(CC) $(CFLAGS) digole.c $(SERIAL) mandel.c -o $@
fip: digole.c $(SERIAL) fip.c
$(CC) $(CFLAGS) digole.c $(SERIAL) fip.c -o $@ -lm
startup: digole.c $(SERIAL) startup.c
$(CC) $(CFLAGS) digole.c $(SERIAL) startup.c -o $@ -lm
etags TAGS ETAGS tags:
etags -a *.c *.h
docs:
doxygen Doxyfile
clean:
rm -f *.o rm ./oledtest ./mandel ./fip ./imgload tags ETAGS TAGS
rm -fr doc/html doc/latex