-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.webapp
43 lines (31 loc) · 1.2 KB
/
Makefile.webapp
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
CXXFLAGS=-Wall -O3 -g -fno-strict-aliasing
WEBBINARIES=web-matrix ledwebsrvr
# Where our library resides. It is split between includes and the binary
# library in lib
RGB_INCDIR=include
RGB_LIBDIR=lib
RGB_LIBRARY_NAME=rgbmatrix
RGB_LIBRARY=$(RGB_LIBDIR)/lib$(RGB_LIBRARY_NAME).a
# Socket Libary for Webclient / Server Access
SOCKET_LIBDIR=webinterface
SOCKET_LIBRARY_NAME=practicalsocket
SOCKET_LIBRARY=$(SOCKET_LIBDIR)/lib$(SOCKET_LIBRARY_NAME).a
LDFLAGS+=-L$(RGB_LIBDIR) -l$(RGB_LIBRARY_NAME) -L$(SOCKET_LIBDIR) -l$(SOCKET_LIBRARY_NAME) -lrt -lm -lpthread
# Web Server Client define
CXXFLAGS+=-DLED_SCKT_INTERFACE
all : $(WEBBINARIES)
$(RGB_LIBRARY): Makefile.webapp
$(MAKE) -C $(RGB_LIBDIR) WEBDEF=-DLED_SCKT_INTERFACE
$(SOCKET_LIBRARY) : Makefile.webapp
$(MAKE) -C $(SOCKET_LIBDIR) -f Makefile
web-matrix : demo-web.o $(RGB_LIBRARY) $(SOCKET_LIBRARY)
$(CXX) $(CXXFLAGS) demo-web.o -o $@ $(LDFLAGS)
ledwebsrvr : websrvr.o $(SOCKET_LIBRARY)
$(CXX) $(CXXFLAGS) websrvr.o -o $@ $(LDFLAGS)
#$(RGB_LIBRARY)
%.o : %.cc
$(CXX) -I$(RGB_INCDIR) $(CXXFLAGS) -DADAFRUIT_RGBMATRIX_HAT -c -o $@ $<
clean:
rm -f *.o $(OBJECTS) $(BINARIES)
$(MAKE) -C $(RGB_LIBDIR) clean
$(MAKE) -C $(SOCKET_LIBDIR) -f Makefile clean