From 9ae212c52658158d3d00c53d41d73002c2af9b77 Mon Sep 17 00:00:00 2001 From: turbocat Date: Mon, 24 Jan 2022 16:31:32 +0000 Subject: [PATCH] ssl_client1 example use new tcc build. git-svn-id: svn://kolibrios.org@9661 a494cfbc-eb01-0410-851d-a64ba20cac60 --- .../libraries/kos_mbedtls/programs/ssl/Makefile | 12 ------------ .../kos_mbedtls/programs/ssl/Tupfile.lua | 16 ++++++++-------- .../kos_mbedtls/programs/ssl/ssl_client1.c | 4 ++-- 3 files changed, 10 insertions(+), 22 deletions(-) delete mode 100644 programs/develop/libraries/kos_mbedtls/programs/ssl/Makefile diff --git a/programs/develop/libraries/kos_mbedtls/programs/ssl/Makefile b/programs/develop/libraries/kos_mbedtls/programs/ssl/Makefile deleted file mode 100644 index bfd4b04d14..0000000000 --- a/programs/develop/libraries/kos_mbedtls/programs/ssl/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -FASM = fasm -TCC_DIR = /home/max/kolibri-svn/programs/develop/ktcc/trunk -TCC= $(TCC_DIR)/bin/kos32-tcc - -CFLAGS= -I../../include -I$(TCC_DIR)/libc.obj/include -stack=10000 - -all: - $(FASM) load_mbedtls.asm - $(TCC) $(CFLAGS) ssl_client1.c load_mbedtls.o -o ssl_client1 -ltcc -lc.obj - -clean: - rm -f *.o ssl_client1 diff --git a/programs/develop/libraries/kos_mbedtls/programs/ssl/Tupfile.lua b/programs/develop/libraries/kos_mbedtls/programs/ssl/Tupfile.lua index c6c47a8d94..fe493c6aac 100644 --- a/programs/develop/libraries/kos_mbedtls/programs/ssl/Tupfile.lua +++ b/programs/develop/libraries/kos_mbedtls/programs/ssl/Tupfile.lua @@ -1,13 +1,13 @@ if tup.getconfig("NO_FASM") ~= "" then return end if tup.getconfig("NO_TCC") ~= "" then return end +if tup.getconfig("HELPERDIR") == "" +then + HELPERDIR = "../../../../../" +end +tup.include(HELPERDIR .. "/use_tcc.lua") -TCC="kos32-tcc" +CFLAGS = CFLAGS .. " -I../../include" +LFLAGS = "-stack=10000" -CFLAGS = "-I../../../../ktcc/trunk/libc.obj/include -I../../include" -LDFAGS = "-nostdlib -L../../../../ktcc/trunk/bin/lib ../../../../ktcc/trunk/bin/lib/crt0.o -stack=10000 " - -LIBS = "-ltcc -lnetwork -lc.obj " - -COMMAND=string.format("%s %s %s %s %s", TCC, CFLAGS, LDFAGS, "%f -o %o", LIBS) tup.rule("load_mbedtls.asm", "fasm %f %o ", "load_mbedtls.o") -tup.rule({"ssl_client1.c", "load_mbedtls.o"}, COMMAND .. tup.getconfig("KPACK_CMD"), "ssl_client1") +link_tcc({"ssl_client1.c", "load_mbedtls.o"}, "ssl_client1") diff --git a/programs/develop/libraries/kos_mbedtls/programs/ssl/ssl_client1.c b/programs/develop/libraries/kos_mbedtls/programs/ssl/ssl_client1.c index fa1f5c4ed9..b8a1b86ff4 100644 --- a/programs/develop/libraries/kos_mbedtls/programs/ssl/ssl_client1.c +++ b/programs/develop/libraries/kos_mbedtls/programs/ssl/ssl_client1.c @@ -20,11 +20,11 @@ * * This file is part of mbed TLS (https://tls.mbed.org) */ -#if !defined(MBEDTLS_CONFIG_FILE) +/*#if !defined(MBEDTLS_CONFIG_FILE) #include "mbedtls/config.h" #else #include MBEDTLS_CONFIG_FILE -#endif +#endif*/ #include