13 Commits
Author SHA1 Message Date
divadiow 98ddea8d25 define all sensors 2025-08-27 13:39:56 +01:00
divadiow 1a80945308 Update .gitignore 2025-08-27 11:46:21 +01:00
divadiow a9d62026e1 Update README.md 2025-08-27 11:46:14 +01:00
divadiow 5d5488eedd Create txw81x_fpv_v2.5.3.7-36533_2025.8.27_MINI_DV.bin 2025-08-27 11:25:56 +01:00
divadiow 5209331700 Update project_config.h 2025-08-27 11:03:03 +01:00
divadiow 7d032cbf1a Update .gitignore 2025-08-27 10:57:14 +01:00
divadiow 15c2d6c0ae Create Makefile 2025-08-27 10:56:57 +01:00
divadiow ec3a4c4951 Update .gitignore 2025-08-27 10:56:54 +01:00
divadiow 1784e620f8 Update lwipopts.h 2025-08-27 10:42:27 +01:00
divadiow e9c715a2d3 Update project_config.h 2025-08-27 10:36:05 +01:00
divadiow f955bfe251 Update spook_config.h 2025-08-27 10:16:56 +01:00
divadiow bc92943b46 Update tcp.c 2025-08-27 10:10:54 +01:00
divadiow 361b43c4c7 Update main.c 2025-08-27 10:00:59 +01:00
10 changed files with 436 additions and 67 deletions
+7 -19
View File
@@ -1,19 +1,7 @@
CMakeLists.txt.user .cache/
CMakeCache.txt .cdk/
CMakeFiles *.cdkws
CMakeScripts project/obj/
Testing fpv_app_umac*
Makefile cdkws.mk
cmake_install.cmake project.map
install_manifest.txt
compile_commands.json
CTestTestfile.cmake
_deps
CMakeUserPresets.json
# CLion
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#cmake-build-*
+4 -4
View File
@@ -2,7 +2,7 @@
Taixin TXW81x IPC/DV Taixin TXW81x IPC/DV
https://www.elektroda.com/rtvforum/topic4033757.html https://www.elektroda.com/rtvforum/topic4033757.html<br>
https://www.elektroda.com/rtvforum/topic4129331.html https://www.elektroda.com/rtvforum/topic4129331.html<br>
https://www.elektroda.com/rtvforum/topic4123724.html https://www.elektroda.com/rtvforum/topic4123724.html<br>
https://www.elektroda.com/rtvforum/topic4120455.html https://www.elektroda.com/rtvforum/topic4120455.html<br>
+5 -5
View File
@@ -932,7 +932,7 @@ __init static void app_network_init()
if (sys_cfgs.wifi_mode == WIFI_MODE_AP) { //AP if (sys_cfgs.wifi_mode == WIFI_MODE_AP) { //AP
sys_dhcpd_start(); sys_dhcpd_start();
} }
ota_Tcp_Server(); //ota_Tcp_Server();
#if NET_TO_QC == 1 #if NET_TO_QC == 1
if (sys_cfgs.wifi_mode == WIFI_MODE_STA){ if (sys_cfgs.wifi_mode == WIFI_MODE_STA){
sta_send_udp_msg_init(); sta_send_udp_msg_init();
@@ -1377,10 +1377,10 @@ int main()
mcu_watchdog_timeout(5); mcu_watchdog_timeout(5);
OS_WORK_INIT(&main_wk, main_loop2, 0); OS_WORK_INIT(&main_wk, main_loop2, 0);
os_run_work_delay(&main_wk, 1000); os_run_work_delay(&main_wk, 1000);
speedTest_tcp_server(20202); //speedTest_tcp_server(20202);
speedTest_tcp_rx_server(20203); //speedTest_tcp_rx_server(20203);
Udp_rx_server(20204,1000); //Udp_rx_server(20204,1000);
Udp_to_ip("192.168.1.100",20202,0); //Udp_to_ip("192.168.1.100",20202,0);
return 0; return 0;
} }
#endif #endif
+45 -25
View File
@@ -3,7 +3,7 @@
#define CUSTOMER_ID 1 #define CUSTOMER_ID 5
/** /**
* CUSTOMER_ID : * CUSTOMER_ID :
* 1 TXW818_WAV_EVB * 1 TXW818_WAV_EVB
@@ -781,9 +781,9 @@
#elif (CUSTOMER_ID == 5) #elif (CUSTOMER_ID == 5)
//是否使能需要psram的空间 //是否使能需要psram的空间
#define PSRAM_HEAP //#define PSRAM_HEAP
#define CUSTOM_PSRAM_SIZE (2000*1024) //#define CUSTOM_PSRAM_SIZE (2000*1024)
#define CUSTOM_SIZE (50*1024) #define CUSTOM_SIZE (60*1024)
#define DEFAULT_SYS_CLK (240*1000000) #define DEFAULT_SYS_CLK (240*1000000)
@@ -799,8 +799,8 @@
/**********************************sd卡配置*********************************************************** */ /**********************************sd卡配置*********************************************************** */
#define SDH_EN 1 #define SDH_EN 0
#define FS_EN 1 #define FS_EN 0
/*************************************************************************************************** */ /*************************************************************************************************** */
/***************************视频相关宏要打开********************************************************** */ /***************************视频相关宏要打开********************************************************** */
@@ -812,8 +812,8 @@
/*************************************************************************************************** */ /*************************************************************************************************** */
/**********************************************音频相关********************************************* */ /**********************************************音频相关********************************************* */
#define AUDIO_EN 1 #define AUDIO_EN 0
#define AUDIO_DAC_EN 1 #define AUDIO_DAC_EN 0
/************************************************************************************************** */ /************************************************************************************************** */
@@ -869,11 +869,11 @@
#define WIFI_PREVENT_PS_MODE_EN 1 //是否尽可能的阻止sta进入休眠 #define WIFI_PREVENT_PS_MODE_EN 1 //是否尽可能的阻止sta进入休眠
//设置AP的ip地址以及ip池 //设置AP的ip地址以及ip池
#define IP_ADDR_DEFAULT 0x0101A8C0 //192.168.1.1 #define IP_ADDR_DEFAULT 0x0104A8C0 //192.168.4.1
#define NET_MASK_DEFAULT 0x00FFFFFF //255.255.255.0 #define NET_MASK_DEFAULT 0x00FFFFFF //255.255.255.0
#define GW_IP_DEFAULT 0x0101A8C0 //192.168.1.1 #define GW_IP_DEFAULT 0x0104A8C0 //192.168.4.1
#define DHCP_START_IP_DEFAULT 0x6401A8C0 //192.168.1.100 #define DHCP_START_IP_DEFAULT 0x6404A8C0 //192.168.4.100
#define DHCP_END_IP_DEFAULT 0xFE01A8C0 //192.168.1.254 #define DHCP_END_IP_DEFAULT 0xFE04A8C0 //192.168.4.254
/************************************************************************************************************************************ */ /************************************************************************************************************************************ */
@@ -883,8 +883,8 @@
/***********************************************IO配置,需要用到的IO配置需要在这里配置 **************************************/ /***********************************************IO配置,需要用到的IO配置需要在这里配置 **************************************/
//串口配置 //串口配置
#define PIN_UART0_TX PA_12 #define PIN_UART0_TX PC_7
#define PIN_UART0_RX PA_13 #define PIN_UART0_RX PC_6
//AT命令使用哪个串口 //AT命令使用哪个串口
#define ATCMD_UARTDEV HG_UART0_DEVID #define ATCMD_UARTDEV HG_UART0_DEVID
@@ -954,17 +954,37 @@
/**************************************DVP摄像头型号配置***************************************************************** */ /**************************************DVP摄像头型号配置***************************************************************** */
//如果sdk没有对应型号,需要自己去添加 //如果sdk没有对应型号,需要自己去添加
#define CMOS_AUTO_LOAD 1 #define CMOS_AUTO_LOAD 1
#define DEV_SENSOR_GC0308 1 #define DEV_SENSOR_GC0308 1
#define DEV_SENSOR_OV2640 1 #define DEV_SENSOR_GC0309 1
#define DEV_SENSOR_GC0311 1
#define DEV_SENSOR_OV2640 1
#define DEV_SENSOR_GC0328 1
#define DEV_SENSOR_GC0329 1
#define DEV_SENSOR_SP0A19 1
#define DEV_SENSOR_SP0718 1
#define DEV_SENSOR_BF3A03 1
#define DEV_SENSOR_BF30A2 1
#define DEV_SENSOR_BF2013 1
#define DEV_SENSOR_BF3703 1
#define DEV_SENSOR_BF3720 1
#define DEV_SENSOR_GC0312 1
#define DEV_SENSOR_OV7660 1
#define DEV_SENSOR_OV7670 1
#define DEV_SENSOR_OV7725 1
#define DEV_SENSOR_XC7011_GC1054 1
#define DEV_SENSOR_XC7011_H63 1
#define DEV_SENSOR_XC7016_H63 1
#define DEV_SENSOR_XCG532 1
/*********************************************************************************************************************** */ /*********************************************************************************************************************** */
/**********************************************MCU屏驱动配置************************************************************* */ /**********************************************MCU屏驱动配置************************************************************* */
#define LCD_EN 1 #define LCD_EN 0
#define LVGL_STREAM_ENABLE 1 #define LVGL_STREAM_ENABLE 0
#define LCD_ST7789V_MCU565_EN 1 #define LCD_ST7789V_MCU565_EN 0
/************************************************************************************************************************* */ /************************************************************************************************************************* */
@@ -977,8 +997,8 @@
//jpg0 //jpg0
#define JPG0_HEAD_RESERVER 0 //每段JPEG BUF前面预留用于填充其他数据的数据量,无需预留填0 #define JPG0_HEAD_RESERVER 0 //每段JPEG BUF前面预留用于填充其他数据的数据量,无需预留填0
#define JPG0_BUF_LEN 4096 //8192//1308//2880//4096+24 // 1*1024// 1*1024// JPG buf长度+reserver长度 1308 #define JPG0_BUF_LEN 1308 //8192//1308//2880//4096+24 // 1*1024// 1*1024// JPG buf长度+reserver长度 1308
#define JPG0_NODE 80 //20//18//30*2 #define JPG0_NODE 40 //20//18//30*2
#define JPG0_TAIL_RESERVER 0 #define JPG0_TAIL_RESERVER 0
@@ -1030,9 +1050,9 @@
#define NET_PAIR 1 #define NET_PAIR 1
#define PRINTER_EN 0 #define PRINTER_EN 0
#define AUDIO_EN 1 #define AUDIO_EN 0
#define AUDIO_DAC_EN 1 #define AUDIO_DAC_EN 0
#define RTP_SOUND (1&&AUDIO_EN) #define RTP_SOUND (0&&AUDIO_EN)
#define MJPEG_VIDEO (1 &&OPENDML_EN&&FS_EN&&SDH_EN&&JPG_EN) //基于框架的mjpeg录像 #define MJPEG_VIDEO (1 &&OPENDML_EN&&FS_EN&&SDH_EN&&JPG_EN) //基于框架的mjpeg录像
#define UVC_VIDEO (1 &&OPENDML_EN&&FS_EN&&SDH_EN&&USB_EN) //基于框架的uvc录像 #define UVC_VIDEO (1 &&OPENDML_EN&&FS_EN&&SDH_EN&&USB_EN) //基于框架的uvc录像
+7 -7
View File
@@ -7,7 +7,7 @@
#define SPOOK_MAX_FRAME_SIZE 0/*352*288*3*/ #define SPOOK_MAX_FRAME_SIZE 0/*352*288*3*/
#define SPOOK_PORT 7070 #define SPOOK_PORT 7070
//#define JPEG_ENCODER_NAME "jpeg_dvp" #define JPEG_ENCODER_NAME "jpeg_dvp"
//#define JPEG_ENCODER2_NAME "jpeg_usb" //#define JPEG_ENCODER2_NAME "jpeg_usb"
#define FILE_JPEG_ENCODER_NAME "jpeg_file" #define FILE_JPEG_ENCODER_NAME "jpeg_file"
@@ -20,18 +20,18 @@
#define EXCHANGER_SLOT_SIZE 16 #define EXCHANGER_SLOT_SIZE 16
//#define RTSP_LIVE_PATH "/webcam" /* /webcam */ #define RTSP_LIVE_PATH "/webcam" /* /webcam */
//#define RTSP_LIVE_USB_PATH "/webcam2" /* /webcam */ //#define RTSP_LIVE_USB_PATH "/webcam2" /* /webcam */
#define RTSP_WEB_PATH "/file" /* /webcam */ //#define RTSP_WEB_PATH "/file" /* /webcam */
//#define RTSP_LIVE_TRACK "jpeg_dvp" #define RTSP_LIVE_TRACK "jpeg_dvp"
//#define RTSP_LIVE2_TRACK "jpeg_usb" //#define RTSP_LIVE2_TRACK "jpeg_usb"
#define RTSP_WEBFILE_TRACK "jpeg_file" //#define RTSP_WEBFILE_TRACK "jpeg_file"
#define RTSP_LIVE_AUDIO_TRACK "audio" //#define RTSP_LIVE_AUDIO_TRACK "audio"
#define RTSP_WEBFILE_AUDIO_TRACK "audio_file" //#define RTSP_WEBFILE_AUDIO_TRACK "audio_file"
+1 -1
View File
@@ -361,7 +361,7 @@ static int unbase64( unsigned char *d, int len, int *remain )
} }
#if 0 #if 0
static unsigned char s_ptemp[300] = {"TEARDOWN rtsp://192.168.1.1:7070/webcam/ RTSP/1.0\r\nCSeq: 6\r\nUser-Agent: Lavf56.40.101\r\nSession: 9B9C9D9E9FA0A1A2A3A4A5A6A7A8A9\r\n\r\n4A5A6A7A8A9\r\n\r\n"}; static unsigned char s_ptemp[300] = {"TEARDOWN rtsp://192.168.4.1:7070/webcam/ RTSP/1.0\r\nCSeq: 6\r\nUser-Agent: Lavf56.40.101\r\nSession: 9B9C9D9E9FA0A1A2A3A4A5A6A7A8A9\r\n\r\n4A5A6A7A8A9\r\n\r\n"};
#endif #endif
+6 -6
View File
@@ -160,31 +160,31 @@ extern void hw_memcpy(void *dest, const void *src, unsigned int size);
#if IP_NAT #if IP_NAT
#define PBUF_POOL_SIZE 32//pbuf pool size,PBUF_POOL #define PBUF_POOL_SIZE 32//pbuf pool size,PBUF_POOL
#else #else
#define PBUF_POOL_SIZE 6//pbuf pool size,PBUF_POOL #define PBUF_POOL_SIZE 16//pbuf pool size,PBUF_POOL
#endif #endif
#endif//PBUF_POOL_SIZE #endif//PBUF_POOL_SIZE
// One tcp_pcb_listen is needed for each TCPServer. // One tcp_pcb_listen is needed for each TCPServer.
// Each requires 72 bytes of RAM. // Each requires 72 bytes of RAM.
#ifndef MEMP_NUM_TCP_PCB_LISTEN #ifndef MEMP_NUM_TCP_PCB_LISTEN
#define MEMP_NUM_TCP_PCB_LISTEN 2 #define MEMP_NUM_TCP_PCB_LISTEN 4
#endif #endif
// One is tcp_pcb needed for each TCPSocket. // One is tcp_pcb needed for each TCPSocket.
// Each requires 196 bytes of RAM. // Each requires 196 bytes of RAM.
#ifndef MEMP_NUM_TCP_PCB #ifndef MEMP_NUM_TCP_PCB
#define MEMP_NUM_TCP_PCB 4 #define MEMP_NUM_TCP_PCB 12
#endif #endif
// One udp_pcb is needed for each UDPSocket. // One udp_pcb is needed for each UDPSocket.
// Each requires 84 bytes of RAM (total rounded to multiple of 512). // Each requires 84 bytes of RAM (total rounded to multiple of 512).
#ifndef MEMP_NUM_UDP_PCB #ifndef MEMP_NUM_UDP_PCB
#define MEMP_NUM_UDP_PCB 4 #define MEMP_NUM_UDP_PCB 8
#endif #endif
// Number of non-pool pbufs. // Number of non-pool pbufs.
// Each requires 92 bytes of RAM. // Each requires 92 bytes of RAM.
#ifndef MEMP_NUM_PBUF #ifndef MEMP_NUM_PBUF
#define MEMP_NUM_PBUF 10 //PBUF_REF/ROM #define MEMP_NUM_PBUF 32 //PBUF_REF/ROM
#endif #endif
// Each netbuf requires 64 bytes of RAM. // Each netbuf requires 64 bytes of RAM.
@@ -296,7 +296,7 @@ extern void hw_memcpy(void *dest, const void *src, unsigned int size);
// One netconn is needed for each UDPSocket, TCPSocket or TCPServer. // One netconn is needed for each UDPSocket, TCPSocket or TCPServer.
// Each requires 236 bytes of RAM (total rounded to multiple of 512). // Each requires 236 bytes of RAM (total rounded to multiple of 512).
#ifndef MEMP_NUM_NETCONN #ifndef MEMP_NUM_NETCONN
#define MEMP_NUM_NETCONN 6 #define MEMP_NUM_NETCONN 12
#endif #endif
/** /**
+361
View File
@@ -0,0 +1,361 @@
# Also see "include/mbedtls/mbedtls_config.h"
CFLAGS ?= -O2
WARNING_CFLAGS ?= -Wall -Wextra -Wformat=2 -Wno-format-nonliteral
LDFLAGS ?=
# Include ../include for public headers and . for private headers.
# Note that . needs to be included explicitly for the sake of library
# files that are not in the /library directory (which currently means
# under /3rdparty).
LOCAL_CFLAGS = $(WARNING_CFLAGS) -I. -I../include -D_FILE_OFFSET_BITS=64
LOCAL_LDFLAGS =
ifdef DEBUG
LOCAL_CFLAGS += -g3
endif
# MicroBlaze specific options:
# CFLAGS += -mno-xl-soft-mul -mxl-barrel-shift
# To compile on Plan9:
# CFLAGS += -D_BSD_EXTENSION
PERL ?= perl
ifdef WINDOWS
PYTHON ?= python
else
PYTHON ?= $(shell if type python3 >/dev/null 2>/dev/null; then echo python3; else echo python; fi)
endif
# if were running on Windows build for Windows
ifdef WINDOWS
WINDOWS_BUILD=1
else ifeq ($(shell uname -s),Darwin)
ifeq ($(AR),ar)
APPLE_BUILD ?= 1
endif
endif
# To compile as a shared library:
ifdef SHARED
# all code is position-indep with mingw, avoid warning about useless flag
ifndef WINDOWS_BUILD
LOCAL_CFLAGS += -fPIC -fpic
endif
endif
SOEXT_TLS?=so.19
SOEXT_X509?=so.5
SOEXT_CRYPTO?=so.14
# Set AR_DASH= (empty string) to use an ar implementation that does not accept
# the - prefix for command line options (e.g. llvm-ar)
AR_DASH ?= -
ARFLAGS = $(AR_DASH)src
ifdef APPLE_BUILD
ifneq ($(APPLE_BUILD),0)
ARFLAGS = $(AR_DASH)Src
RLFLAGS = -no_warning_for_no_symbols -c
RL ?= ranlib
endif
endif
DLEXT ?= so
ifdef WINDOWS_BUILD
# Windows shared library extension:
DLEXT = dll
else ifdef APPLE_BUILD
ifneq ($(APPLE_BUILD),0)
# Mac OS X shared library extension:
DLEXT = dylib
endif
endif
OBJS_CRYPTO= \
aes.o \
aesni.o \
aesce.o \
aria.o \
asn1parse.o \
asn1write.o \
base64.o \
bignum.o \
bignum_core.o \
bignum_mod.o \
bignum_mod_raw.o \
camellia.o \
ccm.o \
chacha20.o \
chachapoly.o \
cipher.o \
cipher_wrap.o \
cmac.o \
constant_time.o \
ctr_drbg.o \
des.o \
dhm.o \
ecdh.o \
ecdsa.o \
ecjpake.o \
ecp.o \
ecp_curves.o \
entropy.o \
entropy_poll.o \
error.o \
gcm.o \
hash_info.o \
hkdf.o \
hmac_drbg.o \
lmots.o \
lms.o \
md.o \
md5.o \
memory_buffer_alloc.o \
nist_kw.o \
oid.o \
padlock.o \
pem.o \
pk.o \
pk_wrap.o \
pkcs12.o \
pkcs5.o \
pkparse.o \
pkwrite.o \
platform.o \
platform_util.o \
poly1305.o \
psa_crypto.o \
psa_crypto_aead.o \
psa_crypto_cipher.o \
psa_crypto_client.o \
psa_crypto_driver_wrappers.o \
psa_crypto_ecp.o \
psa_crypto_hash.o \
psa_crypto_mac.o \
psa_crypto_pake.o \
psa_crypto_rsa.o \
psa_crypto_se.o \
psa_crypto_slot_management.o \
psa_crypto_storage.o \
psa_its_file.o \
psa_util.o \
ripemd160.o \
rsa.o \
rsa_alt_helpers.o \
sha1.o \
sha256.o \
sha512.o \
threading.o \
timing.o \
version.o \
version_features.o \
# This line is intentionally left blank
include ../3rdparty/Makefile.inc
LOCAL_CFLAGS+=$(THIRDPARTY_INCLUDES)
OBJS_CRYPTO+=$(THIRDPARTY_CRYPTO_OBJECTS)
OBJS_X509= \
x509.o \
x509_create.o \
x509_crl.o \
x509_crt.o \
x509_csr.o \
x509write_crt.o \
x509write_csr.o \
pkcs7.o \
# This line is intentionally left blank
OBJS_TLS= \
debug.o \
mps_reader.o \
mps_trace.o \
net_sockets.o \
ssl_cache.o \
ssl_ciphersuites.o \
ssl_client.o \
ssl_cookie.o \
ssl_debug_helpers_generated.o \
ssl_msg.o \
ssl_ticket.o \
ssl_tls.o \
ssl_tls12_client.o \
ssl_tls12_server.o \
ssl_tls13_keys.o \
ssl_tls13_client.o \
ssl_tls13_server.o \
ssl_tls13_generic.o \
# This line is intentionally left blank
.SILENT:
.PHONY: all static shared clean
ifndef SHARED
all: static
else
all: shared static
endif
static: libmbedcrypto.a libmbedx509.a libmbedtls.a
cd ../tests && echo "This is a seedfile that contains 64 bytes (65 on Windows)......" > seedfile
shared: libmbedcrypto.$(DLEXT) libmbedx509.$(DLEXT) libmbedtls.$(DLEXT)
# Windows builds under Mingw can fail if make tries to create archives in the same
# directory at the same time - see https://bugs.launchpad.net/gcc-arm-embedded/+bug/1848002.
# This forces builds of the .a files to be serialised.
ifdef WINDOWS
libmbedtls.a: | libmbedx509.a
libmbedx509.a: | libmbedcrypto.a
endif
# tls
libmbedtls.a: $(OBJS_TLS)
echo " AR $@"
$(AR) $(ARFLAGS) $@ $(OBJS_TLS)
ifdef APPLE_BUILD
ifneq ($(APPLE_BUILD),0)
echo " RL $@"
$(RL) $(RLFLAGS) $@
endif
endif
libmbedtls.$(SOEXT_TLS): $(OBJS_TLS) libmbedx509.so
echo " LD $@"
$(CC) -shared -Wl,-soname,$@ -o $@ $(OBJS_TLS) -L. -lmbedx509 -lmbedcrypto $(LOCAL_LDFLAGS) $(LDFLAGS)
ifneq ($(SOEXT_TLS),so)
libmbedtls.so: libmbedtls.$(SOEXT_TLS)
echo " LN $@ -> $<"
ln -sf $< $@
endif
libmbedtls.dylib: $(OBJS_TLS) libmbedx509.dylib
echo " LD $@"
$(CC) -dynamiclib -o $@ $(OBJS_TLS) -L. -lmbedx509 -lmbedcrypto $(LOCAL_LDFLAGS) $(LDFLAGS)
libmbedtls.dll: $(OBJS_TLS) libmbedx509.dll
echo " LD $@"
$(CC) -shared -Wl,-soname,$@ -Wl,--out-implib,$@.a -o $@ $(OBJS_TLS) -lws2_32 -lwinmm -lgdi32 -L. -lmbedx509 -lmbedcrypto -static-libgcc $(LOCAL_LDFLAGS) $(LDFLAGS)
# x509
libmbedx509.a: $(OBJS_X509)
echo " AR $@"
$(AR) $(ARFLAGS) $@ $(OBJS_X509)
ifdef APPLE_BUILD
ifneq ($(APPLE_BUILD),0)
echo " RL $@"
$(RL) $(RLFLAGS) $@
endif
endif
libmbedx509.$(SOEXT_X509): $(OBJS_X509) libmbedcrypto.so
echo " LD $@"
$(CC) -shared -Wl,-soname,$@ -o $@ $(OBJS_X509) -L. -lmbedcrypto $(LOCAL_LDFLAGS) $(LDFLAGS)
ifneq ($(SOEXT_X509),so)
libmbedx509.so: libmbedx509.$(SOEXT_X509)
echo " LN $@ -> $<"
ln -sf $< $@
endif
libmbedx509.dylib: $(OBJS_X509) libmbedcrypto.dylib
echo " LD $@"
$(CC) -dynamiclib -o $@ $(OBJS_X509) -L. -lmbedcrypto $(LOCAL_LDFLAGS) $(LDFLAGS)
libmbedx509.dll: $(OBJS_X509) libmbedcrypto.dll
echo " LD $@"
$(CC) -shared -Wl,-soname,$@ -Wl,--out-implib,$@.a -o $@ $(OBJS_X509) -lws2_32 -lwinmm -lgdi32 -L. -lmbedcrypto -static-libgcc $(LOCAL_LDFLAGS) $(LDFLAGS)
# crypto
libmbedcrypto.a: $(OBJS_CRYPTO)
echo " AR $@"
$(AR) $(ARFLAGS) $@ $(OBJS_CRYPTO)
ifdef APPLE_BUILD
ifneq ($(APPLE_BUILD),0)
echo " RL $@"
$(RL) $(RLFLAGS) $@
endif
endif
libmbedcrypto.$(SOEXT_CRYPTO): $(OBJS_CRYPTO)
echo " LD $@"
$(CC) -shared -Wl,-soname,$@ -o $@ $(OBJS_CRYPTO) $(LOCAL_LDFLAGS) $(LDFLAGS)
ifneq ($(SOEXT_CRYPTO),so)
libmbedcrypto.so: libmbedcrypto.$(SOEXT_CRYPTO)
echo " LN $@ -> $<"
ln -sf $< $@
endif
libmbedcrypto.dylib: $(OBJS_CRYPTO)
echo " LD $@"
$(CC) -dynamiclib -o $@ $(OBJS_CRYPTO) $(LOCAL_LDFLAGS) $(LDFLAGS)
libmbedcrypto.dll: $(OBJS_CRYPTO)
echo " LD $@"
$(CC) -shared -Wl,-soname,$@ -Wl,--out-implib,$@.a -o $@ $(OBJS_CRYPTO) -lws2_32 -lwinmm -lgdi32 -static-libgcc $(LOCAL_LDFLAGS) $(LDFLAGS)
.c.o:
echo " CC $<"
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) -o $@ -c $<
.PHONY: generated_files
GENERATED_FILES = \
error.c version_features.c \
ssl_debug_helpers_generated.c \
psa_crypto_driver_wrappers.c
generated_files: $(GENERATED_FILES)
error.c: ../scripts/generate_errors.pl
error.c: ../scripts/data_files/error.fmt
error.c: $(filter-out %config%,$(wildcard ../include/mbedtls/*.h))
error.c:
echo " Gen $@"
$(PERL) ../scripts/generate_errors.pl
ssl_debug_helpers_generated.c: ../scripts/generate_ssl_debug_helpers.py
ssl_debug_helpers_generated.c: $(filter-out %config%,$(wildcard ../include/mbedtls/*.h))
ssl_debug_helpers_generated.c:
echo " Gen $@"
$(PYTHON) ../scripts/generate_ssl_debug_helpers.py --mbedtls-root .. .
version_features.c: ../scripts/generate_features.pl
version_features.c: ../scripts/data_files/version_features.fmt
## The generated file only depends on the options that are present in mbedtls_config.h,
## not on which options are set. To avoid regenerating this file all the time
## when switching between configurations, don't declare mbedtls_config.h as a
## dependency. Remove this file from your working tree if you've just added or
## removed an option in mbedtls_config.h.
#version_features.c: ../include/mbedtls/mbedtls_config.h
version_features.c:
echo " Gen $@"
$(PERL) ../scripts/generate_features.pl
psa_crypto_driver_wrappers.c: ../scripts/generate_driver_wrappers.py
psa_crypto_driver_wrappers.c: ../scripts/data_files/driver_templates/psa_crypto_driver_wrappers.c.jinja
psa_crypto_driver_wrappers.c:
echo " Gen $@"
$(PYTHON) ../scripts/generate_driver_wrappers.py
clean:
ifndef WINDOWS
rm -f *.o libmbed*
rm -f $(THIRDPARTY_CRYPTO_OBJECTS)
else
if exist *.o del /Q /F *.o
if exist libmbed* del /Q /F libmbed*
del /Q /F del_errors_out_if_the_file_list_is_empty_but_not_if_a_file_does_not_exist $(subst /,\,$(THIRDPARTY_CRYPTO_OBJECTS))
endif
neat: clean
ifndef WINDOWS
rm -f $(GENERATED_FILES)
else
for %f in ($(subst /,\,$(GENERATED_FILES))) if exist %f del /Q /F %f
endif