forked from grame-cncm/faustservice
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
71 lines (59 loc) · 2.08 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#----------------------------------------------------------------------------------------
# Faustweb requires : boost, libmicrohttpd, libcrypto and libarchive
# in order to compile it just do make
# Have a look at faustweb.conf for upstart. It contains a path to faustweb executable
# that you will have to adapt
#----------------------------------------------------------------------------------------
dest := /usr/local/bin
pdsdk := /usr/include/pd
ifeq ($(shell uname -s), Darwin)
EXT = -mt
LDFLAGS = -L/opt/local/lib
CXXFLAGS = -Wall -Wextra -Wno-unused-local-typedef -O3 -I/opt/local/include
CLANGVERSION =
CXX=clang++$(CLANGVERSION)
STD=c++11
else
EXT = ""
CXXFLAGS = -Wall -Wextra -O3 -DBOOST_NO_CXX11_SCOPED_ENUMS
STD=c++11
endif
all : faustweb
faustweb : *.cpp *.hh
$(CXX) -std=$(STD) $(CXXFLAGS) *.cpp $(LDFLAGS) \
-lmicrohttpd -lboost_filesystem$(EXT) -lboost_system$(EXT) -lboost_program_options$(EXT) \
-larchive -lcrypto -lm \
-o faustweb
clean :
rm faustweb
format :
clang-format$(CLANGVERSION) -i -style=file *.cpp *.hh
install_systemd:
install faustweb.service /etc/systemd/system/faustweb.service
sed -i s%HOMEPATH%$(HOME)%g /etc/systemd/system/faustweb.service
systemctl enable faustweb
rm -rf sessions
systemctl start faustweb
# faustservice should be run from /home/faust/Install/faustservice/faustweb
# this is hard coded into faustweb.service
install:
install faustweb.conf /etc/init/faustweb.conf
install apache2-faustweb.conf /etc/apache2/sites-available/002-faustweb.conf
install bin/remoteOSX $(dest)
install -d $(pdsdk)/pdfaustextra/
install pdfaustextra/*.pd $(pdsdk)/pdfaustextra/
uninstall:
rm -f $(dest)/remoteOSX
rm -rf $(pdsdk)/pdfaustextra/
start:
initctl start faustweb
test:
./faustweb -v 3 -p 80 -d /tmp/sessions -r $(shell pwd)/faustweb
help:
@echo "faustweb : compiles faustweb"
@echo "clean : remove faustweb"
@echo "format : format source code using astyle"
@echo "install : install upstart config and other files"
@echo "uninstall: "
@echo "start : starts faustweb as an upstart service"
@echo "test : starts faustweb for tests"