blob: a56b89fee600bd96db3ee8643f68c8abfe1eb85c (
plain)
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
|
APP := lib$(PROJECT)_$(MARCH).$(EXT)
# SRTP (Default: enabled)
ifeq ($(SRTP),no)
LIBSRTP_CFLAGS := -DHAVE_SRTP=0
else
LIBSRTP_CFLAGS := -DHAVE_SRTP=1
LIBSRTP_LDFLAGS := -lsrtp
endif
THIRDPARTIES_INC := ../thirdparties/android/include
CFLAGS := $(CFLAGS_LIB) -I$(THIRDPARTIES_INC) $(LIBSRTP_CFLAGS) -I../tinySAK/src -I../tinyNET/src -I./include -I../tinyMEDIA/include
LDFLAGS := $(LDFLAGS_LIB) $(LIBSRTP_LDFLAGS) -ltinySAK_$(MARCH) -ltinyNET_$(MARCH) -ltinyMEDIA_$(MARCH)
all: $(APP)
OBJS = \
src/trtp.o \
src/trtp_manager.o \
src/trtp_srtp.o
## RTCP
OBJS += src/rtcp/trtp_rtcp_header.o \
src/rtcp/trtp_rtcp_packet.o \
src/rtcp/trtp_rtcp_rblock.o \
src/rtcp/trtp_rtcp_report.o \
src/rtcp/trtp_rtcp_report_bye.o \
src/rtcp/trtp_rtcp_report_fb.o \
src/rtcp/trtp_rtcp_report_rr.o \
src/rtcp/trtp_rtcp_report_sdes.o \
src/rtcp/trtp_rtcp_report_sr.o \
src/rtcp/trtp_rtcp_report_xr.o \
src/rtcp/trtp_rtcp_sdes_chunck.o \
src/rtcp/trtp_rtcp_sdes_item.o \
src/rtcp/trtp_rtcp_session.o
## RTP
OBJS += src/rtp/trtp_rtp_header.o \
src/rtp/trtp_rtp_packet.o \
src/rtp/trtp_rtp_session.o
$(APP): $(OBJS)
ifeq ($(EXT), a)
$(AR) rcs $@ $^
else
$(CC) $(LDFLAGS) -o $@ $^
endif
%.o: %.c
$(CC) -c $(INCLUDE) $(CFLAGS) $< -o $@
install: $(APP)
$(ANDROID_SDK_ROOT)/tools/adb remount
$(ANDROID_SDK_ROOT)/tools/adb push $(APP) $(LIB_DIR)/$(APP)
$(ANDROID_SDK_ROOT)/tools/adb shell chmod 777 $(LIB_DIR)/$(APP)
clean:
@rm -f $(OBJS) $(APP)
|