summaryrefslogtreecommitdiffstats
path: root/tinyHTTP/droid-makefile
blob: fd3641ad7506ff1320efc2f22f14dcafe8d41e06 (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../tinySAK/src -I../tinyNET/src -I./include
LDFLAGS := $(LDFLAGS_LIB) -ltinySAK_$(MARCH) -ltinyNET_$(MARCH)

all: $(APP)

OBJS = \
	src/thttp.o\
	src/thttp_action.o\
	src/thttp_dialog.o\
	src/thttp_event.o\
	src/thttp_message.o\
	src/thttp_session.o\
	src/thttp_url.o
	###################
	## AUTH
	###################
OBJS +=	src/auth/thttp_auth.o\
	src/auth/thttp_challenge.o
	###################
	## HEADERS
	###################
OBJS +=	src/headers/thttp_header.o\
	src/headers/thttp_header_Authorization.o\
	src/headers/thttp_header_Content_Length.o\
	src/headers/thttp_header_Content_Type.o\
	src/headers/thttp_header_Dummy.o\
	src/headers/thttp_header_ETag.o\
	src/headers/thttp_header_Sec_WebSocket_Accept.o\
	src/headers/thttp_header_Sec_WebSocket_Key.o\
	src/headers/thttp_header_Sec_WebSocket_Protocol.o\
	src/headers/thttp_header_Sec_WebSocket_Version.o\
	src/headers/thttp_header_Transfer_Encoding.o\
	src/headers/thttp_header_WWW_Authenticate.o
	###################
	## parsers
	###################
OBJS +=	src/parsers/thttp_parser_header.o\
	src/parsers/thttp_parser_message.o\
	src/parsers/thttp_parser_url.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