-
Notifications
You must be signed in to change notification settings - Fork 31
/
Makefile
41 lines (30 loc) · 895 Bytes
/
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
CXXFLAGS=-Wall -O3 -g
OBJECTS=pixel-push.o
BINARIES=pixel-push
RGB_INCDIR=matrix/include
RGB_LIBDIR=matrix/lib
RGB_LIBRARY_NAME=rgbmatrix
RGB_LIBRARY=$(RGB_LIBDIR)/lib$(RGB_LIBRARY_NAME).a
PP_INCDIR=pp-server/include
PP_LIBDIR=pp-server/lib
PP_LIBRARY_NAME=pixel-push-server
PP_LIBRARY=$(PP_LIBDIR)/lib$(PP_LIBRARY_NAME).a
LDFLAGS+=-L$(PP_LIBDIR) -l$(PP_LIBRARY_NAME) \
-L$(RGB_LIBDIR) -l$(RGB_LIBRARY_NAME) \
-lrt -lm -lpthread
all : pixel-push
pixel-push : $(OBJECTS) $(RGB_LIBRARY) $(PP_LIBRARY)
$(CXX) $(CXXFLAGS) $(OBJECTS) -o $@ $(LDFLAGS)
$(RGB_LIBRARY): FORCE
$(MAKE) -C $(RGB_LIBDIR)
$(PP_LIBRARY): FORCE
$(MAKE) -C $(PP_LIBDIR)
pixel-push.o : pixel-push.cc
%.o : %.cc
$(CXX) -I$(PP_INCDIR) -I$(RGB_INCDIR) $(CXXFLAGS) -c -o $@ $<
clean:
rm -f $(OBJECTS) $(BINARIES)
$(MAKE) -C $(RGB_LIBDIR) clean
$(MAKE) -C $(PP_LIBDIR) clean
FORCE:
.PHONY: FORCE