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