-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
28 lines (21 loc) · 674 Bytes
/
Makefile
File metadata and controls
28 lines (21 loc) · 674 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
27
28
CXXFLAGS=-Wall -O3 -g
BINARIES=mta mta_direct
# Where our library resides. It is split between includes and the binary
# library in lib
RGB_INCDIR=matrix/include
RGB_LIBDIR=matrix/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
all : $(BINARIES)
$(RGB_LIBRARY):
$(MAKE) -C $(RGB_LIBDIR)
%.o : %.cc
$(CXX) -I$(RGB_INCDIR) $(CXXFLAGS) -c -o $@ $<
mta : mta.o $(RGB_LIBRARY)
$(CXX) $(CXXFLAGS) mta.o -o $@ $(LDFLAGS)
mta_direct : mta_direct.o $(RGB_LIBRARY)
$(CXX) $(CXXFLAGS) mta_direct.o -o $@ $(LDFLAGS)
clean:
rm -f $(OBJECTS) $(BINARIES)
$(MAKE) -C lib clean