ssl_client1 example use new tcc build.

git-svn-id: svn://kolibrios.org@9661 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
turbocat 2022-01-24 16:31:32 +00:00
parent 348cd4ad99
commit 9ae212c526
3 changed files with 10 additions and 22 deletions

View File

@ -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

View File

@ -1,13 +1,13 @@
if tup.getconfig("NO_FASM") ~= "" then return end if tup.getconfig("NO_FASM") ~= "" then return end
if tup.getconfig("NO_TCC") ~= "" 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("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")

View File

@ -20,11 +20,11 @@
* *
* This file is part of mbed TLS (https://tls.mbed.org) * 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" #include "mbedtls/config.h"
#else #else
#include MBEDTLS_CONFIG_FILE #include MBEDTLS_CONFIG_FILE
#endif #endif*/
#include <sys/ksys.h> #include <sys/ksys.h>