forked from hzeller/rpi-rgb-led-matrix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
42 lines (32 loc) · 1.1 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
CXXFLAGS=-Wall -O3 -g
OBJECTS=demo-main.o minimal-example.o text-example.o led-image-viewer.o
BINARIES=led-matrix minimal-example text-example
ALL_BINARIES=$(BINARIES) led-image-viewer
# Where our library resides. It is split between includes and the binary
# library in lib
RGB_LIB_DISTRIBUTION=.
RGB_INCDIR=$(RGB_LIB_DISTRIBUTION)/include
RGB_LIBDIR=$(RGB_LIB_DISTRIBUTION)/lib
RGB_LIBRARY_NAME=rgbmatrix
RGB_LIBRARY=$(RGB_LIBDIR)/lib$(RGB_LIBRARY_NAME).a
LDFLAGS+=-L$(RGB_LIBDIR) -l$(RGB_LIBRARY_NAME) -lrt -lm -lpthread
PYTHON_LIB_DIR=bindings/python
CSHARP_LIB_DIR=bindings/c\#
# Imagemagic flags, only needed if actually compiled.
MAGICK_CXXFLAGS=`GraphicsMagick++-config --cppflags --cxxflags`
MAGICK_LDFLAGS=`GraphicsMagick++-config --ldflags --libs`
all : $(RGB_LIBRARY)
$(RGB_LIBRARY): FORCE
$(MAKE) -C $(RGB_LIBDIR)
clean:
$(MAKE) -C lib clean
$(MAKE) -C utils clean
$(MAKE) -C $(PYTHON_LIB_DIR) clean
build-csharp:
$(MAKE) -C $(CSHARP_LIB_DIR) build
build-python: $(RGB_LIBRARY)
$(MAKE) -C $(PYTHON_LIB_DIR) build
install-python: build-python
$(MAKE) -C $(PYTHON_LIB_DIR) install
FORCE:
.PHONY: FORCE