-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
45 lines (28 loc) · 883 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
42
CC=ccache gcc
CFLAGS=-ggdb -flto
LIBS=-lavutil -lavcodec -lavformat -lgsasl -lz -lgmp -lm
PKG_CONFIG=`pkg-config --cflags --libs libsoup-2.4 json-glib-1.0 openssl `
ifeq ($(MAKECMDGOALS),test)
EXCLUDE=-not -name "webrtc_app.c" -not -path "./SignallingClient/*"
else
EXCLUDE=-not -name "test.c" -not -path "./test/*"
endif
SRC=$(shell find . $(EXCLUDE) -name "*.c" -not -path "./SignallingServer/*" -not -path "./GstreamerClient/*")
OBJECTS=$(SRC:.c=.o)
$(info src files $(SRC))
$(info obj files $(OBJECTS))
all:webrtc
webrtc:$(OBJECTS)
$(CC) $(CFLAGS) -o $@ $(addprefix ./build/,$(^F)) $(LIBS) $(PKG_CONFIG)
%.o:%.c
$(CC) $(CFLAGS) -c -o $(addprefix ./build/,$(@F)) $^ $(PKG_CONFIG)
clean:
rm -rf ./build/*
run:
make
./webrtc
test:webrtc
./webrtc
startservers:
nohup npm start --prefix ./WebRTC_Browser_APP/ &
npm start --prefix ./SignallingServer/