-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
64 lines (48 loc) · 1.69 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
CC=gcc
CXX=g++
CFLAGS=-g -c -O2 -m64 -Wall -Wfatal-errors -funroll-loops -Wno-deprecated-declarations -Wno-unused-variable -Wno-unused-but-set-variable -Wno-unused-function -Wno-format-truncation -Wno-attributes -Wno-stringop-truncation
SRC=./source
INC=-I./include
OBJS=crc.o tsdecode.o mempool.o dataqueue.o esignal.o udpsource.o cJSON.o cJSON_Utils.o
LIB=libsrthub.a
BASELIBS=
BASELIBS += ./cbffmpeg/libavfilter/libavfilter.a \
./cbffmpeg/libavformat/libavformat.a \
./cbffmpeg/libswscale/libswscale.a \
./cbffmpeg/libavcodec/libavcodec.a \
./cbffmpeg/libavutil/libavutil.a \
./cbffmpeg/libswresample/libswresample.a \
./cbsrt/libsrt.a \
./cblibcurl/lib/.libs/libcurl.a \
/usr/lib/x86_64-linux-gnu/libcrypto.a
INC += -I./cbffmpeg
INC += -I./cbsrt/srtcore
INC += -I./cbsrt
INC += -I./cblibcurl/include/curl
BASELIBS += -lz -ldl -lssl -llzma
all: $(LIB) srthub
srthub: srthub.o $(OBJS)
$(CXX) srthub.o $(OBJS) -L./ $(BASELIBS) -lm -lpthread -o srthub
$(LIB): $(OBJS)
ar rcs $(LIB) $(OBJS)
@echo finishing building lib
srthub.o: $(SRC)/srthub.c
$(CC) $(CFLAGS) $(INC) $(SRC)/srthub.c
dataqueue.o: $(SRC)/dataqueue.c
$(CC) $(CFLAGS) $(INC) $(SRC)/dataqueue.c
mempool.o: $(SRC)/mempool.c
$(CC) $(CFLAGS) $(INC) $(SRC)/mempool.c
tsdecode.o: $(SRC)/tsdecode.c
$(CC) $(CFLAGS) $(INC) $(SRC)/tsdecode.c
crc.o: $(SRC)/crc.c
$(CC) $(CFLAGS) $(INC) $(SRC)/crc.c
esignal.o: $(SRC)/esignal.c
$(CC) $(CFLAGS) $(INC) $(SRC)/esignal.c
udpsource.o: $(SRC)/udpsource.c
$(CC) $(CFLAGS) $(INC) $(SRC)/udpsource.c
cJSON.o: $(SRC)/cJSON.c
$(CC) $(CFLAGS) $(INC) $(SRC)/cJSON.c
cJSON_Utils.o: $(SRC)/cJSON_Utils.c
$(CC) $(CFLAGS) $(INC) $(SRC)/cJSON_Utils.c
clean:
rm -rf *o srthub