summaryrefslogtreecommitdiffstats
path: root/tinyMSRP/droid-makefile
blob: 6468bfac5daf268adc474b42bfb48211146d5399 (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)

CFLAGS := $(CFLAGS_LIB) -I./include -I../tinySAK/src -I../tinyNET/src -I../tinyHTTP/include -I../tinySDP/include
LDFLAGS := $(LDFLAGS_LIB) -ltinySAK_$(MARCH) -ltinyNET_$(MARCH) -ltinyHTTP_$(MARCH) -ltinySDP_$(MARCH)

all: $(APP)

OBJS = \
	src/tmsrp.o\
	src/tmsrp_event.o\
	src/tmsrp_message.o\
	src/tmsrp_uri.o
	
	### Headers
OBJS += src/headers/tmsrp_header.o\
		src/headers/tmsrp_header_Authentication-Info.o\
		src/headers/tmsrp_header_Authorization.o\
		src/headers/tmsrp_header_Byte-Range.o\
		src/headers/tmsrp_header_Content-Type.o\
		src/headers/tmsrp_header_Dummy.o\
		src/headers/tmsrp_header_Expires.o\
		src/headers/tmsrp_header_Failure-Report.o\
		src/headers/tmsrp_header_From-Path.o\
		src/headers/tmsrp_header_Max-Expires.o\
		src/headers/tmsrp_header_Message-ID.o\
		src/headers/tmsrp_header_Min-Expires.o\
		src/headers/tmsrp_header_Status.o\
		src/headers/tmsrp_header_Success-Report.o\
		src/headers/tmsrp_header_To-Path.o\
		src/headers/tmsrp_header_Use-Path.o\
		src/headers/tmsrp_header_WWW-Authenticate.o
	
	### parsers
OBJS += src/parsers/tmsrp_parser_message.o\
	src/parsers/tmsrp_parser_uri.o
	
	### session
OBJS += src/session/tmsrp_config.o\
	src/session/tmsrp_data.o \
	src/session/tmsrp_receiver.o \
	src/session/tmsrp_sender.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)
OpenPOWER on IntegriCloud