123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105 |
- APP := lib$(PROJECT)_$(MARCH).$(EXT)
- THIRDPARTIES_INC := ../thirdparties/android/include
- THIRDPARTIES_LIB := ../thirdparties/android/lib
- # TLS (Default: enabled)
- ifeq ($(TLS), no)
- TLS_CFLAGS := -DHAVE_OPENSSL=0
- TLS_LDFLAGS :=
- else
- TLS_CFLAGS := -DHAVE_OPENSSL=1
- TLS_LDFLAGS := -lssl_$(MARCH) -lcrypto_$(MARCH)
- endif
- CFLAGS := $(CFLAGS_LIB) $(TLS_CFLAGS) -I$(THIRDPARTIES_INC) -I../tinySAK/src -I./src
- LDFLAGS := $(LDFLAGS_LIB) $(TLS_LDFLAGS) -L$(THIRDPARTIES_LIB) -ltinySAK_$(MARCH)
- all: $(APP)
- OBJS = \
- src/tnet.o\
- src/tnet_auth.o\
- src/tnet_endianness.o\
- src/tnet_nat.o\
- src/tnet_poll.o\
- src/tnet_socket.o\
- src/tnet_transport.o\
- src/tnet_transport_poll.o\
- src/tnet_utils.o
- ###################
- ## DHCP
- ###################
- OBJS += src/dhcp/tnet_dhcp.o\
- src/dhcp/tnet_dhcp_message.o\
- src/dhcp/tnet_dhcp_option.o\
- src/dhcp/tnet_dhcp_option_sip.o
- ###################
- ## DHCPv6
- ###################
- OBJS += src/dhcp6/tnet_dhcp6.o\
- src/dhcp6/tnet_dhcp6_duid.o\
- src/dhcp6/tnet_dhcp6_message.o\
- src/dhcp6/tnet_dhcp6_option.o
- ###################
- ## DNS
- ###################
- OBJS += src/dns/tnet_dns.o\
- src/dns/tnet_dns_a.o\
- src/dns/tnet_dns_aaaa.o\
- src/dns/tnet_dns_cname.o\
- src/dns/tnet_dns_message.o\
- src/dns/tnet_dns_mx.o\
- src/dns/tnet_dns_naptr.o\
- src/dns/tnet_dns_ns.o\
- src/dns/tnet_dns_opt.o\
- src/dns/tnet_dns_ptr.o\
- src/dns/tnet_dns_regexp.o\
- src/dns/tnet_dns_resolvconf.o\
- src/dns/tnet_dns_rr.o\
- src/dns/tnet_dns_soa.o\
- src/dns/tnet_dns_srv.o\
- src/dns/tnet_dns_txt.o
- ###################
- ## ICE
- ###################
- OBJS += src/ice/tnet_ice_candidate.o \
- src/ice/tnet_ice_ctx.o \
- src/ice/tnet_ice_event.o \
- src/ice/tnet_ice_pair.o \
- src/ice/tnet_ice_utils.o
- ###################
- ## STUN
- ###################
- OBJS += src/stun/tnet_stun.o\
- src/stun/tnet_stun_attribute.o\
- src/stun/tnet_stun_message.o
- ###################
- ## TLS / DTLS
- ###################
- OBJS += src/tls/tnet_tls.o\
- src/tls/tnet_dtls.o
- ###################
- ## TURN
- ###################
- OBJS += src/turn/tnet_turn.o\
- src/turn/tnet_turn_attribute.o\
- src/turn/tnet_turn_message.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)
|