forked from hzeller/rpi-rgb-led-matrix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
62 lines (52 loc) · 2.22 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
59
60
61
62
# Creating RGB matrix library
# When you link this library with your binary, you need to add -lrt -lm -lpthread
# So
# -lrgbmatrix
##
OBJECTS=gpio.o led-matrix.o framebuffer.o thread.o bdf-font.o graphics.o
TARGET=librgbmatrix.a
###
# After you change any of the following DEFINES, make sure to 'make clean'
# and make again
###
# The signal can be too fast for some LED panels, in particular with newer
# (faster) Raspberry Pi 2s.
# In these cases, you want to make sure that
# - The cables are short enough from the GPIO header to the panel.
# - Maybe use an active level shifter and bus driver, for instance by building
# up one of the adapter-PCBs in the ../adapter/ directory or use
# the Adafruit HAT. The output drivers of the GPIO are not really good
# in driving long cables - this will improve the situation.
#
# If the above fails or you can't implement them, try uncommenting the
# following line and recompile; it will slow down GPIO, but will as well reduce
# the frame-rate.
#DEFINES+=-DRGB_SLOWDOWN_GPIO
# Uncomment to allow to use up to three parallel boards.
# This will only work on the plus models or RPi2 with 40 GPIO pins.
#
# This is useful in any case, _unless_ you have an older installation with
# classic cabeling of previous versions of this library or a
# Raspberry Pi 1, Revision 1 (very old).
#
# The reason why this is disabled by default is that it is not compatible with
# GPIO cabelings of previous versions of this software and thus is already
# wired up 'in the field'. Also it will drop support for the very first
# Raspberry Pi, Revision 1.
# Hence we leave this off for now for the least amount of surprise.
#DEFINES+=-DSUPPORT_MULTI_PARALLEL
# If you see that your display is inverse, you might have a matrix variant
# has uses inverse logic for the RGB bits. In that case: uncomment this.
#DEFINES+=-DINVERSE_RGB_DISPLAY_COLORS
# Uncomment the following line for Adafruit Matrix HAT gpio mappings
#DEFINES+=-DADAFRUIT_RGBMATRIX_HAT
INCDIR=../include
CXXFLAGS=-Wall -O3 -g $(DEFINES)
$(TARGET) : $(OBJECTS)
ar rcs $@ $^
led-matrix.o: led-matrix.cc $(INCDIR)/led-matrix.h
thread.o : thread.cc $(INCDIR)/thread.h
%.o : %.cc
$(CXX) -I$(INCDIR) $(CXXFLAGS) -c -o $@ $<
clean:
rm -f $(OBJECTS) $(TARGET)