forked from hzeller/spixels-pixelpusher
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
41 lines (30 loc) · 1020 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=spixels-pixel-push.o
BINARIES=spixels-pixel-push
SPIXELS_INCDIR=spixels/include
SPIXELS_LIBDIR=spixels/lib
SPIXELS_LIBRARY_NAME=spixels
SPIXELS_LIBRARY=$(SPIXELS_LIBDIR)/lib$(SPIXELS_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$(SPIXELS_LIBDIR) -l$(SPIXELS_LIBRARY_NAME) \
-lrt -lm -lpthread -L/opt/vc/lib -lbcm_host
all : spixels-pixel-push
spixels-pixel-push : $(OBJECTS) $(SPIXELS_LIBRARY) $(PP_LIBRARY)
$(CXX) $(CXXFLAGS) $(OBJECTS) -o $@ $(LDFLAGS)
$(SPIXELS_LIBRARY): FORCE
$(MAKE) -C $(SPIXELS_LIBDIR)
$(PP_LIBRARY): FORCE
$(MAKE) -C $(PP_LIBDIR)
spixels-pixel-push.o : spixels-pixel-push.cc
%.o : %.cc
$(CXX) -I$(PP_INCDIR) -I$(SPIXELS_INCDIR) $(CXXFLAGS) -c -o $@ $<
clean:
rm -f $(OBJECTS) $(BINARIES)
$(MAKE) -C $(SPIXELS_LIBDIR) clean
$(MAKE) -C $(PP_LIBDIR) clean
FORCE:
.PHONY: FORCE