Statistics
| Branch: | Revision:

peerstreamer-src / Makefile @ 2123cd4e

History | View | Annotate | Download (1.99 KB)

1
SRC=$(wildcard src/*.c)
2
OBJS=$(SRC:.c=.o)
3

    
4
EXE=peerstreamer-ng
5

    
6
CFLAGS+=-Isrc/ -ILibs/mongoose/ -ILibs/pstreamer/include -ILibs/GRAPES/include -LLibs/GRAPES/src  -LLibs/pstreamer/src 
7
ifdef DEBUG
8
CFLAGS+=-g -W -Wall -Wno-unused-function -Wno-unused-parameter -O0
9
else
10
CFLAGS+=-O6
11
endif
12

    
13
LIBS+=Libs/mongoose/mongoose.o Libs/GRAPES/src/libgrapes.a Libs/pstreamer/src/libpstreamer.a
14
MONGOOSE_OPTS+=-DMG_DISABLE_MQTT -DMG_DISABLE_JSON_RPC -DMG_DISABLE_SOCKETPAIR  -DMG_DISABLE_CGI # -DMG_DISABLE_HTTP_WEBSOCKET
15
LDFLAGS+=-lpstreamer -lgrapes -lm
16

    
17
all: $(EXE)
18

    
19
$(EXE): $(LIBS) $(OBJS) peerstreamer-ng.c
20
	$(CC) -o peerstreamer-ng  peerstreamer-ng.c $(OBJS) Libs/mongoose/mongoose.o $(CFLAGS) $(LDFLAGS)
21

    
22
%.o: %.c 
23
	$(CC) $< -o $@ -c $(CFLAGS) 
24

    
25
Libs/mongoose/mongoose.o:
26
	git submodule init Libs/mongoose/
27
	git submodule update Libs/mongoose/
28
	make -C Libs/mongoose/ CFLAGS="$(CFLAGS)" MONGOOSE_OPTS="$(MONGOOSE_OPTS)"
29

    
30
Libs/GRAPES/src/libgrapes.a:
31
	git submodule init Libs/GRAPES/
32
	git submodule update Libs/GRAPES/
33
	make -C Libs/GRAPES/ 
34

    
35
Libs/pstreamer/src/libpstreamer.a:
36
	git submodule init Libs/pstreamer/
37
	git submodule update Libs/pstreamer/
38
	make -C Libs/pstreamer/ 
39

    
40
Tools/janus:
41
	git submodule init Libs/janus-gateway/
42
	git submodule update Libs/janus-gateway/
43
	cd $(PWD)/Libs/janus-gateway/ && ./autogen.sh
44
	cd $(PWD)/Libs/janus-gateway/ && SRTP15X_CFLAGS="-I$(PWD)/Libs/janus-gateway/Libs/libsrtp/include" SRTP15X_LIBS="-L$(PWD)/Libs/janus-gateway/Libs/libsrtp" PKG_CONFIG_PATH=$(PWD)/Libs/janus-gateway/Libs/libsrtp ./configure --disable-all-plugins --disable-all-transports --disable-all-handlers --enable-unix-sockets --disable-turn-rest-api --enable-static --prefix=$(PWD)/Tools/janus #--enable-libsrtp2
45
	make -C Libs/janus-gateway/ install
46

    
47
tests:
48
	make -C Test/  # CFLAGS="$(CFLAGS)"
49
	Test/run_tests.sh
50

    
51
clean:
52
	rm -rf Tools/janus
53
	rm -f *.o $(EXE) $(OBJS) $(LIBS)
54
	make -C Test/ clean
55
	make -C Libs/mongoose clean
56
	make -C Libs/GRAPES clean
57
	make -C Libs/pstreamer clean
58
	make -C Libs/janus-gateway distclean
59

    
60
.PHONY: all clean
61