summaryrefslogtreecommitdiffstats
path: root/plugins/audio_webrtc/droid-makefile
blob: ba5e9f5047a969d3db48d20036293aa16c48c8dc (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
APP := lib$(PROJECT)_$(MARCH).$(EXT)

THIRDPARTIES_INC := ../../thirdparties/android/include
THIRDPARTIES_INC_COMMON := ../../thirdparties/common/include
THIRDPARTIES_LIB := ../../thirdparties/android/lib
THIRDPARTIES_MARCH_LIB := ../../thirdparties/android/lib/$(MARCH)
DOUBANGO_LIB := ../../android-projects/output

WEBRTC_CFLAGS := -DHAVE_WEBRTC=1
WEBRTC_LDFLAGS := -lwebrtc_spl_$(MARCH) -lwebrtc_audio_device_$(MARCH) -lwebrtc_system_wrappers_$(MARCH)

################################

CFLAGS := $(CFLAGS_LIB) -I$(THIRDPARTIES_INC) -I$(THIRDPARTIES_INC_COMMON) \
	-I../../tinySAK/src -I../../tinyMEDIA/include -I../../tinySDP/include -I../../tinyRTP/include -I../../tinyDAV/include

LDFLAGS := $(LDFLAGS_LIB) -L$(THIRDPARTIES_LIB) -L$(THIRDPARTIES_LIB)/android-9 -L$(THIRDPARTIES_MARCH_LIB) -L$(DOUBANGO_LIB) \
	 -ltinySAK_$(MARCH) -ltinyMEDIA_$(MARCH) -ltinySDP_$(MARCH) $(WEBRTC_LDFLAGS) -lm -ldl -llog -lgcc -lstdc++ -lOpenSLES -lgnustl_static

all: $(APP)

OBJS = \
	audio_webrtc.o \
	audio_webrtc_consumer.o \
	audio_webrtc_producer.o \
	audio_webrtc_transport.o \
	../../tinyDAV/src/audio/tdav_consumer_audio.o \
	../../tinyDAV/src/audio/tdav_producer_audio.o \

$(APP): $(OBJS)
ifeq ($(EXT), a)
	$(AR) rcs $@ $^
else
	$(CC) $(LDFLAGS) -o $@ $^
endif

%.o: %.c
	$(CC) -c $(INCLUDE) $(CFLAGS) $< -o $@
	
%.o: %.cxx
	$(CPP) -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)
OpenPOWER on IntegriCloud