forked from KolibriOS/kolibrios
mbedtls:
- added to autobuild git-svn-id: svn://kolibrios.org@9086 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
451b859916
commit
b3059bf461
@ -1,65 +0,0 @@
|
|||||||
CC = kos32-gcc
|
|
||||||
FASM = fasm
|
|
||||||
CLINK= ../../../clink/clink
|
|
||||||
|
|
||||||
KLIBC_DIR = ../../../ktcc/trunk/libc.obj
|
|
||||||
|
|
||||||
CFLAGS = -c -nostdinc -I../include -DGNUC -fno-common -Os -fno-delete-null-pointer-checks -fno-ident -fno-builtin -fno-leading-underscore -D__TINYC__ -D_FILE_OFFSET_BITS=64
|
|
||||||
|
|
||||||
INCLUDES = -I../include -I.. -I$(KLIBC_DIR)/include
|
|
||||||
|
|
||||||
OBJS_CRYPTO= aes.o aesni.o arc4.o \
|
|
||||||
aria.o asn1parse.o asn1write.o \
|
|
||||||
base64.o bignum.o blowfish.o \
|
|
||||||
camellia.o ccm.o chacha20.o \
|
|
||||||
chachapoly.o cipher.o cipher_wrap.o \
|
|
||||||
cmac.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 havege.o \
|
|
||||||
hkdf.o \
|
|
||||||
hmac_drbg.o md.o md2.o \
|
|
||||||
md4.o md5.o md_wrap.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 \
|
|
||||||
ripemd160.o rsa_internal.o rsa.o \
|
|
||||||
sha1.o sha256.o sha512.o \
|
|
||||||
threading.o timing.o version.o \
|
|
||||||
version_features.o xtea.o
|
|
||||||
|
|
||||||
OBJS_X509= certs.o pkcs11.o x509.o \
|
|
||||||
x509_create.o x509_crl.o x509_crt.o \
|
|
||||||
x509_csr.o x509write_crt.o x509write_csr.o
|
|
||||||
|
|
||||||
OBJS_TLS= debug.o net_sockets.o \
|
|
||||||
ssl_cache.o ssl_ciphersuites.o \
|
|
||||||
ssl_cli.o ssl_cookie.o \
|
|
||||||
ssl_srv.o ssl_ticket.o \
|
|
||||||
ssl_tls.o
|
|
||||||
|
|
||||||
OBJS_OTHER = libtcc/libtcc1.o libtcc/memmove.o \
|
|
||||||
libtcc/memset.o libtcc/memcpy.o \
|
|
||||||
libtcc/___chkstk_ms.o \
|
|
||||||
mbedtls_init.o \
|
|
||||||
export.o
|
|
||||||
|
|
||||||
all: $(OBJS_CRYPTO) $(OBJS_TLS) $(OBJS_X509) $(OBJS_OTHER)
|
|
||||||
ar -crs libmbedtls.a $(OBJS_CRYPTO) $(OBJS_TLS) $(OBJS_X509) $(OBJS_OTHER)
|
|
||||||
$(CLINK) $(OBJS_CRYPTO) $(OBJS_TLS) $(OBJS_X509) $(OBJS_OTHER) > clink.log
|
|
||||||
mv -f a.out.obj mbedtls.obj
|
|
||||||
strip --strip-unneeded -x mbedtls.obj
|
|
||||||
kpack mbedtls.obj
|
|
||||||
cp -f mbedtls.obj /home/max/.kex/root/RD/1/LIB
|
|
||||||
|
|
||||||
%.o : %.c Makefile
|
|
||||||
$(CC) -c $(CFLAGS) $(INCLUDES) -o $@ $<
|
|
||||||
|
|
||||||
%.o : %.asm Makefile
|
|
||||||
$(FASM) $< $@
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -f $(OBJS_CRYPTO) $(OBJS_TLS) $(OBJS_X509) $(OBJS_LIBC) $(OBJS_OTHER)
|
|
105
programs/develop/libraries/kos_mbedtls/library/Tupfile.lua
Normal file
105
programs/develop/libraries/kos_mbedtls/library/Tupfile.lua
Normal file
@ -0,0 +1,105 @@
|
|||||||
|
if tup.getconfig("NO_GCC") ~= "" or tup.getconfig("NO_FASM") ~= "" then return end
|
||||||
|
HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../../../" or tup.getconfig("HELPERDIR")
|
||||||
|
tup.include(HELPERDIR .. "/use_gcc.lua")
|
||||||
|
|
||||||
|
KLIBC_DIR = HELPERDIR .. "develop/ktcc/trunk/libc.obj"
|
||||||
|
|
||||||
|
CFLAGS = " -c -nostdinc -I../include -I.. -I ".. KLIBC_DIR .. "/include -DGNUC -fno-common -Os -fno-delete-null-pointer-checks -fno-ident -fno-builtin -fno-leading-underscore -D__TINYC__ -D_FILE_OFFSET_BITS=64 "
|
||||||
|
|
||||||
|
MBEDTLS_SRC = {
|
||||||
|
"aesni.c",
|
||||||
|
"entropy.c",
|
||||||
|
"platform_util.c",
|
||||||
|
"cmac.c",
|
||||||
|
"blowfish.c",
|
||||||
|
"pkcs11.c",
|
||||||
|
"md2.c",
|
||||||
|
"pkwrite.c",
|
||||||
|
"x509_crl.c",
|
||||||
|
"asn1write.c",
|
||||||
|
"ssl_tls.c",
|
||||||
|
"x509_create.c",
|
||||||
|
"ecp_curves.c",
|
||||||
|
"ssl_ticket.c",
|
||||||
|
"net_sockets.c",
|
||||||
|
"pem.c",
|
||||||
|
"bignum.c",
|
||||||
|
"md_wrap.c",
|
||||||
|
"hkdf.c",
|
||||||
|
"cipher.c",
|
||||||
|
"md4.c",
|
||||||
|
"chachapoly.c",
|
||||||
|
"x509write_crt.c",
|
||||||
|
"ssl_cookie.c",
|
||||||
|
"md.c",
|
||||||
|
"md5.c",
|
||||||
|
"gcm.c",
|
||||||
|
"hmac_drbg.c",
|
||||||
|
"ssl_srv.c",
|
||||||
|
"x509.c",
|
||||||
|
"ecp.c",
|
||||||
|
"pkcs5.c",
|
||||||
|
"platform.c",
|
||||||
|
"nist_kw.c",
|
||||||
|
"xtea.c",
|
||||||
|
"ripemd160.c",
|
||||||
|
"ecjpake.c",
|
||||||
|
"oid.c",
|
||||||
|
"padlock.c",
|
||||||
|
"ssl_ciphersuites.c",
|
||||||
|
"version.c",
|
||||||
|
"sha512.c",
|
||||||
|
"rsa_internal.c",
|
||||||
|
"sha256.c",
|
||||||
|
"pk_wrap.c",
|
||||||
|
"chacha20.c",
|
||||||
|
"x509_csr.c",
|
||||||
|
"libtcc/___chkstk_ms.c",
|
||||||
|
"libtcc/libtcc1.c",
|
||||||
|
"libtcc/memcpy.c",
|
||||||
|
"libtcc/memmove.c",
|
||||||
|
"libtcc/memset.c",
|
||||||
|
"arc4.c",
|
||||||
|
"version_features.c",
|
||||||
|
"timing.c",
|
||||||
|
"ctr_drbg.c",
|
||||||
|
"dhm.c",
|
||||||
|
"entropy_poll.c",
|
||||||
|
"pkparse.c",
|
||||||
|
"aria.c",
|
||||||
|
"threading.c",
|
||||||
|
"x509write_csr.c",
|
||||||
|
"asn1parse.c",
|
||||||
|
"poly1305.c",
|
||||||
|
"ecdsa.c",
|
||||||
|
"rsa.c",
|
||||||
|
"certs.c",
|
||||||
|
"x509_crt.c",
|
||||||
|
"ecdh.c",
|
||||||
|
"sha1.c",
|
||||||
|
"camellia.c",
|
||||||
|
"ssl_cli.c",
|
||||||
|
"havege.c",
|
||||||
|
"pk.c",
|
||||||
|
"ssl_cache.c",
|
||||||
|
"base64.c",
|
||||||
|
"memory_buffer_alloc.c",
|
||||||
|
"pkcs12.c",
|
||||||
|
"aes.c",
|
||||||
|
"ccm.c",
|
||||||
|
"error.c",
|
||||||
|
"cipher_wrap.c",
|
||||||
|
"des.c",
|
||||||
|
"debug.c"
|
||||||
|
};
|
||||||
|
|
||||||
|
tup.rule("mbedtls_export.asm", "fasm %f %o ", "mbedtls_export.o");
|
||||||
|
tup.rule("mbedtls_init.asm", "fasm %f %o ", "mbedtls_init.o");
|
||||||
|
compile_gcc(MBEDTLS_SRC);
|
||||||
|
|
||||||
|
table.insert(OBJS,"mbedtls_export.o");
|
||||||
|
table.insert(OBJS,"mbedtls_init.o");
|
||||||
|
|
||||||
|
tup.rule(OBJS, HELPERDIR .. "develop/clink/clink -o %o %f" ..
|
||||||
|
" && strip %o --strip-unneeded" .. tup.getconfig("KPACK_CMD"), "mbedtls.obj");
|
||||||
|
|
Loading…
Reference in New Issue
Block a user