mbedtls/library/Makefile
Paul Bakker c70b982056 OID functionality moved to a separate module.
A new OID module has been created that contains the main OID searching
functionality based on type-dependent arrays. A base type is used to
contain the basic values (oid_descriptor_t) and that type is extended to
contain type specific information (like a pk_alg_t).

As a result the rsa sign and verify function prototypes have changed. They
now expect a md_type_t identifier instead of the removed RSA_SIG_XXX
defines.

All OID definitions have been moved to oid.h
All OID matching code is in the OID module.

The RSA PKCS#1 functions cleaned up as a result and adapted to use the
MD layer.

The SSL layer cleanup up as a result and adapted to use the MD layer.

The X509 parser cleaned up and matches OIDs in certificates with new
module and adapted to use the MD layer.

The X509 writer cleaned up and adapted to use the MD layer.

Apps and tests modified accordingly
2013-04-07 22:00:46 +02:00

97 lines
1.9 KiB
Makefile

# Also see "include/polarssl/config.h"
# To compile on MinGW: add "-lws2_32" to LDFLAGS or define WINDOWS in your
# environment
#
CFLAGS += -I../include -D_FILE_OFFSET_BITS=64 -Wall -W -Wdeclaration-after-statement
OFLAGS = -O2
ifdef DEBUG
CFLAGS += -g3
endif
# MicroBlaze specific options:
# CFLAGS += -mno-xl-soft-mul -mxl-barrel-shift
# To compile on Plan9:
# CFLAGS += -D_BSD_EXTENSION
# To compile as a shared library:
ifdef SHARED
CFLAGS += -fPIC
endif
SONAME=libpolarssl.so.0
DLEXT=so
# OSX shared library extension:
# DLEXT=dylib
# Windows shared library extension:
ifdef WINDOWS
DLEXT=dll
LDFLAGS += -lws2_32
endif
OBJS= aes.o arc4.o asn1parse.o \
asn1write.o base64.o bignum.o \
blowfish.o camellia.o \
certs.o cipher.o cipher_wrap.o \
ctr_drbg.o debug.o des.o \
dhm.o ecdh.o ecdsa.o \
ecp.o \
entropy.o entropy_poll.o \
error.o gcm.o havege.o \
md.o md_wrap.o md2.o \
md4.o md5.o net.o \
oid.o \
padlock.o pbkdf2.o pem.o \
pkcs11.o \
rsa.o sha1.o sha2.o \
sha4.o ssl_cache.o ssl_cli.o \
ssl_srv.o ssl_ciphersuites.o \
ssl_tls.o timing.o version.o \
x509parse.o x509write.o xtea.o
.SILENT:
ifndef SHARED
all: static
else
all: shared
endif
static: libpolarssl.a
shared: libpolarssl.$(DLEXT)
libpolarssl.a: $(OBJS)
echo " AR $@"
$(AR) r $@ $(OBJS)
echo " RL $@"
$(AR) s $@
libpolarssl.so: libpolarssl.a
echo " LD $@"
$(CC) ${LDFLAGS} -shared -Wl,-soname,$(SONAME) -o $@ $(OBJS)
libpolarssl.dylib: libpolarssl.a
echo " LD $@"
$(CC) ${LDFLAGS} -dynamiclib -o $@ $(OBJS)
libpolarssl.dll: libpolarssl.a
echo " LD $@"
$(CC) -shared -Wl,-soname,$@ -o $@ $(OBJS) -lws2_32 -lwinmm -lgdi32
.c.o:
echo " CC $<"
$(CC) $(CFLAGS) $(OFLAGS) -c $<
clean:
ifndef WINDOWS
rm -f *.o libpolarssl.*
endif
ifdef WINDOWS
del /Q /F *.o libpolarssl.*
endif